Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: use CXX_COMPILER_LAUNCHER instead of RULE_LAUNCH_COMPILE #4098

Merged
merged 1 commit into from
Jul 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ if(MSVC)
default_option(SCCACHE_SUPPORT "Enable sccache support" "SCCACHE_EXECUTABLE")
message(STATUS "Support for sccache: ${SCCACHE_SUPPORT}")
if(SCCACHE_SUPPORT)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "sccache")
set( CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" )
set( CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" )
endif()
else()
# ccache support
Expand All @@ -395,8 +396,8 @@ else()
# without this compiler messages in `make` backend would be uncolored
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=${BUILD_COLORS}")
endif()
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "ccache")
set( CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}" )
set( CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}" )
endif()
message(STATUS "Support for ccache: ${CCACHE_SUPPORT}")
endif()
Expand Down Expand Up @@ -1740,11 +1741,6 @@ if(WIN32)
"${CMAKE_CURRENT_BINARY_DIR}/src/mixxx.rc.include"
"${CMAKE_CURRENT_BINARY_DIR}/src/gitinfo.h"
)
# sccache fails with RC files
# https://github.com/mozilla/sccache/issues/947
if(SCCACHE_SUPPORT)
set_target_properties(mixxx PROPERTIES RULE_LAUNCH_COMPILE "")
endif()
target_include_directories(mixxx PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
endif()

Expand Down