mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix logic bug and make language explicit
The operator precedence in CMake can be surprising, so add parenthesis to make in unambigious. Also, make it more explicit from which language we get the default options. (They are all set from the settings given for C++; why would have different optimization options for C and C++?)
This commit is contained in:
committed by
Bård Skaflestad
parent
b6c5d3572d
commit
b13f9d251b
@@ -37,8 +37,8 @@ if (CXX_COMPAT_GCC)
|
||||
endif (WITH_NATIVE)
|
||||
|
||||
# default optimization flags, if not set by user
|
||||
set_default_option (_opt_dbg "-O0" "(^|\ )-O")
|
||||
set_default_option (_opt_rel "-O3" "(^|\ )-O")
|
||||
set_default_option (CXX _opt_dbg "-O0" "(^|\ )-O")
|
||||
set_default_option (CXX _opt_rel "-O3" "(^|\ )-O")
|
||||
|
||||
# use these options for debug builds - no optimizations
|
||||
add_options (ALL_LANGUAGES "${_prof_DEBUG}" ${_opt_dbg} "-DDEBUG")
|
||||
|
||||
Reference in New Issue
Block a user