Skip to content

Commit 89ae305

Browse files
authored
Workaround for cmake having its own C_COMPILER variable
1 parent b716c0e commit 89ae305

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/utils.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ macro(ParseMakefileVars MAKEFILE_IN)
7474
string(REGEX MATCH "ifneq \\(\\$\\(([_A-Z]+)\\),[ \t]*([0-9_A-Z]+)\\)" line_match "${makefile_line}")
7575
if (NOT "${line_match}" STREQUAL "")
7676
# message(STATUS "IFNEQ: ${line_match} first: ${CMAKE_MATCH_1} second: ${CMAKE_MATCH_2}")
77+
if ( ${CMAKE_MATCH_1} STREQUAL C_COMPILER)
78+
set (CMAKE_MATCH_1 CMAKE_C_COMPILER)
79+
endif ()
7780
if (NOT ( ${${CMAKE_MATCH_1}} STREQUAL ${CMAKE_MATCH_2}))
7881
# message (STATUS "condition is true")
7982
set (IfElse 1)

0 commit comments

Comments
 (0)