cmake: revert back to standard CTest BUILD_TESTING option

This commit is contained in:
Marc-André Moreau 2012-10-13 09:50:02 -04:00
parent e2d3b4454c
commit 2ee9f23a8e
12 changed files with 18 additions and 22 deletions

View File

@ -200,7 +200,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DI
INCLUDE(CTest)
if(TEST_BUILD)
if(BUILD_TESTING)
enable_testing()
endif()

View File

@ -27,7 +27,7 @@ if(MSVC)
option(WITH_WIN8 "Use Windows 8 libraries" OFF)
endif()
option(TEST_BUILD "Build unit tests" OFF)
option(BUILD_TESTING "Build unit tests" OFF)
if(${CMAKE_VERSION} VERSION_GREATER 2.8.8)
option(MONOLITHIC_BUILD "Use monolithic build" OFF)

View File

@ -41,6 +41,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -44,6 +44,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -36,9 +36,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO
if(MONOLITHIC_BUILD)
else()
if(NOT WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle)
endif()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
@ -46,6 +44,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -42,6 +42,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -37,6 +37,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -46,6 +46,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -38,6 +38,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -48,6 +48,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -77,14 +77,11 @@ endif()
if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
else()
if (NOT WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
winpr-crt
winpr-sysinfo
winpr-registry)
endif()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-utils)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
winpr-crt
winpr-sysinfo
winpr-registry
winpr-utils)
endif()
if(MONOLITHIC_BUILD)
@ -96,6 +93,6 @@ endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
if(TEST_BUILD)
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -28,3 +28,4 @@ foreach(test ${${MODULE_PREFIX}_TESTS})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")