[cmake] Make sure that string(REPACE always has 4 arguments.
This was missing proper quoting for the case that dune-common_CXX_FLAGS is empty. Error I got was: ``` -- Version 2.10.0 of dune-common from /home/mblatt/src/dune/opm-master/dune-common/opm-parallel CMake Error at CMakeLists.txt:369 (string): string sub-command REPLACE requires at least four arguments. -- Configuring incomplete, errors occurred! ```
This commit is contained in:
parent
a456c36a31
commit
083451817d
@ -366,7 +366,7 @@ endif()
|
||||
find_package(dune-common REQUIRED)
|
||||
opm_need_version_of ("dune-common")
|
||||
target_include_directories(dunecommon INTERFACE ${dune-common_INCLUDE_DIRS})
|
||||
string(REPLACE " " ";" dflags ${dune-common_CXX_FLAGS})
|
||||
string(REPLACE " " ";" dflags "${dune-common_CXX_FLAGS}")
|
||||
target_compile_options(dunecommon INTERFACE ${dflags})
|
||||
target_compile_definitions(dunecommon INTERFACE DUNE_COMMON_VERSION_MAJOR=${DUNE_COMMON_VERSION_MAJOR})
|
||||
target_compile_definitions(dunecommon INTERFACE DUNE_COMMON_VERSION_MINOR=${DUNE_COMMON_VERSION_MINOR})
|
||||
|
Loading…
Reference in New Issue
Block a user