1
0
Fork 0

Add USE_CLCACHE_MODE to have specific build options (#9119)

* Add USE_CLCACHE_MODE to have specific build options

* Update CMakeLists.txt

Address review comment
This commit is contained in:
KVS85 2019-05-28 18:52:46 +03:00 committed by Frank Celler
parent 40ccafbded
commit 00fd5eebe2
1 changed files with 12 additions and 0 deletions

View File

@ -238,6 +238,13 @@ endif()
message(STATUS "WINDOWS VERSION: ${ARANGODB_WINDOWS_UPSTREAM}") message(STATUS "WINDOWS VERSION: ${ARANGODB_WINDOWS_UPSTREAM}")
if (MSVC)
option(USE_CLCACHE_MODE
"whether we want to use CLCACHE-specific build options"
OFF
)
endif ()
################################################################################ ################################################################################
# SNAP version # SNAP version
################################################################################ ################################################################################
@ -894,6 +901,11 @@ elseif (MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2" CACHE INTERNAL "C++ release flags") set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2" CACHE INTERNAL "C++ release flags")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1" CACHE INTERNAL "C++ release with debug info flags") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1" CACHE INTERNAL "C++ release with debug info flags")
if (USE_CLCACHE_MODE)
set(CMAKE_VS_GLOBALS "TrackFileAccess=false")
add_definitions(/Z7)
endif ()
else () else ()
# unknown compiler # unknown compiler
message(STATUS "Compiler type UNKNOWN: ${CMAKE_CXX_COMPILER}") message(STATUS "Compiler type UNKNOWN: ${CMAKE_CXX_COMPILER}")