Repository navigation
Respect caller CMake settings while retaining the C++11 minimum - #465
Merged
bsergean merged 3 commits intoNov 9, 2026
Merged
Conversation
Use cache variables in CMakeLists.txt to customize build settings.
hotwatermorning
force-pushed
the
use-cmake-cache-variables
branch
from
September 3, 2023 18:03
0d4f63d to
e400619
Compare
Contributor
|
How about this instead? |
Collaborator
|
thanks @rh101 and @hotwatermorning ; finally merged this with a small change |
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.
IXWebSocket unconditionally reset the caller's C++ standard to 11, including in the CLI and test directories. The original proposed boolean settings also omitted CACHE, producing list values instead of valid boolean defaults.
Use conditional defaults that respect command-line cache values and normal variables inherited through add_subdirectory. Keep C++11 as the library's default and minimum, reject C++98 explicitly, and correct the CMAKE_CXX_STANDARD_REQUIRED variable name. The CLI and tests now inherit the selected standard; the vendored test framework retains its existing C++14 minimum.
Default compile-command export before project() initializes that cache entry, while honoring explicit cache, parent-project, and environment settings. No global caller settings are forced into the cache.
Merged current master and added a configure-time regression test that embeds the library with C++17, STANDARD_REQUIRED=OFF, EXTENSIONS=ON, and compile-command export OFF, then verifies the library, CLI, and a test target retain those settings. Document the supported options.
Validation: