From 35413c216e457bb38a3fcc1d475a429cb20baad2 Mon Sep 17 00:00:00 2001 From: Joel Anderson Date: Tue, 30 Jul 2024 09:36:27 -0400 Subject: [PATCH] conditionally add generator expression --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f510a3ba..6db68a49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1088,10 +1088,17 @@ add_custom_target(build-test DEPENDS ${STUMPLESS_FUNCTION_TESTS} ) -add_custom_target(check - COMMAND ${CMAKE_CTEST_COMMAND} -C $ - DEPENDS ${STUMPLESS_FUNCTION_TESTS} -) +if(CMAKE_CONFIGURATION_TYPES) + add_custom_target(check + COMMAND ${CMAKE_CTEST_COMMAND} -C $ + DEPENDS ${STUMPLESS_FUNCTION_TESTS} + ) +else() + add_custom_target(check + COMMAND ${CMAKE_CTEST_COMMAND} + DEPENDS ${STUMPLESS_FUNCTION_TESTS} + ) +endif() # examples