CMake: Compile all sources for the test suite binary

This commit is contained in:
Riyyi
2022-01-24 01:03:30 +01:00
parent 5d5c37a496
commit 8c8eb01d18
+2 -1
View File
@@ -54,8 +54,9 @@ set(PROJECT_SOURCES ${PROJECT_SOURCES})
# Define test source files # Define test source files
file(GLOB_RECURSE TEST_SOURCES "test/*.cpp") file(GLOB_RECURSE TEST_SOURCES "test/*.cpp")
file(GLOB_RECURSE MAIN_SOURCES "src/*/*.cpp") file(GLOB_RECURSE MAIN_SOURCES "src/*.cpp")
set(TEST_SOURCES ${TEST_SOURCES} ${MAIN_SOURCES}) set(TEST_SOURCES ${TEST_SOURCES} ${MAIN_SOURCES})
list(REMOVE_ITEM TEST_SOURCES "${CMAKE_SOURCE_DIR}/src/main.cpp")
# ------------------------------------------ # ------------------------------------------