mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Extracts the full compiler path and feeds it to cmake.
Previously, specifying the compiler name with a variable
to configure ("configure CC=gcc") lead to CMake complaining
that <builddir>/$CC was not a valid path. This patch fixes
this by extracting the full path with "which <compiler>".
Should fix issue #355.
This commit is contained in:
committed by
Bård Skaflestad
parent
7d86ae5453
commit
23499b7616
6
cmake/Scripts/configure
vendored
6
cmake/Scripts/configure
vendored
@@ -453,11 +453,11 @@ for a in "${VARS[@]}"; do
|
||||
;;
|
||||
CC=*)
|
||||
# special processing for compiler options
|
||||
a=${a#CC=}
|
||||
a=`which ${a#CC=}`
|
||||
c_compiler=" -DCMAKE_C_COMPILER=\"${a/\"/\\\"}\""
|
||||
;;
|
||||
CXX=*)
|
||||
a=${a#CXX=}
|
||||
a=`which ${a#CXX=}`
|
||||
cxx_compiler=" -DCMAKE_CXX_COMPILER=\"${a/\"/\\\"}\""
|
||||
;;
|
||||
CFLAGS=*)
|
||||
@@ -469,7 +469,7 @@ for a in "${VARS[@]}"; do
|
||||
cxx_opts=" -DCMAKE_CXX_FLAGS=\"${a/\"/\\\"}\""
|
||||
;;
|
||||
FC=*)
|
||||
a=${a#FC=}
|
||||
a=`which ${a#FC=}`
|
||||
fort_compiler=" -DCMAKE_Fortran_COMPILER=\"${a/\"/\\\"}\""
|
||||
;;
|
||||
FFLAGS=*)
|
||||
|
||||
Reference in New Issue
Block a user