Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop

This commit is contained in:
Jason Turner 2014-05-10 08:39:59 -06:00
commit ee17a184c2

View File

@ -95,11 +95,11 @@ 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()
message(STATUS "Not Found") message(STATUS "Not Found")
set(READLINE_LIB) set(READLINE_LIB)
set(READLINE_FLAG) set(READLINE_FLAG)
endif(READLINE_LIBRARY) endif()
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
@ -123,7 +123,7 @@ if(MSVC)
# The error did not come up until the move to C++11, but the compiler doesn't give enough information # The error did not come up until the move to C++11, but the compiler doesn't give enough information
# to determine where the error is coming from, and the internet provides no real information for # to determine where the error is coming from, and the internet provides no real information for
# how to workaround or fix the error. So I'm disabling it globally. # how to workaround or fix the error. So I'm disabling it globally.
ADD_DEFINITIONS(/wd4503) add_definitions(/wd4503)
else() else()
add_definitions(-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic ${CPP11_FLAG}) add_definitions(-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic ${CPP11_FLAG})
@ -158,15 +158,14 @@ set (Chai_INCLUDES include/chaiscript/chaiscript.hpp include/chaiscript/chaiscri
set_source_files_properties(${Chai_INCLUDES} PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties(${Chai_INCLUDES} PROPERTIES HEADER_FILE_ONLY TRUE)
if (MULTITHREAD_SUPPORT_ENABLED) if(NOT MULTITHREAD_SUPPORT_ENABLED)
else()
add_definitions(-DCHAISCRIPT_NO_THREADS) add_definitions(-DCHAISCRIPT_NO_THREADS)
endif() endif()
if(CMAKE_HOST_UNIX) if(CMAKE_HOST_UNIX)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
list(APPEND LIBS "dl") list(APPEND LIBS "dl")
endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") endif()
if(MULTITHREAD_SUPPORT_ENABLED) if(MULTITHREAD_SUPPORT_ENABLED)
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
@ -183,7 +182,7 @@ if (CMAKE_HOST_UNIX)
add_definitions(-pthread) add_definitions(-pthread)
endif() endif()
endif(CMAKE_HOST_UNIX) endif()
list(APPEND LIBS ${READLINE_LIB}) list(APPEND LIBS ${READLINE_LIB})
@ -234,7 +233,7 @@ if(BUILD_TESTING)
foreach(filename ${UNIT_TESTS}) foreach(filename ${UNIT_TESTS})
message(STATUS "Adding test ${filename}") message(STATUS "Adding test ${filename}")
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()
set_property(TEST ${UNIT_TESTS} set_property(TEST ${UNIT_TESTS}
PROPERTY ENVIRONMENT PROPERTY ENVIRONMENT
@ -329,8 +328,11 @@ if(BUILD_TESTING)
endif() endif()
add_executable(multifile_test unittests/multifile_test_main.cpp unittests/multifile_test_chai.cpp add_executable(multifile_test
unittests/multifile_test_module.cpp) unittests/multifile_test_main.cpp
unittests/multifile_test_chai.cpp
unittests/multifile_test_module.cpp
)
target_link_libraries(multifile_test ${LIBS}) target_link_libraries(multifile_test ${LIBS})
add_test(NAME MultiFile_Test COMMAND multifile_test) add_test(NAME MultiFile_Test COMMAND multifile_test)
@ -339,7 +341,7 @@ if(BUILD_TESTING)
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()
install(TARGETS chai chaiscript_stdlib-${CHAI_VERSION} ${MODULES} RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript) install(TARGETS chai chaiscript_stdlib-${CHAI_VERSION} ${MODULES} RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript)