Skip to content
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

Overwrite cmake flag CMAKE_CXX_STANDARD #16

Closed
DmitryKuznecov opened this issue Aug 18, 2022 · 1 comment
Closed

Overwrite cmake flag CMAKE_CXX_STANDARD #16

DmitryKuznecov opened this issue Aug 18, 2022 · 1 comment

Comments

@DmitryKuznecov
Copy link

I started using your library in my c++20 project and found behavior that I didn't expect.

I set the c++20 standard as
set(CMAKE_CXX_STANDARD 20).
Then, in one of the libraries, I include h5pp
find_package(h5pp REQUIRED).
After that, the standard is reset to 17, which I can observe
message("CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD}") #print CMAKE_CXX_STANDARD 17

It's not very critical and I can set the c++20 standard manually again

@DavidAce
Copy link
Owner

DavidAce commented Aug 21, 2022

Thanks for reporting this, it is certainly not the behavior I intended.
I think I have found the cause here. This file is installed and run as part of find_package(h5pp) which calls h5ppConfig.cmake. I'll try to encapsulate or avoid this line if possible.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants