Browse Source

refactor: split core ffi module

master
Dnomd343 8 months ago
parent
commit
8a480a8514
  1. 1
      src/CMakeLists.txt
  2. 8
      src/core/CMakeLists.txt
  3. 8
      src/core_ffi/CMakeLists.txt
  4. 0
      src/core_ffi/all_cases.cc
  5. 0
      src/core_ffi/include/klotski.h
  6. 4
      src/core_test/CMakeLists.txt

1
src/CMakeLists.txt

@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.12)
add_subdirectory(core)
add_subdirectory(core_ffi)
add_subdirectory(core_test)
#project(klotski-cli LANGUAGES C)

8
src/core/CMakeLists.txt

@ -6,7 +6,6 @@ set(CMAKE_CXX_STANDARD 23)
set(KLOTSKI_CORE_SRC
all_cases/basic_ranges.cc
all_cases/all_cases.cc
ffi/all_cases.cc
common_code/common_code.cc
common_code/serialize.cc
common_code/sundry.cc
@ -21,7 +20,8 @@ set(KLOTSKI_CORE_SRC
)
add_library(klotski_core STATIC ${KLOTSKI_CORE_SRC})
target_compile_options(klotski_core PRIVATE -fno-rtti -fno-exceptions)
target_include_directories(klotski_core PUBLIC utils all_cases raw_code short_code common_code)
target_include_directories(klotski_core PUBLIC
utils all_cases
raw_code short_code common_code)
# TODO: just for dev testing
add_executable(klotski_core_bin main.cc)
target_link_libraries(klotski_core_bin PRIVATE klotski_core)

8
src/core_ffi/CMakeLists.txt

@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.12)
project(core_ffi LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
add_library(klotski all_cases.cc)
target_include_directories(klotski PUBLIC include)
target_link_libraries(klotski PRIVATE klotski_core)

0
src/core/ffi/all_cases.cc → src/core_ffi/all_cases.cc

0
src/core/ffi/klotski.h → src/core_ffi/include/klotski.h

4
src/core_test/CMakeLists.txt

@ -3,15 +3,13 @@ project(core-test LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(KLOTSKI_TEST_DEPS klotski_core
set(KLOTSKI_TEST_DEPS klotski klotski_core
GTest::gtest_main bs::thread_pool md5sum xxHash::xxhash)
# ------------------------------------------------------------------------------------ #
include_directories(utility)
include_directories(${KLOTSKI_ROOT_DIR}/src/core/ffi)
# ------------------------------------------------------------------------------------ #
set(KLOTSKI_TEST_CASES_SRC

Loading…
Cancel
Save