aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-10-29 15:42:27 -0700
committerAndersBroman <a.broman58@gmail.com>2020-11-01 10:15:04 +0000
commit21e1056058c391085834fc52d394e2f93b9989a2 (patch)
treed19da1ed3173139d441429e31a266318c02237af /CMakeLists.txt
parent9613c943e074a3ef56e1736db9effb6788497992 (diff)
CMake: Don't restrict ENABLE_CCACHE.
Don't restrict ENABLE_CCACHE, but print a warning for non-gcc and non-clang compilers. Fixes #16960.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16778b26e9..c2e30bf759 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1350,7 +1350,12 @@ include(ConfigureChecks.cmake)
# Global properties
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-if(ENABLE_CCACHE AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang"))
+if(ENABLE_CCACHE)
+ if(NOT (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang"))
+ # https://ccache.dev/platform-compiler-language-support.html
+ message(WARNING "Ccache is enabled, but your compiler is ${CMAKE_C_COMPILER_ID}."
+ " We wish you the best of luck.")
+ endif()
# https://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmake/24305849#24305849
find_program(CCACHE_EXECUTABLE ccache)
if(CCACHE_EXECUTABLE)