diff --git a/data/tests/CMakeLists.txt b/data/tests/CMakeLists.txt index a2c11a0ca3..50aa18f26d 100644 --- a/data/tests/CMakeLists.txt +++ b/data/tests/CMakeLists.txt @@ -11,11 +11,11 @@ endif() # Create the test file. This is ugly because we need to replace variables # and use generator expressions. configure_file(rulesets.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/rulesets.cpp.in) -file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rulesets.cpp +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$/rulesets.cpp INPUT ${CMAKE_CURRENT_BINARY_DIR}/rulesets.cpp.in) -add_executable(test_rulesets ${CMAKE_CURRENT_BINARY_DIR}/rulesets.cpp) +add_executable(test_rulesets ${CMAKE_CURRENT_BINARY_DIR}/$/rulesets.cpp) target_link_libraries(test_rulesets PRIVATE Qt5::Test) add_test(NAME test_rulesets - COMMAND test_rulesets + COMMAND "${CMAKE_BINARY_DIR}/$/test_rulesets" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") diff --git a/server/tests/CMakeLists.txt b/server/tests/CMakeLists.txt index 1651e29708..12b2d44914 100644 --- a/server/tests/CMakeLists.txt +++ b/server/tests/CMakeLists.txt @@ -3,11 +3,11 @@ set(CMAKE_AUTOMOC ON) # Create the test file. This is ugly because we need to replace variables # and use generator expressions. configure_file(cli.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/cli.cpp.in) -file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cli.cpp +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$/cli.cpp INPUT ${CMAKE_CURRENT_BINARY_DIR}/cli.cpp.in) -add_executable(test_server_cli ${CMAKE_CURRENT_BINARY_DIR}/cli.cpp) +add_executable(test_server_cli ${CMAKE_CURRENT_BINARY_DIR}/$/cli.cpp) target_link_libraries(test_server_cli PRIVATE Qt5::Test) add_test(NAME test_server_cli - COMMAND test_server_cli + COMMAND "${CMAKE_BINARY_DIR}/$/test_server_cli" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")