From d11605647ddb3f814ef8e50808a2c10d4fe7c9ed Mon Sep 17 00:00:00 2001 From: Michael Bloom Date: Sat, 30 Mar 2024 11:32:14 -0400 Subject: [PATCH] Remove file glob in favor of target sources --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20c3f66..5861044 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 3.15) project(testFFT) -file(GLOB test CONFIGURE_DEPENDS "test/*.cpp") - find_package(Catch2 REQUIRED) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -10,7 +8,8 @@ if ( CMAKE_COMPILER_IS_GNUCC ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion") endif() -add_executable(${PROJECT_NAME} ${test}) +add_executable(${PROJECT_NAME}) +target_sources(${PROJECT_NAME} PRIVATE test/testFFT.cpp test/testIIR.cpp) add_compile_definitions(CATCH_CONFIG_MAIN) include_directories(include) -target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain) +target_link_libraries(${PROJECT_NAME} PRIVATE Catch2::Catch2WithMain)