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

[BUG] Configuration error using Ninja Multi-Config. #646

Closed
raplonu opened this issue Jun 7, 2024 · 1 comment · Fixed by #647
Closed

[BUG] Configuration error using Ninja Multi-Config. #646

raplonu opened this issue Jun 7, 2024 · 1 comment · Fixed by #647

Comments

@raplonu
Copy link
Contributor

raplonu commented Jun 7, 2024

Describe the Bug

Trying to configure the project using Ninja Multi-Config generator result in an error.

To Reproduce

Doing the following:

mkdir build && cd build
cmake -G "Ninja Multi-Config" ..

Will result in an error:

CMake Error at CMakeLists.txt:126 (if):
  if given arguments:

    "NOT" "CMAKE_BUILD_TYPE" "OR" "STREQUAL" "Debug"

  Unknown arguments specified

System Details

  • OS: AlmaLinux release 8.4
  • CUDA version: 12.2
  • g++ version: 11.2

Additional Context

The issue comes from the CMakeLists.txt file line 126:

if (NOT CMAKE_BUILD_TYPE OR ${CMAKE_BUILD_TYPE} STREQUAL "Debug")

CMake conditions does not use short-circuit as stated there

Binary logical operators AND and OR, from left to right, without any short-circuit.

CMake being CMake, the issue only appears using Ninja Multi-Config.

@cliffburdick
Copy link
Collaborator

Thanks @raplonu . We are submitting a workaround for now. I didn't see any other clean way of doing this in CMake with an OR condition.

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

Successfully merging a pull request may close this issue.

2 participants