Skip to content
Snippets Groups Projects
Commit d89b3a61 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Disable PCH when using clcache.

parent f6864686
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,18 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(MSVC_VERSION LESS 1910 OR APPLE) # < VS 15.0; macOS: https://github.com/sakra/cotire/issues/139
# < VS 15.0; macOS: https://github.com/sakra/cotire/issues/139
if(MSVC_VERSION LESS 1910 OR APPLE OR ${CMAKE_CXX_COMPILER} MATCHES "clcache")
set(OGS_USE_PCH OFF CACHE INTERNAL "")
endif()
if(OGS_USE_PCH)
include(cotire) # compile time reducer
endif()
if(${CMAKE_CXX_COMPILER} MATCHES "clcache" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
message(WARNING "clcache does not cache in Debug config!")
endif()
# Set compiler helper variables
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(COMPILER_IS_CLANG TRUE CACHE INTERNAL "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment