update
This commit is contained in:
parent
d4571097ba
commit
5e423a44b2
@ -4,30 +4,30 @@ project(dna LANGUAGES CXX)
|
|||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
Message("It's in [Release] mode")
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
else()
|
|
||||||
Message("It's in [Debug] mode")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message("It's in [${CMAKE_BUILD_TYPE}] mode")
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
find_package(OpenMP REQUIRED)
|
||||||
|
if(MSVC)
|
||||||
|
add_compile_options(-openmp:llvm)
|
||||||
|
else()
|
||||||
|
add_compile_options(-fopenmp)
|
||||||
|
link_libraries(OpenMP::OpenMP_CXX)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(pybind11)
|
add_subdirectory(pybind11)
|
||||||
|
|
||||||
include_directories(src/tools)
|
include_directories(src/tools)
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
add_compile_options(/openmp:llvm)
|
|
||||||
else()
|
|
||||||
add_compile_options(-fopenmp)
|
|
||||||
add_link_options(-fopenmp)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
file(GLOB_RECURSE SRC CONFIGURE_DEPENDS src/*.cpp src/*.h src/*.hpp)
|
file(GLOB_RECURSE SRC CONFIGURE_DEPENDS src/*.cpp src/*.h src/*.hpp)
|
||||||
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}_bin ${SRC})
|
add_executable(${PROJECT_NAME}_bin ${SRC})
|
||||||
|
|
||||||
pybind11_add_module(${PROJECT_NAME} ${SRC})
|
pybind11_add_module(${PROJECT_NAME} ${SRC})
|
||||||
|
Loading…
Reference in New Issue
Block a user