From e23e2ac327ad7e59394d07a0ef4289daa4ceec0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Sat, 3 Jan 2015 22:07:16 -0500 Subject: [PATCH] Rely on clang autodetection instead of user input. --- build.sh | 2 +- cmake/BuildParameters.cmake | 4 +--- cmake/darwin-compiler-i386-clang.cmake | 3 --- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index cd2b1bf0bd..7f21540b43 100755 --- a/build.sh +++ b/build.sh @@ -24,7 +24,7 @@ useClang=0 for ARG in "$@"; do case "$ARG" in --clean ) cleanBuild=1 ;; - --clang ) flags+=(-DUSE_CLANG=TRUE); useClang=1; ;; + --clang ) useClang=1; ;; --dev|--devel ) flags+=(-DCMAKE_BUILD_TYPE=Devel) ;; --dbg|--debug ) flags+=(-DCMAKE_BUILD_TYPE=Debug) ;; --strip ) flags+=(-DCMAKE_BUILD_STRIP=TRUE) ;; diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 82d52401d8..8f55fef56c 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -60,11 +60,9 @@ endif() #------------------------------------------------------------------------------- # Compiler extra #------------------------------------------------------------------------------- -option(USE_CLANG "Use llvm/clang to build PCSX2 (developer option)") option(USE_ASAN "Enable address sanitizer") -# It's probably better to autodetect the USE_CLANG. Remove the option? -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT USE_CLANG) +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(USE_CLANG TRUE) endif() diff --git a/cmake/darwin-compiler-i386-clang.cmake b/cmake/darwin-compiler-i386-clang.cmake index 182a6d4a91..b968afeca8 100644 --- a/cmake/darwin-compiler-i386-clang.cmake +++ b/cmake/darwin-compiler-i386-clang.cmake @@ -8,9 +8,6 @@ set(CMAKE_C_COMPILER_TARGET i686-apple-darwin) set(CMAKE_CXX_COMPILER clang++ -m32) set(CMAKE_CXX_COMPILER_TARGET i686-apple-darwin) -# Enable clang -set(USE_CLANG TRUE) - # If given a CMAKE_FIND_ROOT_PATH then # FIND_PROGRAM ignores CMAKE_FIND_ROOT_PATH (probably can't run) # FIND_{LIBRARY,INCLUDE,PACKAGE} only uses the files in CMAKE_FIND_ROOT_PATH.