From e45d850414878f77b0abd30935baeda256e8b8e5 Mon Sep 17 00:00:00 2001 From: "R.J.V. Bertin" Date: Thu, 15 Jun 2017 19:03:08 +0200 Subject: guess less, test more Don't attempt to guess whether (Apple) Clang 3.5 supports -Wdate-time, use CheckCXXCompilerFlag and be certain. --- kde-modules/KDECompilerSettings.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index c27fa799..7d523a21 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -376,8 +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 MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0.0.1000000 AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1.0.6000000)) + check_cxx_compiler_flag(-Wdate-time HAVE_DATE_TIME) + if (HAVE_DATE_TIME) # -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