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

BLT_CXX_STD checks should work like standard cmake if #617

Open
cyrush opened this issue Jan 12, 2023 · 0 comments
Open

BLT_CXX_STD checks should work like standard cmake if #617

cyrush opened this issue Jan 12, 2023 · 0 comments

Comments

@cyrush
Copy link
Member

cyrush commented Jan 12, 2023

I have a case where I don't want to pass an empty string to disable BLT_CXX_STD (b/c it's hard to verify empty string)

I tried IGNORE, which is one of the basic expressions that will cause cmake if statements to eval to false.

https://cmake.org/cmake/help/latest/command/if.html#basic-expressions

However since we are using property strings this option?

set_property(CACHE BLT_CXX_STD PROPERTY STRINGS c++98 c++11 c++14 c++17 c++20)

And causes a failure:

CMake Error at blt/cmake/SetupCompilerStandards.cmake:52 (message):
  "IGNORE" is an invalid entry for BLT_CXX_STD.  Valid Options are ( c++98,

Maybe we need to change the order of the calls (use set_property inside of if(BLT_CXX_STD))?

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

1 participant