Skip to content

Commit

Permalink
enable sccache for nvc++
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jan 5, 2024
1 parent 2c99167 commit 35bf5ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,8 @@ string(REGEX REPLACE "Revision: ([0-9]+)" "\\1" STD_EXECUTION_BS_REVISION ${STD_
# call so CMake's CXX compiler detection doesn't throw attempting to use it
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/CompilerHelpers.cmake)

disable_compiler_launcher(LANG CXX VAR _cxx_launcher)
disable_compiler_launcher(LANG CUDA VAR _cuda_launcher)

project(STDEXEC VERSION "0.${STD_EXECUTION_BS_REVISION}.0" LANGUAGES CXX)

enable_compiler_launcher(LANG CXX VAR _cxx_launcher)
enable_compiler_launcher(LANG CUDA VAR _cuda_launcher)

# Print CMake configuration
message(STATUS "System : ${CMAKE_SYSTEM}")
message(STATUS "System name : ${CMAKE_SYSTEM_NAME}")
Expand Down Expand Up @@ -243,8 +237,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC")
set(STDEXEC_ENABLE_CUDA ON)
# Unset these if using nvc++
disable_compiler(LANG CUDA)
disable_compiler_launcher(LANG CXX)
disable_compiler_launcher(LANG CUDA)
endif()

if(STDEXEC_ENABLE_CUDA)
Expand Down
29 changes: 0 additions & 29 deletions cmake/Modules/CompilerHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,3 @@ function(disable_compiler)
set(${_VAR} "${_val}" PARENT_SCOPE)
endif()
endfunction()

function(disable_compiler_launcher)
cmake_parse_arguments("" "" "LANG;VAR" "" ${ARGN})
set(_val)

if(DEFINED ENV{CMAKE_${_LANG}_COMPILER_LAUNCHER})
set(_val "$ENV{CMAKE_${_LANG}_COMPILER_LAUNCHER}")
unset(ENV{CMAKE_${_LANG}_COMPILER_LAUNCHER})
endif()

if(CMAKE_${_LANG}_COMPILER_LAUNCHER)
set(_val "${CMAKE_${_LANG}_COMPILER_LAUNCHER}")
unset(CMAKE_${_LANG}_COMPILER_LAUNCHER PARENT_SCOPE)
unset(CMAKE_${_LANG}_COMPILER_LAUNCHER CACHE)
endif()

if(_VAR)
set(${_VAR} "${_val}" PARENT_SCOPE)
endif()
endfunction()

function(enable_compiler_launcher)
cmake_parse_arguments("" "" "LANG;VAR" "" ${ARGN})
if(${_VAR})
set(CMAKE_${_LANG}_COMPILER_LAUNCHER "${${_VAR}}" PARENT_SCOPE)
set(CMAKE_${_LANG}_COMPILER_LAUNCHER "${${_VAR}}" CACHE STRING "" FORCE)
unset(${_VAR} PARENT_SCOPE)
endif()
endfunction()

0 comments on commit 35bf5ef

Please sign in to comment.