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

Redundant C++ standard check #17

Open
AntoinePrv opened this issue Sep 13, 2022 · 1 comment
Open

Redundant C++ standard check #17

AntoinePrv opened this issue Sep 13, 2022 · 1 comment

Comments

@AntoinePrv
Copy link
Member

This check:

CHECK_CXX_COMPILER_FLAG("-std=c++{{cookiecutter.cpp_standard}}" HAS_CPP_{{cookiecutter.cpp_standard}}_FLAG)

Seems to be redundant with this one:
CHECK_CXX_COMPILER_FLAG("-std=c++{{cookiecutter.cpp_standard}}" HAS_CPP_{{cookiecutter.cpp_standard}}_FLAG)

Which is itself redundant with target_compile_features, as this function already check if the feature is supported by the compiler, as show in this example:

 CMake Error at CMakeLists.txt:154 (target_compile_features):
  target_compile_features The compiler feature "cxx_std_23" is not known to
  CXX compiler

  "GNU"

  version 10.4.0.
@DerThorsten
Copy link
Member

DerThorsten commented Sep 15, 2022

Thanks for reporting this, feel free to send a PR

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