1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

Remove redundant find_program and if(CCACHE) - if ENABLE_CCACHE is set and the generation hasn't already failed then CCACHE is guaranteed to be set and point to a ccache binary.

This commit is contained in:
Joakim Thorén
2023-12-27 21:12:52 +01:00
parent 7b02750034
commit fce3b5b83c

View File

@@ -95,8 +95,6 @@ if(ENABLE_CCACHE AND LINUX)
endif()
if(ENABLE_CCACHE AND (CMAKE_GENERATOR STREQUAL "Xcode"))
find_program(CCACHE ccache REQUIRED)
if(CCACHE)
# https://stackoverflow.com/a/36515503/2278742
# Set up wrapper scripts
configure_file(xcode/launch-c.in xcode/launch-c)
@@ -110,7 +108,6 @@ if(ENABLE_CCACHE AND (CMAKE_GENERATOR STREQUAL "Xcode"))
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/xcode/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/xcode/launch-cxx")
endif()
endif()
# Allow to pass package name from Travis CI
set(PACKAGE_NAME_SUFFIX "" CACHE STRING "Suffix for CPack package name")
@@ -275,8 +272,6 @@ if(MINGW OR MSVC)
if(MSVC)
if(ENABLE_CCACHE)
# https://github.com/ccache/ccache/discussions/1154#discussioncomment-3611387
find_program(CCACHE ccache REQUIRED)
if (CCACHE)
file(COPY_FILE
${CCACHE} ${CMAKE_BINARY_DIR}/cl.exe
ONLY_IF_DIFFERENT)
@@ -288,7 +283,6 @@ if(MINGW OR MSVC)
"UseMultiToolTask=true"
)
endif()
endif()
add_definitions(-DBOOST_ALL_NO_LIB)
add_definitions(-DBOOST_ALL_DYN_LINK)