mirror of https://github.com/dnomd343/klotski.git
Dnomd343
2 weeks ago
5 changed files with 43 additions and 48 deletions
@ -1,67 +1,69 @@ |
|||
cmake_minimum_required(VERSION 3.12) |
|||
project(core VERSION 0.2.1 LANGUAGES CXX) |
|||
project(core VERSION 0.0.1 LANGUAGES CXX) |
|||
|
|||
set(CMAKE_CXX_STANDARD 23) |
|||
|
|||
set(KLOTSKI_CORE_SRC |
|||
all_cases/internal/basic_ranges.cc |
|||
all_cases/internal/all_cases.cc |
|||
ranges/internal/spawn.cc |
|||
ranges/internal/ranges.cc |
|||
ranges/internal/derive.cc |
|||
|
|||
common_code/internal/common_code.cc |
|||
common_code/internal/serialize.cc |
|||
common_code/internal/mirror.cc |
|||
all_cases/internal/basic_ranges.cc |
|||
all_cases/internal/all_cases.cc |
|||
|
|||
raw_code/internal/raw_code.cc |
|||
raw_code/internal/convert.cc |
|||
raw_code/internal/mirror.cc |
|||
common_code/internal/common_code.cc |
|||
common_code/internal/serialize.cc |
|||
common_code/internal/mirror.cc |
|||
|
|||
short_code/internal/convert.cc |
|||
short_code/internal/serialize.cc |
|||
raw_code/internal/raw_code.cc |
|||
raw_code/internal/convert.cc |
|||
raw_code/internal/mirror.cc |
|||
|
|||
mover/internal/mover.cc |
|||
short_code/internal/convert.cc |
|||
short_code/internal/serialize.cc |
|||
|
|||
fast_cal/internal/fast_cal.cc |
|||
mover/internal/mover.cc |
|||
|
|||
group/internal/group_union.cc |
|||
group/internal/group.cc |
|||
group/internal/group_cases.cc |
|||
group/internal/group_union.cc |
|||
group/internal/group.cc |
|||
group/internal/group_cases.cc |
|||
|
|||
ranges/internal/spawn.cc |
|||
ranges/internal/ranges.cc |
|||
ranges/internal/derive.cc |
|||
fast_cal/internal/fast_cal.cc |
|||
) |
|||
|
|||
add_library(klotski_core STATIC ${KLOTSKI_CORE_SRC}) |
|||
target_compile_options(klotski_core PRIVATE -fno-rtti -fno-exceptions) # option for `-fvisibility=hidden` |
|||
target_include_directories(klotski_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
|||
target_link_libraries(klotski_core PRIVATE absl::flat_hash_map) |
|||
target_link_libraries(klotski_core PUBLIC phmap) |
|||
target_link_libraries(klotski_core PUBLIC phmap::phmap) |
|||
add_library(klotski::core ALIAS klotski_core) |
|||
|
|||
# TODO: just for dev testing |
|||
add_executable(klotski_core_bin main.cc) |
|||
target_link_libraries(klotski_core_bin PRIVATE klotski_core) |
|||
|
|||
add_executable(codec_benchmark benchmark/codec.cc) |
|||
target_compile_options(codec_benchmark PRIVATE -fno-rtti -fno-exceptions -fno-access-control) |
|||
target_link_libraries(codec_benchmark PRIVATE klotski::core benchmark::benchmark_main) |
|||
set(KLSK_BENCHMARK_OPTS -fno-rtti -fno-exceptions -fno-access-control) |
|||
set(KLSK_BENCHMARK_LIBS klotski::core benchmark::benchmark_main bs::thread_pool) |
|||
|
|||
add_executable(group_benchmark benchmark/group.cc) |
|||
target_compile_options(group_benchmark PRIVATE -fno-rtti -fno-exceptions -fno-access-control) |
|||
target_link_libraries(group_benchmark PRIVATE klotski::core benchmark::benchmark_main) |
|||
add_executable(bm_klsk_codec benchmark/codec.cc) |
|||
target_compile_options(bm_klsk_codec PRIVATE ${KLSK_BENCHMARK_OPTS}) |
|||
target_link_libraries(bm_klsk_codec PRIVATE ${KLSK_BENCHMARK_LIBS}) |
|||
|
|||
add_executable(bm_all_cases benchmark/all_cases.cc) |
|||
target_compile_options(bm_all_cases PRIVATE -fno-rtti -fno-exceptions -fno-access-control) |
|||
target_link_libraries(bm_all_cases PRIVATE klotski::core benchmark::benchmark_main bs::thread_pool) |
|||
add_executable(bm_klsk_group benchmark/group.cc) |
|||
target_compile_options(bm_klsk_group PRIVATE ${KLSK_BENCHMARK_OPTS}) |
|||
target_link_libraries(bm_klsk_group PRIVATE ${KLSK_BENCHMARK_LIBS}) |
|||
|
|||
add_executable(bm_ranges benchmark/ranges.cc) |
|||
target_compile_options(bm_ranges PRIVATE -fno-rtti -fno-exceptions) |
|||
target_link_libraries(bm_ranges PRIVATE klotski::core benchmark::benchmark_main) |
|||
add_executable(bm_klsk_all_cases benchmark/all_cases.cc) |
|||
target_compile_options(bm_klsk_all_cases PRIVATE ${KLSK_BENCHMARK_OPTS}) |
|||
target_link_libraries(bm_klsk_all_cases PRIVATE ${KLSK_BENCHMARK_LIBS}) |
|||
|
|||
add_executable(bm_utility benchmark/utility.cc) |
|||
target_compile_options(bm_utility PRIVATE -fno-rtti -fno-exceptions) |
|||
target_link_libraries(bm_utility PRIVATE klotski::core benchmark::benchmark_main) |
|||
add_executable(bm_klsk_ranges benchmark/ranges.cc) |
|||
target_compile_options(bm_klsk_ranges PRIVATE ${KLSK_BENCHMARK_OPTS}) |
|||
target_link_libraries(bm_klsk_ranges PRIVATE ${KLSK_BENCHMARK_LIBS}) |
|||
|
|||
add_executable(bm_fast_cal benchmark/fast_cal.cc) |
|||
target_compile_options(bm_fast_cal PRIVATE -fno-rtti -fno-exceptions) |
|||
target_link_libraries(bm_fast_cal PRIVATE klotski::core benchmark::benchmark_main) |
|||
add_executable(bm_klsk_utility benchmark/utility.cc) |
|||
target_compile_options(bm_klsk_utility PRIVATE ${KLSK_BENCHMARK_OPTS}) |
|||
target_link_libraries(bm_klsk_utility PRIVATE ${KLSK_BENCHMARK_LIBS}) |
|||
|
|||
add_executable(bm_klsk_fast_cal benchmark/fast_cal.cc) |
|||
target_compile_options(bm_klsk_fast_cal PRIVATE ${KLSK_BENCHMARK_OPTS}) |
|||
target_link_libraries(bm_klsk_fast_cal PRIVATE ${KLSK_BENCHMARK_LIBS}) |
|||
|
Loading…
Reference in new issue