From 6c2feef64488c051b32f7de22316c3760cc08651 Mon Sep 17 00:00:00 2001 From: hashlag <90853356+hashlag@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:24:26 +0300 Subject: [PATCH] Extract sources list for the test binary into a CMake variable --- ChaosTests/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChaosTests/CMakeLists.txt b/ChaosTests/CMakeLists.txt index 5a3635d..c52357b 100644 --- a/ChaosTests/CMakeLists.txt +++ b/ChaosTests/CMakeLists.txt @@ -11,7 +11,10 @@ FetchContent_Declare( set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) -add_executable(ChaosTests Md4HasherTests.cpp Md5HasherTests.cpp) +set(ChaosTests_SOURCE Md4HasherTests.cpp + Md5HasherTests.cpp) + +add_executable(ChaosTests ${ChaosTests_SOURCE}) target_link_libraries(ChaosTests gtest gtest_main) target_include_directories(ChaosTests PRIVATE $