CMake: Link instead of recompile
This commit is contained in:
+3
-2
@@ -77,11 +77,12 @@ target_include_directories(${PROJECT}-test PRIVATE
|
|||||||
|
|
||||||
if (RUC_BUILD_TESTS)
|
if (RUC_BUILD_TESTS)
|
||||||
# Define test source files
|
# Define test source files
|
||||||
file(GLOB_RECURSE TEST_SOURCES "test/*.cpp")
|
file(GLOB_RECURSE TEST_SOURCES "test/unit/*.cpp")
|
||||||
set(TEST_SOURCES ${TEST_SOURCES} ${LIBRARY_SOURCES})
|
|
||||||
|
|
||||||
add_executable(${PROJECT}-unit-test ${TEST_SOURCES})
|
add_executable(${PROJECT}-unit-test ${TEST_SOURCES})
|
||||||
target_include_directories(${PROJECT}-unit-test PRIVATE
|
target_include_directories(${PROJECT}-unit-test PRIVATE
|
||||||
"src"
|
"src"
|
||||||
"test")
|
"test")
|
||||||
|
target_link_libraries(${PROJECT}-unit-test ruc)
|
||||||
|
target_link_libraries(${PROJECT}-unit-test ruc-test)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user