Set CONFIGURATIONS property on tests only for Xcode.

Having it in the general case disabled a large number of tests.
This commit is contained in:
John Ralls
2020-04-18 13:09:32 -07:00
parent ea552c7e3b
commit 4b8649f77b

View File

@@ -78,7 +78,11 @@ function(gnc_add_test _TARGET _SOURCE_FILES TEST_INCLUDE_VAR_NAME TEST_LIBS_VAR_
)
set_tests_properties(${_TARGET} PROPERTIES ENVIRONMENT "GNC_UNINSTALLED=YES;GNC_BUILDDIR=${CMAKE_BINARY_DIR};${ARGN}")
else()
add_test(NAME ${_TARGET} COMMAND ${_TARGET} CONFIGURATIONS Debug;Release)
if (CMAKE_GENERATOR STREQUAL Xcode)
add_test(NAME ${_TARGET} COMMAND ${_TARGET} CONFIGURATIONS Debug;Release)
else()
add_test(NAME ${_TARGET} COMMAND ${_TARGET})
endif()
set_tests_properties(${_TARGET} PROPERTIES ENVIRONMENT "GNC_UNINSTALLED=YES;GNC_BUILDDIR=${CMAKE_BINARY_DIR}")
endif()
add_dependencies(check ${_TARGET})