h5pp icon indicating copy to clipboard operation
h5pp copied to clipboard

Overwrite cmake flag CMAKE_CXX_STANDARD

Open DmitryKuznecov opened this issue 3 years ago • 1 comments

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

DmitryKuznecov avatar Aug 18 '22 15:08 DmitryKuznecov

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.

DavidAce avatar Aug 21 '22 18:08 DavidAce