diff --git a/CMakeLists.txt b/CMakeLists.txt index 1536179f35..ef08ba5190 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,11 +370,17 @@ macro (sources_hook) endif() if(QuadMath_FOUND) get_target_property(qm_defs QuadMath::QuadMath INTERFACE_COMPILE_DEFINITIONS) - list(APPEND qm_defs HAVE_QUAD=1) + get_target_property(qm_options QuadMath::QuadMath INTERFACE_COMPILE_OPTIONS) + if(qm_defs) + list(APPEND qm_defs HAVE_QUAD=1) + else() + set(qm_defs HAVE_QUAD=1) + endif() set_source_files_properties(opm/models/nonlinear/newtonmethodparams.cpp opm/models/utils/parametersystem.cpp opm/models/utils/simulatorutils.cpp - PROPERTIES COMPILE_DEFINITIONS "${qm_defs}") + PROPERTIES COMPILE_DEFINITIONS "${qm_defs}" + COMPILE_OPTIONS "${qm_options}") endif() endmacro (sources_hook)