Browse Source

test: combine test deps

legacy
Dnomd343 2 years ago
parent
commit
5b092916c6
  1. 8
      test/CMakeLists.txt

8
test/CMakeLists.txt

@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.0)
enable_testing() enable_testing()
set(TEST_DEPS gtest gtest_main klotski)
################################################################ ################################################################
unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
@ -14,16 +16,14 @@ add_library(md5 STATIC ../third_party/md5/md5.cpp)
include_directories(../src/klotski_core/utils) include_directories(../src/klotski_core/utils)
add_executable(test_utils utils.cc) add_executable(test_utils utils.cc)
target_link_libraries(test_utils PUBLIC gtest gtest_main) target_link_libraries(test_utils PUBLIC ${TEST_DEPS})
target_link_libraries(test_utils PUBLIC klotski)
add_test(NAME utils COMMAND test_utils) add_test(NAME utils COMMAND test_utils)
################################################################ ################################################################
include_directories(../src/klotski_core/all_cases) include_directories(../src/klotski_core/all_cases)
add_executable(test_all_cases all_cases.cc) add_executable(test_all_cases all_cases.cc)
target_link_libraries(test_all_cases PUBLIC gtest gtest_main) target_link_libraries(test_all_cases PUBLIC ${TEST_DEPS} md5)
target_link_libraries(test_all_cases PUBLIC klotski md5)
add_test(NAME all_cases COMMAND test_all_cases) add_test(NAME all_cases COMMAND test_all_cases)
################################################################ ################################################################

Loading…
Cancel
Save