diff options
author | John Donoghue <john.donoghue@ieee.org> | 2017-02-12 18:57:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-23 12:16:16 (GMT) |
commit | 7788db9c4ee673fda9181de656363884d790592a (patch) | |
tree | aff72ca76819cbed7f4840066740483d48d954c9 /Auxiliary | |
parent | 28df39ca8efbd3380e81977954aeda93ce53db10 (diff) | |
download | CMake-7788db9c4ee673fda9181de656363884d790592a.zip CMake-7788db9c4ee673fda9181de656363884d790592a.tar.gz CMake-7788db9c4ee673fda9181de656363884d790592a.tar.bz2 |
cmake.m4: do not set _XXXFLAGS or _LIBS var if already set
* Auxiliary/cmake.m4 (CMAKE_FIND_PACKAGE): change var tests from -n to -z
to check if var is already set before calling cmake
Fixes: #14460, #16663
Diffstat (limited to 'Auxiliary')
-rw-r--r-- | Auxiliary/cmake.m4 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Auxiliary/cmake.m4 b/Auxiliary/cmake.m4 index 3ef4c16..7beff41 100644 --- a/Auxiliary/cmake.m4 +++ b/Auxiliary/cmake.m4 @@ -24,10 +24,10 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1. This overrides the cmake output])d failed=false AC_MSG_CHECKING([for $1]) -if test -n "$1[]_$2[]FLAGS"; then +if test -z "${$1[]_$2[]FLAGS}"; then $1[]_$2[]FLAGS=`$CMAKE_BINARY --find-package "-DNAME=$1" "-DCOMPILER_ID=m4_default([$3], [GNU])" "-DLANGUAGE=$2" -DMODE=COMPILE $4` || failed=true fi -if test -n "$1[]_LIBS"; then +if test -z "${$1[]_LIBS}"; then $1[]_LIBS=`$CMAKE_BINARY --find-package "-DNAME=$1" "-DCOMPILER_ID=m4_default([$3], [GNU])" "-DLANGUAGE=$2" -DMODE=LINK $4` || failed=true fi |