diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index f0fd95de..c940669a 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -42,6 +42,13 @@ foreach(test ${test_list}) endforeach() if (TARGET UNIT_ign_TEST) + set_tests_properties( + UNIT_ign_TEST + PROPERTIES + ENVIRONMENT + "IGN_CONFIG_PATH=${CMAKE_BINARY_DIR}/test/conf/$" + ) + # Running `ign launch` on macOS has problems when run with /usr/bin/ruby # due to System Integrity Protection (SIP). Try to find ruby from # homebrew as a workaround. @@ -49,9 +56,6 @@ if (TARGET UNIT_ign_TEST) find_program(BREW_RUBY ruby HINTS /usr/local/opt/ruby/bin) endif() - target_compile_definitions(UNIT_ign_TEST PRIVATE - "IGN_CONFIG_PATH=\"${CMAKE_BINARY_DIR}/test/conf\"") - target_compile_definitions(UNIT_ign_TEST PRIVATE "BREW_RUBY=\"${BREW_RUBY} \"")