-
Notifications
You must be signed in to change notification settings - Fork 162
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
Setting CMAKE_CXX_STANDARD in the library build config is problematic #202
Comments
Hi, Thank you for reporting. I replaced the code that sets P.S. Actually, you don't need to build toml11 to use because it is a header-only library (you need to build to run tests). So you don't need to |
I see, this way I still would get a problem because
I know, but I prefer working with targets instead of paths and link libraries with |
Why don't you wrap all the check compiler stuff in
The fatal error for missing |
This fix breaks our systems as well.
How can we |
Hi there! I encountered a problem introduced by toml11's CMakeLists which wasn't easy to figure out.
I tried to configure a project which uses toml11 and Microsoft.GSL libraries and was getting the error
GSL: Requires at least CXX standard 14, user provided 11
from the GSL CMake config which was produced by the following codeIn my projects I use target_compile_features to set the required C++ standard, so the variable CMAKE_CXX_STANDARD is left undefined, so I was puzzled until I find out that toml11 CMake sets this variable to 11 standard unconditionally.
Please consider to check this variable and give an error if it's less than 11 standard instead of setting it by yourself.
Also there's somewhat popular CMake guidelines that agrees that this variable should only be set by the end user of the library.
The text was updated successfully, but these errors were encountered: