Skip to content
Snippets Groups Projects
Commit 0e3d2793 authored by Oscar Rene Albert Buon's avatar Oscar Rene Albert Buon Committed by Marco Clemencic
Browse files

PGO options added

parent 0aad251b
No related branches found
No related tags found
1 merge request!1472Add GAUDI_PGO options
......@@ -127,6 +127,28 @@ set(GAUDI_INSTALL_CONFIGDIR "lib/cmake/${PROJECT_NAME}" CACHE STRING "Install cm
set(scan_dict_deps_command ${GAUDI_TOOLBOX_DIR}/scan_dict_deps.py
CACHE INTERNAL "command to use to scan dependencies of dictionary headers")
##################################### PGO #####################################
if("${PGO}" MATCHES "GENERATE")
message("PGO generate")
if(DEFINED PGO_PATH)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-generate=${PGO_PATH}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-generate")
endif()
endif()
if("${PGO}" MATCHES "USE")
message("PGO use")
if(DEFINED PGO_PATH)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-use=${PGO_PATH} -fprofile-correction")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-use -fprofile-correction")
endif()
include(CheckIPOSupported)
check_ipo_supported()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
################################## Functions ##################################
# Helper function that replaces imported targets in ``<var>`` with local ones,
......
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