Skip to content

Commit 5484b29

Browse files
committed
Only set CMAKE_C_COMPILER if its not defined already
1 parent 97a1820 commit 5484b29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ if(POLICY CMP0157)
2424
cmake_policy(SET CMP0157 NEW)
2525
endif()
2626

27-
set(CMAKE_C_COMPILER clang)
27+
if (NOT DEFINED CMAKE_C_COMPILER)
28+
set(CMAKE_C_COMPILER clang)
29+
endif()
2830

2931
project(Foundation
3032
LANGUAGES C Swift)

0 commit comments

Comments
 (0)