Commit 5a760604 authored by Chris Toshok's avatar Chris Toshok

disable ccache if ENABLE_PGO is ON.

parent 70d26deb
......@@ -33,7 +33,7 @@ option(ENABLE_PGO "enable -fprofile-generate/-fprofile-use" OFF)
option(ENABLE_LTO "enable -flto (only if ENABLE_PGO=ON as well)" OFF)
# automatically use ccache if found
if(ENABLE_CCACHE)
if(ENABLE_CCACHE AND NOT ENABLE_PGO)
find_program(CCACHE ccache)
if(CCACHE)
message(STATUS "found ccache ${CCACHE}")
......@@ -81,9 +81,9 @@ macro(ADD_PROFILE_FLAGS)
if(NOT "${PROFILE_DIR}" STREQUAL "")
set(PROFILE_STATE "${PROFILE_STATE}=${PROFILE_DIR}")
endif()
set(PROFILE_C_FLAGS "-fprofile-${PROFILE_STATE} ${LTO_FLAGS}")
set(PROFILE_CXX_FLAGS "-fprofile-${PROFILE_STATE} ${LTO_FLAGS}")
set(PROFILE_LINK_FLAGS "-fprofile-${PROFILE_STATE} ${LTO_FLAGS}")
set(PROFILE_C_FLAGS "-fprofile-${PROFILE_STATE} ${LTO_FLAGS} -fprofile-correction")
set(PROFILE_CXX_FLAGS "-fprofile-${PROFILE_STATE} ${LTO_FLAGS} -fprofile-correction")
set(PROFILE_LINK_FLAGS "-fprofile-${PROFILE_STATE} ${LTO_FLAGS} -fprofile-correction")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PROFILE_CXX_FLAGS} ${LTO_FLAGS}")
endmacro()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment