From 7cc07a326118af0c5abcc91c83069ada42fe8a53 Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Fri, 29 Dec 2023 20:25:47 +0100 Subject: [PATCH] Fix build with multi-config generators Reported by @jwrober. --- data/tests/CMakeLists.txt | 6 +++--- server/tests/CMakeLists.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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}")