From ab8a6ad46e3bdd249245737b8fe78f31d060f88d Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sun, 22 Sep 2024 16:58:07 +0800 Subject: [PATCH] update --- CMakeLists.txt | 25 +++++++++++++++++++++++-- pybind11 | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) create mode 160000 pybind11 diff --git a/CMakeLists.txt b/CMakeLists.txt index 81b823a..f8dd4eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,25 @@ -cmake_minimum_required(VERSION "3.10) +cmake_minimum_required(VERSION 3.10) -project(dna) +project(dna LANGUAGES CXX) + +if(CMAKE_BUILD_TYPE STREQUAL Release) + Message("It's in [Release] mode") +else() + Message("It's in [Debug] mode") +endif() + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_subdirectory(pybind11) + +include_directories(src/tools) + +file(GLOB SRC CONFIGURE_DEPENDS src/*.cpp src/*.h src/*.hpp) + +add_executable(${PROJECT_NAME}_bin ${SRC}) + +pybind11_add_module(${PROJECT_NAME} ${SRC}) + +target_compile_definitions(${PROJECT_NAME} PRIVATE DNA_IS_PYBIND) diff --git a/pybind11 b/pybind11 new file mode 160000 index 0000000..1f8b4a7 --- /dev/null +++ b/pybind11 @@ -0,0 +1 @@ +Subproject commit 1f8b4a7f1a1c5cc9bd6e0d63fe15540e6c458b24