mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
d98838430c
Use CMAKE_MATCH_1 instead of CMAKE_MATCH_0 which holds the entire match.
23 lines
593 B
CMake
23 lines
593 B
CMake
# To find CCache compiler cache
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_program(CCache_EXECUTABLE ccache)
|
|
|
|
if (CCache_EXECUTABLE)
|
|
execute_process(COMMAND "${CCache_EXECUTABLE}" --version
|
|
OUTPUT_VARIABLE CCache_VERSION_OUTPUT
|
|
)
|
|
|
|
if (CCache_VERSION_OUTPUT MATCHES "version ([0-9]+\\.[0-9]+\\.[0-9]+)")
|
|
set(CCache_VERSION "${CMAKE_MATCH_1}")
|
|
endif ()
|
|
endif (CCache_EXECUTABLE)
|
|
|
|
find_package_handle_standard_args(CCache
|
|
FOUND_VAR CCache_FOUND
|
|
REQUIRED_VARS CCache_EXECUTABLE
|
|
VERSION_VAR CCache_VERSION
|
|
)
|
|
|
|
mark_as_advanced(CCache_EXECUTABLE)
|