Skip to content

Commit

Permalink
Merge pull request #2152 from DARMA-tasking/2144-fix-ccache-export
Browse files Browse the repository at this point in the history
#2144: Fix unwanted cache export
  • Loading branch information
nlslatt authored May 31, 2023
2 parents 2b0a269 + 801cbc4 commit aa645bd
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ set(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/"
)

# Try to find ccache to speed up compilation
find_program(ccache_binary ccache)
if (ccache_binary)
message(
STATUS
"VT: Found ccache binary: ${ccache_binary}; adding launch rule"
)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${ccache_binary}")
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
# Try to find ccache to speed up compilation
find_program(ccache_binary ccache)
if (ccache_binary)
message(
STATUS
"VT: Found ccache binary: ${ccache_binary}; adding launch rule"
)
set(CMAKE_CXX_COMPILER_LAUNCHER ${ccache_binary})
endif()
endif()

set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down

0 comments on commit aa645bd

Please sign in to comment.