cmake: revert back to standard CTest BUILD_TESTING option
This commit is contained in:
parent
e2d3b4454c
commit
2ee9f23a8e
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
@ -41,6 +41,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -44,6 +44,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -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()
|
||||
|
||||
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()
|
||||
|
@ -42,6 +42,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -37,6 +37,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -46,6 +46,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -38,6 +38,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -48,6 +48,6 @@ endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR")
|
||||
|
||||
if(TEST_BUILD)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
@ -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)
|
||||
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()
|
||||
|
@ -28,3 +28,4 @@ foreach(test ${${MODULE_PREFIX}_TESTS})
|
||||
endforeach()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user