File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ macro(ParseMakefileVars MAKEFILE_IN)
43
43
if (NOT "${line_match} " STREQUAL "" )
44
44
#message(STATUS "match on ${line_match}")
45
45
set (var_name ${CMAKE_MATCH_1} )
46
- set (var_value ${CMAKE_MATCH_2} )
46
+ # set(var_value ${CMAKE_MATCH_2})
47
+ string (STRIP ${CMAKE_MATCH_2} var_value )
47
48
# check for Makefile variables in the string, e.g. $(TSUFFIX)
48
49
string (REGEX MATCHALL "\\ $\\ (([0-9_a-zA-Z]+)\\ )" make_var_matches ${var_value} )
49
50
foreach (make_var ${make_var_matches} )
@@ -63,7 +64,7 @@ macro(ParseMakefileVars MAKEFILE_IN)
63
64
string (REGEX MATCH "ifeq \\ (\\ $\\ (([_A-Z]+)\\ ),[ \t ]*([0-9_A-Z]+)\\ )" line_match "${makefile_line} " )
64
65
if (NOT "${line_match} " STREQUAL "" )
65
66
# message(STATUS "IFEQ: ${line_match} first: ${CMAKE_MATCH_1} second: ${CMAKE_MATCH_2}")
66
- if (${${CMAKE_MATCH_1}} STREQUAL ${CMAKE_MATCH_2} )
67
+ if (DEFINED ${${CMAKE_MATCH_1}} AND ${${CMAKE_MATCH_1}} STREQUAL ${CMAKE_MATCH_2} )
67
68
# message (STATUS "condition is true")
68
69
set (IfElse 1 )
69
70
else ()
You can’t perform that action at this time.
0 commit comments