Merge pull request #120 from axelstudios/develop
Formatted CMakeLists.txt
This commit is contained in:
commit
a7e8c6fe1f
@ -95,11 +95,11 @@ if (READLINE_LIBRARY)
|
||||
message(STATUS "Found: ${READLINE_LIBRARY}")
|
||||
set(READLINE_LIB readline)
|
||||
add_definitions(/DREADLINE_AVAILABLE)
|
||||
else(READLINE_LIBRARY)
|
||||
else()
|
||||
message(STATUS "Not Found")
|
||||
set(READLINE_LIB)
|
||||
set(READLINE_FLAG)
|
||||
endif(READLINE_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
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
|
||||
# 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.
|
||||
ADD_DEFINITIONS(/wd4503)
|
||||
add_definitions(/wd4503)
|
||||
else()
|
||||
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)
|
||||
|
||||
if (MULTITHREAD_SUPPORT_ENABLED)
|
||||
else()
|
||||
if(NOT MULTITHREAD_SUPPORT_ENABLED)
|
||||
add_definitions(-DCHAISCRIPT_NO_THREADS)
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_UNIX)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
list(APPEND LIBS "dl")
|
||||
endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
endif()
|
||||
|
||||
if(MULTITHREAD_SUPPORT_ENABLED)
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
@ -183,7 +182,7 @@ if (CMAKE_HOST_UNIX)
|
||||
add_definitions(-pthread)
|
||||
endif()
|
||||
|
||||
endif(CMAKE_HOST_UNIX)
|
||||
endif()
|
||||
|
||||
list(APPEND LIBS ${READLINE_LIB})
|
||||
|
||||
@ -234,7 +233,7 @@ if(BUILD_TESTING)
|
||||
foreach(filename ${UNIT_TESTS})
|
||||
message(STATUS "Adding test ${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}
|
||||
PROPERTY ENVIRONMENT
|
||||
@ -329,8 +328,11 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(multifile_test unittests/multifile_test_main.cpp unittests/multifile_test_chai.cpp
|
||||
unittests/multifile_test_module.cpp)
|
||||
add_executable(multifile_test
|
||||
unittests/multifile_test_main.cpp
|
||||
unittests/multifile_test_chai.cpp
|
||||
unittests/multifile_test_module.cpp
|
||||
)
|
||||
target_link_libraries(multifile_test ${LIBS})
|
||||
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)
|
||||
endif()
|
||||
endif(BUILD_TESTING)
|
||||
endif()
|
||||
|
||||
install(TARGETS chai chaiscript_stdlib-${CHAI_VERSION} ${MODULES} RUNTIME DESTINATION bin LIBRARY DESTINATION lib/chaiscript)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user