Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
QoL: Buildtype variables for looping over buildtypes #7733
QoL: Buildtype variables for looping over buildtypes #7733
Changes from 37 commits
2b6cf9a
c19a15c
23bad7f
5fcd7b5
f8bd0d8
d0d99d9
7517be9
31dede7
eaaa60b
ceabb41
26cc37c
a69a436
fe280ed
0802dfa
b906905
8aed23b
356013c
2d4d915
6aa035b
75b46fd
5a2bcb5
0c68fd5
653d75b
cf941ea
d990a14
5dd65e9
b07235c
ddbb7a5
f7bdfc7
ce00f1d
fcd4d97
b5cbf0b
88d27f5
7ca06e3
afaf5fb
76852fd
1f97108
01ae106
bee1f2c
7dc2a69
a100f23
acf52b3
8801434
42089f6
783ab6f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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.
In discussion, we have agreed on the following things:
VCPKG_BUILD_CMAKE_TYPE_*
andVCPKG_BUILD_QMAKE_CONFIG_*
, since they're build-system specific.VCPKG_BUILDTREE_TRIPLET_DIR_*
, since that's not a concept we want to codify.VCPKG_BUILD_LIST
->VCPKG_BUILD_TYPES
VCPKG_BUILD_SHORT_NAME_*
->VCPKG_BUILD_TYPE_SHORT_NAME_*
VCPKG_BUILD_TRIPLET_*
->VCPKG_LOGNAME_STEM_*
or something similarVCPKG_PATH_SUFFIX_*
is good as it is.Additionally, we want to lowercase the build types in these, so that
VCPKG_BUILD_TYPES
becomesrelease;debug
,and the different variables are
VCPKG_PATH_SUFFIX_release
,VCPKG_PATH_SUFFIX_debug
, etc.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.
Please re-discuss the following or give arguments:
uppercase is the way to go since cmake variables itself are uppercase. If I don't use uppercase build types I always have to use a
string(UPPER)
forVCPKG_DETECTED_<SOMELANGUAGE>_FLAGS_<SOMEBUILDTYPE_UPPER>
. I don't see any good reason to stick to lowercase build types here. (I mean I can also introduceVCPKG_BUILD_TYPE_UPPER_<config>
if you plan to stick to lowercase configs but it will get complicated to access flags:MY_C_FLAGS_${VCPKG_BUILD_TYPE_UPPER_${config}}
instead ofMY_C_FLAGS_${config}
)The path is used so often and even inside portfiles. I can rename it to
_VCPKG_INTERNAL_BUILDTREE_TRIPLET_DIR_
although often used for the logname it is not only used there. It is also used in messages and paths/folders.
TODO: I'll move them to the configure scripts.
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.
The thing is,
release
anddebug
aren't necessarily related to the CMake stuff, they're related to the vcpkg BUILD_TYPE stuff; even though the words are the same between VCPKG_BUILD_TYPE = release and CMAKE_BUILD_TYPE = Release, they're not necessarily the same thing, and we shouldn't use RELEASE just because CMake does for a related but different concept. It's important to understand that our usecase of CMake is not as a build system -- we are simply using CMake as a language for writing descriptions of existing build systems.The big reason we want to do this is we wish to tie this to VCPKG_BUILD_TYPE. I think this would be a really unfortunate and weird feature if it weren't tied to VCPKG_BUILD_TYPE.