diff --git a/cmake/utils/CCache.cmake b/cmake/utils/CCache.cmake index f38a36b5dee8..446542b4b0be 100644 --- a/cmake/utils/CCache.cmake +++ b/cmake/utils/CCache.cmake @@ -16,11 +16,11 @@ # under the License. if(USE_CCACHE) # True for AUTO, ON, /path/to/ccache - if(DEFINED CXX_COMPILER_LAUNCHER OR DEFINED C_COMPILER_LAUNCHER) + if(DEFINED CMAKE_CXX_COMPILER_LAUNCHER OR DEFINED CMAKE_C_COMPILER_LAUNCHER) if("${USE_CCACHE}" STREQUAL "AUTO") - message(STATUS "CXX_COMPILER_LAUNCHER or C_COMPILER_LAUNCHER already defined, not using ccache") + message(STATUS "CMAKE_CXX_COMPILER_LAUNCHER or CMAKE_C_COMPILER_LAUNCHER already defined, not using ccache") elseif("${USE_CCACHE}" MATCHES ${IS_TRUE_PATTERN}) - message(FATAL_ERROR "CXX_COMPILER_LAUNCHER or C_COMPILER_LAUNCHER is already defined, refusing to override with ccache. Either unset or disable ccache.") + message(FATAL_ERROR "CMAKE_CXX_COMPILER_LAUNCHER or CMAKE_C_COMPILER_LAUNCHER is already defined, refusing to override with ccache. Either unset or disable ccache.") endif() else() if("${USE_CCACHE}" STREQUAL "AUTO") # Auto mode @@ -45,8 +45,8 @@ if(USE_CCACHE) # True for AUTO, ON, /path/to/ccache endif() # Set the flag for ccache if(DEFINED PATH_TO_CCACHE) - set(CXX_COMPILER_LAUNCHER "${PATH_TO_CCACHE}") - set(C_COMPILER_LAUNCHER "${PATH_TO_CCACHE}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${PATH_TO_CCACHE}") + set(CMAKE_C_COMPILER_LAUNCHER "${PATH_TO_CCACHE}") endif() endif() endif(USE_CCACHE) diff --git a/cmake/utils/Summary.cmake b/cmake/utils/Summary.cmake index e3ea925a9ae1..acb5703f600a 100644 --- a/cmake/utils/Summary.cmake +++ b/cmake/utils/Summary.cmake @@ -42,7 +42,7 @@ macro(print_summary) message(STATUS " C++ compiler ID : ${CMAKE_CXX_COMPILER_ID}") message(STATUS " C++ compiler version : ${CMAKE_CXX_COMPILER_VERSION}") message(STATUS " CXX flags : ${CMAKE_CXX_FLAGS}") - message(STATUS " CXX launcher : ${CXX_COMPILER_LAUNCHER}") + message(STATUS " CXX launcher : ${CMAKE_CXX_COMPILER_LAUNCHER}") message(STATUS " Linker flags : ${CMAKE_SHARED_LINKER_FLAGS}") message(STATUS " Build type : ${CMAKE_BUILD_TYPE}") get_directory_property(READABLE_COMPILE_DEFS DIRECTORY ${PROJECT_SOURCE_DIR} COMPILE_DEFINITIONS)