SimpleDNA/CMakeLists.txt
2024-10-20 12:48:05 +08:00

38 lines
963 B
CMake

cmake_minimum_required(VERSION 3.10)
project(dna)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message("It's in ${CMAKE_BUILD_TYPE} mode.")
file(GLOB_RECURSE SRC_HPPS CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.hpp)
foreach(SRC_HPP IN LISTS SRC_HPPS)
message("found header : ${SRC_HPP}")
endforeach()
file(GLOB_RECURSE SRC_CPPS CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp)
foreach(SRC_CPP IN LISTS SRC_CPPS)
message("found cpp : ${SRC_CPP}")
endforeach()
# add_executable(${PROJECT_NAME}_bin ${SRC_HPPS} ${SRC_CPPS})
set(TBB_TEST OFF)
add_subdirectory(pybind11)
# add_subdirectory(oneTBB)
pybind11_add_module(${PROJECT_NAME} ${SRC_HPPS} ${SRC_CPPS})
target_compile_definitions(${PROJECT_NAME} PRIVATE DNA_IS_PYBIND)
# target_link_libraries(${PROJECT_NAME} PRIVATE TBB::tbb)