]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Detect empty variables...
authorMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 16 May 2014 12:02:21 +0000 (12:02 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 16 May 2014 12:02:21 +0000 (12:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@32922 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_deal_ii_package_handle.cmake
deal.II/cmake/modules/FindZLIB.cmake

index 3c7a0a5449728ced0d6afda3d86d1b2624621fd9..0038aa922961e0c42d6fa7005c2437cf5fecc7a4 100644 (file)
@@ -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 ***"
                 )
index d9022891b8092ea91fc11b694c3f616db9a86e94..a3ecfe357da8c21eae87a2fa8f40972df042fe0b 100644 (file)
@@ -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
   )

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.