Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Darwin: Don't overwrite the C compiler if the user set one manually.
  • Loading branch information
comex committed Sep 24, 2013
1 parent 1bf2c03 commit 146cf56
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions CMakeLists.txt
Expand Up @@ -25,11 +25,17 @@ 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")
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++")
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_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)
Expand Down

0 comments on commit 146cf56

Please sign in to comment.