-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Compiler detection: Cache compiler hash #42994
base: master
Are you sure you want to change the base?
Compiler detection: Cache compiler hash #42994
Conversation
set(${out_var} "${HASH}" PARENT_SCOPE) | ||
endfunction() | ||
|
||
if(VCPKG_COMPILER_CACHE_FILE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
if(VCPKG_COMPILER_CACHE_FILE) | |
if(DEFINED VCPKG_COMPILER_CACHE_FILE) |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The variable is passed to this port by -DVCPKG_COMPILER_CACHE_FILE=${VCPKG_COMPILER_CACHE_FILE}
, but if an "old" vcpkg-tool
is used the variable is not defined in the portfile and an empty variable gets defined.
Co-authored-by: Billy O'Neal <[email protected]>
@@ -18,6 +18,8 @@ set(VCPKG_BUILD_TYPE release) | |||
vcpkg_configure_cmake( | |||
SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}" | |||
PREFER_NINJA | |||
OPTIONS | |||
-DVCPKG_COMPILER_CACHE_FILE=${VCPKG_COMPILER_CACHE_FILE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-DVCPKG_COMPILER_CACHE_FILE=${VCPKG_COMPILER_CACHE_FILE} | |
"-DVCPKG_COMPILER_CACHE_FILE=${VCPKG_COMPILER_CACHE_FILE}" | |
Implements microsoft/vcpkg-tool#362 (comment)
Speeds up the compiler hashing if the compiler file is large like on macOS (250 MB for cc and c++ each)