Merge branch 'master' of https://github.com/ChaiScript/ChaiScript
Conflicts: CMakeLists.txt Fixed conflicted CMakeLists.txt
This commit is contained in:
commit
2b64c90a0e
@ -39,40 +39,40 @@ configure_file(Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile)
|
|||||||
include(CTest)
|
include(CTest)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
FIND_LIBRARY(READLINE_LIBRARY NAMES readline PATH /usr/lib /usr/local/lib /opt/local/lib)
|
find_library(READLINE_LIBRARY NAMES readline PATH /usr/lib /usr/local/lib /opt/local/lib)
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
|
||||||
MESSAGE(STATUS "Detecting readline support")
|
message(STATUS "Detecting readline support")
|
||||||
if (READLINE_LIBRARY)
|
if (READLINE_LIBRARY)
|
||||||
MESSAGE(STATUS "Found: ${READLINE_LIBRARY}")
|
message(STATUS "Found: ${READLINE_LIBRARY}")
|
||||||
SET (READLINE_LIB readline)
|
set (READLINE_LIB readline)
|
||||||
ADD_DEFINITIONS(/DREADLINE_AVAILABLE)
|
add_definitions(/DREADLINE_AVAILABLE)
|
||||||
else(READLINE_LIBRARY)
|
else(READLINE_LIBRARY)
|
||||||
MESSAGE(STATUS "Not Found")
|
message(STATUS "Not Found")
|
||||||
SET (READLINE_LIB )
|
set (READLINE_LIB )
|
||||||
SET (READLINE_FLAG )
|
set (READLINE_FLAG )
|
||||||
endif(READLINE_LIBRARY)
|
endif(READLINE_LIBRARY)
|
||||||
|
|
||||||
IF(MSVC)
|
if(MSVC)
|
||||||
ADD_DEFINITIONS(/W4)
|
add_definitions(/W4)
|
||||||
IF(CMAKE_CL_64)
|
if(CMAKE_CL_64)
|
||||||
ADD_DEFINITIONS(/bigobj)
|
add_definitions(/bigobj)
|
||||||
ENDIF()
|
endif()
|
||||||
ELSE()
|
else()
|
||||||
ADD_DEFINITIONS(-Wall -Wextra -Wshadow -pedantic)
|
add_definitions(-Wall -Wextra -Wshadow -pedantic)
|
||||||
|
|
||||||
IF (APPLE)
|
if (APPLE)
|
||||||
# -Wno-missing-field-initializers is for boost on macos
|
# -Wno-missing-field-initializers is for boost on macos
|
||||||
ADD_DEFINITIONS(-Wno-missing-field-initializers -Wno-sign-compare)
|
add_definitions(-Wno-missing-field-initializers -Wno-sign-compare)
|
||||||
ENDIF()
|
endif()
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
||||||
SET(Boost_ADDITIONAL_VERSIONS "1.44" "1.44.0" "1.43" "1.43.0" "1.42" "1.42.0" "1.41")
|
set(Boost_ADDITIONAL_VERSIONS "1.44" "1.44.0" "1.43" "1.43.0" "1.42" "1.42.0" "1.41")
|
||||||
SET(Boost_USE_MULTITHREADED ON)
|
set(Boost_USE_MULTITHREADED ON)
|
||||||
|
|
||||||
if (MULTITHREAD_SUPPORT_ENABLED)
|
if (MULTITHREAD_SUPPORT_ENABLED)
|
||||||
find_package(Boost 1.36.0 COMPONENTS thread)
|
find_package(Boost 1.36.0 COMPONENTS thread)
|
||||||
@ -83,18 +83,18 @@ if (MULTITHREAD_SUPPORT_ENABLED)
|
|||||||
message(FATAL_ERROR "Can not find Boost")
|
message(FATAL_ERROR "Can not find Boost")
|
||||||
endif(Boost_FOUND)
|
endif(Boost_FOUND)
|
||||||
else()
|
else()
|
||||||
ADD_DEFINITIONS(-DCHAISCRIPT_NO_THREADS)
|
add_definitions(-DCHAISCRIPT_NO_THREADS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_HOST_UNIX)
|
if (CMAKE_HOST_UNIX)
|
||||||
SET(DYNAMIC_LOADER "dl")
|
set(DYNAMIC_LOADER "dl")
|
||||||
endif(CMAKE_HOST_UNIX)
|
endif(CMAKE_HOST_UNIX)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Boost on MSVC does automatic linking
|
# Boost on MSVC does automatic linking
|
||||||
SET(LIBS ${DYNAMIC_LOADER} ${READLINE_LIB})
|
set(LIBS ${DYNAMIC_LOADER} ${READLINE_LIB})
|
||||||
else()
|
else()
|
||||||
SET(LIBS ${DYNAMIC_LOADER} ${Boost_LIBRARIES} ${READLINE_LIB})
|
set(LIBS ${DYNAMIC_LOADER} ${Boost_LIBRARIES} ${READLINE_LIB})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_COMPILER_2005)
|
if (CMAKE_COMPILER_2005)
|
||||||
@ -128,7 +128,7 @@ file(GLOB UNIT_TESTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/unittests/ ${CMAKE_CUR
|
|||||||
|
|
||||||
list(SORT UNIT_TESTS)
|
list(SORT UNIT_TESTS)
|
||||||
|
|
||||||
IF(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
option(UNIT_TEST_LIGHT "Unit tests light (expect module loading failures)" FALSE)
|
option(UNIT_TEST_LIGHT "Unit tests light (expect module loading failures)" FALSE)
|
||||||
|
|
||||||
foreach(filename ${UNIT_TESTS})
|
foreach(filename ${UNIT_TESTS})
|
||||||
@ -136,13 +136,13 @@ IF(BUILD_TESTING)
|
|||||||
add_test(${filename} chai ${CMAKE_CURRENT_SOURCE_DIR}/unittests/unit_test.inc ${CMAKE_CURRENT_SOURCE_DIR}/unittests/${filename})
|
add_test(${filename} chai ${CMAKE_CURRENT_SOURCE_DIR}/unittests/unit_test.inc ${CMAKE_CURRENT_SOURCE_DIR}/unittests/${filename})
|
||||||
endforeach(filename)
|
endforeach(filename)
|
||||||
|
|
||||||
SET_PROPERTY(TEST ${UNIT_TESTS}
|
set_property(TEST ${UNIT_TESTS}
|
||||||
PROPERTY ENVIRONMENT
|
PROPERTY ENVIRONMENT
|
||||||
"CHAI_USE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/unittests/"
|
"CHAI_USE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/unittests/"
|
||||||
"CHAI_MODULE_PATH=${CMAKE_CURRENT_BINARY_DIR}/"
|
"CHAI_MODULE_PATH=${CMAKE_CURRENT_BINARY_DIR}/"
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (NOT UNIT_TEST_LIGHT)
|
if (NOT UNIT_TEST_LIGHT)
|
||||||
add_executable(utility_test unittests/utility_test.cpp)
|
add_executable(utility_test unittests/utility_test.cpp)
|
||||||
target_link_libraries(utility_test ${LIBS})
|
target_link_libraries(utility_test ${LIBS})
|
||||||
add_test(NAME Utility_Test COMMAND utility_test)
|
add_test(NAME Utility_Test COMMAND utility_test)
|
||||||
@ -188,8 +188,8 @@ IF(BUILD_TESTING)
|
|||||||
target_link_libraries(test_module ${LIBS})
|
target_link_libraries(test_module ${LIBS})
|
||||||
|
|
||||||
install(TARGETS test_module RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript)
|
install(TARGETS test_module RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript)
|
||||||
ENDIF()
|
endif()
|
||||||
ENDIF(BUILD_TESTING)
|
endif(BUILD_TESTING)
|
||||||
|
|
||||||
install(TARGETS chai ${MODULES} RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript )
|
install(TARGETS chai ${MODULES} RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript )
|
||||||
install(DIRECTORY include/chaiscript DESTINATION include
|
install(DIRECTORY include/chaiscript DESTINATION include
|
||||||
@ -209,8 +209,7 @@ install(DIRECTORY samples DESTINATION share/chaiscript
|
|||||||
PATTERN "*/.git*" EXCLUDE
|
PATTERN "*/.git*" EXCLUDE
|
||||||
PATTERN "*~" EXCLUDE)
|
PATTERN "*~" EXCLUDE)
|
||||||
|
|
||||||
|
|
||||||
configure_file(contrib/pkgconfig/chaiscript.pc.in lib/pkgconfig/chaiscript.pc @ONLY)
|
configure_file(contrib/pkgconfig/chaiscript.pc.in lib/pkgconfig/chaiscript.pc @ONLY)
|
||||||
install(FILES "${chaiscript_BINARY_DIR}/lib/pkgconfig/chaiscript.pc"
|
install(FILES "${chaiscript_BINARY_DIR}/lib/pkgconfig/chaiscript.pc"
|
||||||
DESTINATION lib/pkgconfig)
|
DESTINATION lib/pkgconfig)
|
||||||
|
|
||||||
|
@ -322,7 +322,6 @@ namespace chaiscript
|
|||||||
*/
|
*/
|
||||||
bool Float_() {
|
bool Float_() {
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
std::string::const_iterator start = m_input_pos;
|
|
||||||
|
|
||||||
if (has_more_input() && char_in_alphabet(*m_input_pos,detail::float_alphabet) ) {
|
if (has_more_input() && char_in_alphabet(*m_input_pos,detail::float_alphabet) ) {
|
||||||
while (has_more_input() && char_in_alphabet(*m_input_pos,detail::int_alphabet) ) {
|
while (has_more_input() && char_in_alphabet(*m_input_pos,detail::int_alphabet) ) {
|
||||||
@ -1478,7 +1477,6 @@ namespace chaiscript
|
|||||||
*/
|
*/
|
||||||
bool Dot_Fun_Array() {
|
bool Dot_Fun_Array() {
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
std::string::const_iterator prev_pos = m_input_pos;
|
|
||||||
|
|
||||||
size_t prev_stack_top = m_match_stack.size();
|
size_t prev_stack_top = m_match_stack.size();
|
||||||
if (Lambda() || Num(true) || Quoted_String(true) || Single_Quoted_String(true) ||
|
if (Lambda() || Num(true) || Quoted_String(true) || Single_Quoted_String(true) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user