Closed MaxXSoft closed 3 years ago
@MaxXSoft, thank you for your submission!
Hi @a4z and @schultetwin1,
I don't feel comfortable with CMake yet and I don't know how this PR may affect 'conan' and 'vcpkg' integrations. Would it be possible for your to review the PR?
Thank you, Serge
I have opened discussion #59 dedicated to this PR
Hi @MaxXSoft,
Based on the feedback received at #59, would you please resubmit PR putting CMAKE_CXX_STANDARD into a conditional statement that checks for ELFIO_BUILD_EXAMPLES and ELFIO_BUILD_TESTS
Hi @serge1,
I've put CMAKE_CXX_STANDARD
in a conditional statement to ensure that C++11 will only be enabled when building examples and tests.
Accepted and merged! Thank you!
just FYI, in case you did not know, you can also set the C++ standard on target level, the it will never be global
set_target_properties(the_target
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)
just FYI, in case you did not know, you can also set the C++ standard on target level, the it will never be global
set_target_properties(the_target PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO )
Glad to know that, thank you!
Added
set(CMAKE_CXX_STANDARD 11)
toCMakeLists.txt
to enable C++11 support, otherwise, the build process may fail when building the examples.