Skip to content
Snippets Groups Projects
Verified Commit 1c43ee1e authored by René Fritze's avatar René Fritze
Browse files

[cmake] never strip objects and restrict dep make to -j1

parent 67288746
No related branches found
No related tags found
2 merge requests!10Fix compilation with new clang,!6Merge pybind
...@@ -143,7 +143,7 @@ function(dune_pybindxi_add_module target_name) ...@@ -143,7 +143,7 @@ function(dune_pybindxi_add_module target_name)
endif() endif()
# Make sure C++11/14 are enabled # Make sure C++11/14 are enabled
target_compile_options(${target_name} PUBLIC ${PYBIND11_CPP_STANDARD}) target_compile_options(${target_name} PUBLIC ${PYBIND11_CPP_STANDARD} -g)
if(ARG_NO_EXTRAS) if(ARG_NO_EXTRAS)
return() return()
...@@ -151,19 +151,6 @@ function(dune_pybindxi_add_module target_name) ...@@ -151,19 +151,6 @@ function(dune_pybindxi_add_module target_name)
_dune_pybind11_add_lto_flags(${target_name} ${ARG_THIN_LTO}) _dune_pybind11_add_lto_flags(${target_name} ${ARG_THIN_LTO})
if (NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug)
# Strip unnecessary sections of the binary on Linux/Mac OS
if(CMAKE_STRIP)
if(APPLE)
add_custom_command(TARGET ${target_name} POST_BUILD
COMMAND ${CMAKE_STRIP} -x $<TARGET_FILE:${target_name}>)
else()
add_custom_command(TARGET ${target_name} POST_BUILD
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${target_name}>)
endif()
endif()
endif()
if(MSVC) if(MSVC)
# /MP enables multithreaded builds (relevant when there are many files), /bigobj is # /MP enables multithreaded builds (relevant when there are many files), /bigobj is
# needed for bigger binding projects due to the limit to 64k addressable sections # needed for bigger binding projects due to the limit to 64k addressable sections
...@@ -194,7 +181,7 @@ macro(dxt_add_make_dependent_bindings) ...@@ -194,7 +181,7 @@ macro(dxt_add_make_dependent_bindings)
set(tdir ${${_mod}_binary_dir}) set(tdir ${${_mod}_binary_dir})
if(IS_DIRECTORY ${tdir}) if(IS_DIRECTORY ${tdir})
add_custom_target( ${_mod}_bindings add_custom_target( ${_mod}_bindings
COMMAND ${CMAKE_COMMAND} --build ${tdir} --target bindings) COMMAND ${CMAKE_COMMAND} --build ${tdir} --target bindings -- -j1)
add_dependencies(dependent_bindings ${_mod}_bindings) add_dependencies(dependent_bindings ${_mod}_bindings)
endif() endif()
endforeach() endforeach()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment