mirror of https://github.com/dnomd343/klotski.git
Dnomd343
2 years ago
8 changed files with 41 additions and 19 deletions
@ -1,32 +1,47 @@ |
|||
cmake_minimum_required(VERSION 3.0) |
|||
|
|||
################################################################ |
|||
################################################################################ |
|||
|
|||
enable_testing() |
|||
|
|||
set(TEST_DEPS gtest gtest_main klotski) |
|||
|
|||
################################################################ |
|||
################################################################################ |
|||
|
|||
unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) |
|||
include_directories(../third_party/md5) |
|||
add_library(md5 STATIC ../third_party/md5/md5.cpp) |
|||
|
|||
################################################################ |
|||
################################################################################ |
|||
|
|||
include_directories(../src/klotski_core/utils) |
|||
include_directories(../src/klotski_core/all_cases) |
|||
|
|||
set(TEST_BASIC_SRC utils.cc all_cases.cc) |
|||
list(TRANSFORM TEST_BASIC_SRC PREPEND "basic/") |
|||
add_executable(test_basic ${TEST_BASIC_SRC}) |
|||
#add_executable(test_basic |
|||
# basic/utils.cc |
|||
# basic/all_cases.cc |
|||
#) |
|||
target_link_libraries(test_basic PUBLIC ${TEST_DEPS} md5) |
|||
add_test(NAME basic COMMAND test_basic) |
|||
|
|||
################################################################################ |
|||
|
|||
include_directories(../src/klotski_core/raw_code) |
|||
include_directories(../src/klotski_core/short_code) |
|||
include_directories(../src/klotski_core/common_code) |
|||
|
|||
add_executable(test_basic utils.cc all_cases.cc) |
|||
target_link_libraries(test_basic PUBLIC ${TEST_DEPS} md5) |
|||
add_test(NAME basic COMMAND test_basic) |
|||
|
|||
add_executable(test_codec short_code.cc raw_code.cc common_code.cc) |
|||
set(TEST_CODEC_SRC short_code.cc raw_code.cc common_code.cc) |
|||
list(TRANSFORM TEST_CODEC_SRC PREPEND "codec/") |
|||
add_executable(test_codec ${TEST_CODEC_SRC}) |
|||
#add_executable(test_codec |
|||
# codec/short_code.cc |
|||
# codec/common_code.cc |
|||
# codec/raw_code.cc |
|||
#) |
|||
target_link_libraries(test_codec ${TEST_DEPS}) |
|||
add_test(NAME codec COMMAND test_codec) |
|||
|
|||
################################################################ |
|||
################################################################################ |
|||
|
Loading…
Reference in new issue