Skip to content

Commit ab0a145

Browse files
committed
fixed CMAKE_COMPILER_ID value that was set to CMAKE_<LANG>_COMPILER_ID instead of real value
1 parent edf7b7f commit ab0a145

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xmake/plugins/project/cmake/cmakelists.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ function _add_project(cmakelists, outputdir)
370370
end
371371
-- Define a language-independant global compiler_id variable
372372
if (languages and #languages > 0) then
373-
cmakelists:print("set(CMAKE_COMPILER_ID CMAKE_%s_COMPILER_ID)", _get_project_languages()[1])
373+
cmakelists:print("set(CMAKE_COMPILER_ID ${CMAKE_%s_COMPILER_ID})", _get_project_languages()[1])
374374
else
375-
cmakelists:print("set(CMAKE_COMPILER_ID CMAKE_C_COMPILER_ID)") -- C should be defined by default if not specified
375+
cmakelists:print("set(CMAKE_COMPILER_ID ${CMAKE_C_COMPILER_ID})") -- C should be defined by default if not specified
376376
end
377377
cmakelists:print("")
378378
end

0 commit comments

Comments
 (0)