From 51f1fccf1cf3b9ed63d6aeba2c4cdb1d3d8f7a6b Mon Sep 17 00:00:00 2001 From: "R.J.V. Bertin" Date: Wed, 14 Jun 2017 12:59:07 +0200 Subject: detect Xcode <= 6.2 from Clang version only This modifies 340b969f54d2f271e925ed7f84c831e1e4b2ccd0 by testing for Xcode <= 6.2 using the AppleClang version scheme only, to account for rare conditions where the compiler ID is not AppleClang. --- kde-modules/KDECompilerSettings.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kde-modules/KDECompilerSettings.cmake') diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 2de98c04..c27fa799 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -376,7 +376,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR endif() if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)) - if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1.0.6000000)) + if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0.0.1000000 AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1.0.6000000)) # -Wdate-time: warn if we use __DATE__ or __TIME__ (we want to be able to reproduce the exact same binary) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdate-time") endif() -- cgit v1.2.1