Skip to content

Commit

Permalink
fix typos and add src/python
Browse files Browse the repository at this point in the history
  • Loading branch information
j042 committed Jul 26, 2024
1 parent a7b50ea commit fb252d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
20 changes: 4 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif()

# options
option(BUILD_EXAMPLES "build examples" ON)
option(BUILD_FORTRAN_MODULE "build fortran module" ON)
option(SPLINEPY_EXT "add splinepy extension" ON)
option(NAPF_BUILD_PYTHON "build python module" ON)

# config
set(exe_dest "bin")
Expand Down Expand Up @@ -49,19 +47,9 @@ else()
endif()
target_compile_features(napf INTERFACE cxx_std_11)

if(BUILD_FORTRAN_MODULE)
message("*** building additional fortran module ***")
message("*** ------ NOT IMPLEMENTED ----------- ***")
endif(BUILD_FORTRAN_MODULE)

if(BUILD_EXAMPLES)
message("*** building examples ***")
message("*** ------ NOT IMPLEMENTED ----------- ***")
endif(BUILD_EXAMPLES)

if(SPLINEPY_EXT)
target_compile_definitions(napf INTERFACE -DSPLINEPYEXT)
endif(SPLINEPY_EXT)
if(NAPF_BUILD_PYTHON)
add_subdirectory(src/python)
endif()

# configure config files
include(CMakePackageConfigHelpers)
Expand Down
8 changes: 4 additions & 4 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
find_package(pybind11 CONFIG REQUIRED)

python_add_library(_napf MODULE ${NAPF_SOURCES})
target_link_libraries(_napf PRIVATE pybind11::headers)
target_compile_definitions(_napf PRIVATE $<$<NOT:$<CONFIG:Debug>>:NDEBUG)
target_link_libraries(_napf PRIVATE pybind11::headers napf)
target_compile_definitions(_napf PRIVATE $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(funi PRIVATE $<$<NOT:$<CONFIG:Debug>>:-O3>)
target_compile_options(_napf PRIVATE $<$<NOT:$<CONFIG:Debug>>:-O3>)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSCV")
target_compile_options(funi PRIVATE $<$<NOT:$<CONFIG:Debug>>:/O2>)
target_compile_options(_napf PRIVATE $<$<NOT:$<CONFIG:Debug>>:/O2>)
endif()

install(
Expand Down

0 comments on commit fb252d6

Please sign in to comment.