Repository navigation
build: introduce ENABLE_DATE_INSTALL to allow user opt-out of install - #752
Merged
Merged
Conversation
When using `date` as a PRIVATE dependency, it is not required to install it. This flag give user using `date` with add_subdirectory the opportunity to disable install target Default behavior is conserved since ENABLE_DATE_INSTALL is ON
Tachi107
reviewed
Oct 1, 2022
Comment on lines
+43
to
+45
| if( ENABLE_DATE_INSTALL ) | ||
| include( GNUInstallDirs ) | ||
| endif( ) |
Contributor
There was a problem hiding this comment.
Wouldn't it make sense to move this include() in the installation section?
Contributor
Author
There was a problem hiding this comment.
No because we want CMAKE_INSTALL_INCLUDIR to be defined for target_include_directories
Contributor
There was a problem hiding this comment.
Right, but the variable is not currently used in target_include_directories(); I just saw #753 though, and they seem to complement each other. Thanks!
Contributor
Author
There was a problem hiding this comment.
Yes sorry for not making it clearer, I split bug fix and feature in different pr to make review easier/faster
gerhardol
approved these changes
Jan 26, 2024
gerhardol
left a comment
Contributor
There was a problem hiding this comment.
Works as intended, just copy&paste to fix.
I was planning to create a patch like this myself.
Co-authored-by: Gerhard Olsson <6248932+gerhardol@users.noreply.github.com>
Contributor
|
LGTM @HowardHinnant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When using
dateas a PRIVATE dependency, it is not required to install it. This flag give user usingdatewith add_subdirectory the opportunity to disable install target Default behavior is conserved since ENABLE_DATE_INSTALL is ONfix #751