From 7b04b76112076612208f2976580ec67ca30aae21 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 27 Apr 2019 17:55:06 +0200 Subject: [PATCH] check for undefined variables defined but empty variables are different --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cfe47248..e0ec3d136 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,14 +138,14 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "PERFORMANCE") endif () # $OPTIMIZATION takes precedence over $BUILD_TYPE defaults -if (OPTIMIZATION STREQUAL "") +if (OPTIMIZATION STREQUAL "" OR NOT DEFINED OPTIMIZATION) set (OPTIMIZATION "${OPTI}") else () set (OPTIMIZATION "${OPTIMIZATION}") endif () # $OPENMP takes precedence over $BUILD_TYPE defaults -if (OPENMP STREQUAL "") +if (OPENMP STREQUAL "" OR NOT DEFINED OPENMP) set (OPENMP "${PARALLEL}") else () set(OPENMP "${OPENMP}")