Specify C++ standard instead of leaving it up to the compiler#568
Merged
KoenBussemakerDeltares merged 2 commits intomainfrom Feb 9, 2026
Merged
Conversation
harmenwierenga
approved these changes
Feb 4, 2026
Contributor
harmenwierenga
left a comment
There was a problem hiding this comment.
FBCTools (src/engines_gpl/fbc/packages/FBCTools/CMakeLists.txt, C++11) and now the new csumo_precice project (src/tools_gpl/csumo_precice/CMakeLists.txt, C++23) override these. It's good to have a decent default though, currently we have the compiler ones (gcc 14 has gnu17 and visual studio 2022 has c++14 I think), and this will apply to dimr.
7 tasks
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.
What was done
Instead of using whatever default is set (which differs per compiler and per version), specify the C++ standard in CMake. I chose the C++17 for now but this can be changed if need be.
I also disabled compiler-specific extensions which should lead to fever cross-platform headaches in the future. This causes the
linuxcompile definition to disappear since it's not POSIX compliant, hence why I had to change it to__linux__in several places.Evidence of the work done
<add video/figures if applicable>
Tests
<add testcase numbers if applicable, Issue number>
Documentation
<add description of changes if applicable, Issue number>
Issue link