Fix handling of ifdef/ifndef
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Sun, 9 Jan 2022 22:31:59 +0000 (23:31 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Jan 2022 22:31:59 +0000 (23:31 +0100)
cmake/utils.cmake

index c5ee653..56c1cb0 100644 (file)
@@ -125,7 +125,7 @@ macro(ParseMakefileVars MAKEFILE_IN)
     if (NOT "${line_match}" STREQUAL "")
       #message(STATUS "${CMAKE_MATCH_1} first: ${CMAKE_MATCH_2}")
       set (ElseSeen 0)
-      if (DEFINED ${CMAKE_MATCH_2})
+      if (${CMAKE_MATCH_2})
         if (${CMAKE_MATCH_1} STREQUAL "ifdef")
           #message (STATUS "condition is true")
           set (IfElse 1)