|
@ -2,11 +2,6 @@ cmake_minimum_required(VERSION 3.0) |
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
####################################################################################### |
|
|
|
|
|
|
|
|
enable_testing() |
|
|
|
|
|
set(TEST_DEPS gtest gtest_main klotski) |
|
|
|
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
|
|
|
|
|
|
|
|
|
unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) |
|
|
unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) |
|
|
include_directories(../third_party/md5) |
|
|
include_directories(../third_party/md5) |
|
|
add_library(md5 STATIC ../third_party/md5/md5.cpp) |
|
|
add_library(md5 STATIC ../third_party/md5/md5.cpp) |
|
@ -19,6 +14,19 @@ add_library(tiny_pool STATIC ../third_party/tiny_thread_pool/tiny_pool/tiny_pool |
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
####################################################################################### |
|
|
|
|
|
|
|
|
|
|
|
enable_testing() |
|
|
|
|
|
set(TEST_DEPS |
|
|
|
|
|
gtest |
|
|
|
|
|
gtest_main |
|
|
|
|
|
klotski |
|
|
|
|
|
md5 |
|
|
|
|
|
tiny_pool |
|
|
|
|
|
absl::flat_hash_map |
|
|
|
|
|
absl::flat_hash_set |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
|
|
|
|
|
|
include_directories(../src/klotski_core) |
|
|
include_directories(../src/klotski_core) |
|
|
include_directories(../src/klotski_core/utils) |
|
|
include_directories(../src/klotski_core/utils) |
|
|
include_directories(../src/klotski_core/all_cases) |
|
|
include_directories(../src/klotski_core/all_cases) |
|
@ -37,7 +45,7 @@ set(TEST_BASIC_SRC |
|
|
basic/all_cases.cc |
|
|
basic/all_cases.cc |
|
|
) |
|
|
) |
|
|
add_executable(test_basic ${TEST_BASIC_SRC}) |
|
|
add_executable(test_basic ${TEST_BASIC_SRC}) |
|
|
target_link_libraries(test_basic PUBLIC ${TEST_DEPS} md5) |
|
|
target_link_libraries(test_basic PUBLIC ${TEST_DEPS}) |
|
|
add_test(NAME basic COMMAND test_basic) |
|
|
add_test(NAME basic COMMAND test_basic) |
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
####################################################################################### |
|
@ -55,7 +63,7 @@ add_test(NAME codec COMMAND test_codec) |
|
|
|
|
|
|
|
|
set(TEST_CORE_SRC core/core.cc) |
|
|
set(TEST_CORE_SRC core/core.cc) |
|
|
add_executable(test_core ${TEST_CORE_SRC}) |
|
|
add_executable(test_core ${TEST_CORE_SRC}) |
|
|
target_link_libraries(test_core ${TEST_DEPS} tiny_pool absl::flat_hash_map) |
|
|
target_link_libraries(test_core ${TEST_DEPS}) |
|
|
add_test(NAME core COMMAND test_core) |
|
|
add_test(NAME core COMMAND test_core) |
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
####################################################################################### |
|
@ -66,7 +74,7 @@ set(TEST_GROUP_SRC |
|
|
group/group_info.cc |
|
|
group/group_info.cc |
|
|
) |
|
|
) |
|
|
add_executable(test_group ${TEST_GROUP_SRC}) |
|
|
add_executable(test_group ${TEST_GROUP_SRC}) |
|
|
target_link_libraries(test_group ${TEST_DEPS} md5 tiny_pool absl::flat_hash_map) |
|
|
target_link_libraries(test_group ${TEST_DEPS}) |
|
|
add_test(NAME group COMMAND test_group) |
|
|
add_test(NAME group COMMAND test_group) |
|
|
|
|
|
|
|
|
####################################################################################### |
|
|
####################################################################################### |
|
|