From: Matthias Maier Date: Fri, 16 May 2014 12:02:21 +0000 (+0000) Subject: CMake: Bugfix: Detect empty variables... X-Git-Tag: v8.2.0-rc1~484 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30d310382091a113ee45099ca0cb68b902cab01c;p=dealii.git CMake: Bugfix: Detect empty variables... git-svn-id: https://svn.dealii.org/trunk@32922 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_deal_ii_package_handle.cmake b/deal.II/cmake/macros/macro_deal_ii_package_handle.cmake index 3c7a0a5449..0038aa9229 100644 --- a/deal.II/cmake/macros/macro_deal_ii_package_handle.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_package_handle.cmake @@ -103,9 +103,9 @@ MACRO(DEAL_II_PACKAGE_HANDLE _feature _var) LIST(APPEND _clear ${_arg}) ENDIF() ELSE() - IF("${_arg}" STREQUAL "" OR ${_arg} MATCHES "-NOTFOUND") + IF("${${_arg}}" MATCHES "^\\s*$" OR "${${_arg}}" MATCHES "-NOTFOUND") IF(_required AND _fine) - IF("${_arg}" STREQUAL "") + IF("${${_arg}}" MATCHES "^\\s*$") MESSAGE(STATUS " ${_feature}_${_variable}: *** Required variable \"${_arg}\" empty ***" ) diff --git a/deal.II/cmake/modules/FindZLIB.cmake b/deal.II/cmake/modules/FindZLIB.cmake index d9022891b8..a3ecfe357d 100644 --- a/deal.II/cmake/modules/FindZLIB.cmake +++ b/deal.II/cmake/modules/FindZLIB.cmake @@ -41,11 +41,9 @@ FIND_PACKAGE(ZLIB) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) SET(ZLIB_VERSION ${ZLIB_VERSION_STRING}) -SET(_zlib_libraries ${ZLIB_LIBRARIES}) -SET(_zlib_include_dirs ${ZLIB_INCLUDE_DIRS}) DEAL_II_PACKAGE_HANDLE(ZLIB - LIBRARIES REQUIRED _zlib_libraries - INCLUDE_DIRS REQUIRED _zlib_include_dirs + LIBRARIES REQUIRED ZLIB_LIBRARY + INCLUDE_DIRS REQUIRED ZLIB_INCLUDE_DIR CLEAR ZLIB_INCLUDE_DIR ZLIB_LIBRARY )