mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
cmake variable NG_COMPILE_FLAGS to set additional compile options
This commit is contained in:
parent
5e1aaddd14
commit
7a1344bfcb
@ -34,6 +34,8 @@ option( BUILD_FOR_CONDA "Link python libraries only to executables" OFF)
|
|||||||
|
|
||||||
option( USE_SUPERBUILD "use ccache" ON)
|
option( USE_SUPERBUILD "use ccache" ON)
|
||||||
|
|
||||||
|
set(NG_COMPILE_FLAGS "" CACHE STRING "Additional compile flags")
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_modules")
|
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_modules")
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
@ -145,6 +145,7 @@ set_vars( NETGEN_CMAKE_ARGS
|
|||||||
CHECK_RANGE
|
CHECK_RANGE
|
||||||
BUILD_STUB_FILES
|
BUILD_STUB_FILES
|
||||||
BUILD_FOR_CONDA
|
BUILD_FOR_CONDA
|
||||||
|
NG_COMPILE_FLAGS
|
||||||
)
|
)
|
||||||
|
|
||||||
# propagate all variables set on the command line using cmake -DFOO=BAR
|
# propagate all variables set on the command line using cmake -DFOO=BAR
|
||||||
|
@ -14,6 +14,8 @@ add_library(ngcore SHARED
|
|||||||
version.cpp
|
version.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_compile_options(ngcore PUBLIC "${NG_COMPILE_FLAGS}")
|
||||||
|
|
||||||
# Pybind11 2.3 Issue https://github.com/pybind/pybind11/issues/1604
|
# Pybind11 2.3 Issue https://github.com/pybind/pybind11/issues/1604
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
target_compile_options(ngcore PUBLIC -fsized-deallocation -faligned-allocation)
|
target_compile_options(ngcore PUBLIC -fsized-deallocation -faligned-allocation)
|
||||||
|
Loading…
Reference in New Issue
Block a user