Darwin: Don't overwrite the C compiler if the user set one manually.
This commit is contained in:
parent
1bf2c03a99
commit
146cf56295
|
@ -25,12 +25,18 @@ option(UNITTESTS "Build unitests" OFF)
|
|||
# Update compiler before calling project()
|
||||
if (APPLE)
|
||||
# Use clang compiler
|
||||
set(CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang")
|
||||
if (NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
set(CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++")
|
||||
if (NOT EXISTS "${CMAKE_CXX_COMPILER}")
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
set(CMAKE_CXX_COMPILER "clang++")
|
||||
endif()
|
||||
endif()
|
||||
if (NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
set(CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang")
|
||||
if (NOT EXISTS "${CMAKE_C_COMPILER}")
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
project(dolphin-emu)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
|
||||
|
|
Loading…
Reference in New Issue