Browse Source

Enable ccache support for MinGW

Joakim Thorén 1 year ago
parent
commit
eeab16a57d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      CMakeLists.txt

+ 2 - 2
CMakeLists.txt

@@ -84,9 +84,9 @@ if(ENABLE_CCACHE)
 	find_program(CCACHE ccache REQUIRED)
 	find_program(CCACHE ccache REQUIRED)
 endif()
 endif()
 
 
-# On Linux, use ccache via CMAKE_CXX_COMPILER_LAUNCHER.
+# On Linux and MinGW, use ccache via CMAKE_CXX_COMPILER_LAUNCHER.
 # The XCode and MSVC builds each require some more configuration further down.
 # The XCode and MSVC builds each require some more configuration further down.
-if(ENABLE_CCACHE AND LINUX)
+if(ENABLE_CCACHE AND (LINUX OR MINGW))
 	set(CMAKE_C_COMPILER_LAUNCHER "ccache")
 	set(CMAKE_C_COMPILER_LAUNCHER "ccache")
 	set(CMAKE_CXX_COMPILER_LAUNCHER "ccache")
 	set(CMAKE_CXX_COMPILER_LAUNCHER "ccache")
 endif()
 endif()