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

[cmake] disable lto for gcc < 8

parent 1c43ee1e
No related branches found
No related tags found
2 merge requests!10Fix compilation with new clang,!6Merge pybind
......@@ -149,7 +149,11 @@ function(dune_pybindxi_add_module target_name)
return()
endif()
_dune_pybind11_add_lto_flags(${target_name} ${ARG_THIN_LTO})
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8)
message(WARNING "not enabling LTO although it was requested due to buggy gcc version")
else()
_dune_pybind11_add_lto_flags(${target_name} ${ARG_THIN_LTO})
endif()
if(MSVC)
# /MP enables multithreaded builds (relevant when there are many files), /bigobj is
......
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