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

How to use shake with CMake? #801

Open
ghost opened this issue Mar 16, 2021 · 2 comments
Open

How to use shake with CMake? #801

ghost opened this issue Mar 16, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 16, 2021

How am I supposed to use shake with CMake?

> cmake -S . -B build/shake -G "Ninja" -D CMAKE_MAKE_PROGRAM=C:/git/ItoGraphics/shake.exe
-- The CXX compiler identification is Clang 11.0.0 with GNU-like command-line
-- Check for working CXX compiler: C:/Program Files/LLVM/bin/clang++.exe
CMake Error:
  The detected version of Ninja (Shake build system, version 0.19.1) is less
  than the version of Ninja required by CMake (1.3).


CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCXXCompiler.cmake:46 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)


-- Configuring incomplete, errors occurred!
>

Based on several things I thought shake was compatible with CMake. How do I get this to work?

@ghost ghost closed this as completed Mar 30, 2021
@ndmitchell ndmitchell reopened this Apr 5, 2021
@ndmitchell
Copy link
Owner

Thanks for the report, and sorry it's taken so long for me to look at it.

In the past, I have used Shake as a replacement for Ninja in CMake. However, I guess at that point whatever Ninja version assertion is now failing either wasn't present, or was present but Shake was high enough to trigger.

It does seem that Shake isn't a valid replacement for Ninja because of the version detection. I'm not sure what to do about that - we probably need to figure out how CMake detects the Ninja version. Once we have that, maybe we could write version 0.19.1, compilable with Ninja 1.3 or something? Perhaps a .bat script which spots --version and writes out a fake 1.3 would be sufficient to see if there are any further issues?

@ghost
Copy link
Author

ghost commented Apr 6, 2021

It does seem that Shake isn't a valid replacement for Ninja because of the version detection. I'm not sure what to do about that - we probably need to figure out how CMake detects the Ninja version. Once we have that, maybe we could write version 0.19.1, compilable with Ninja 1.3 or something? Perhaps a .bat script which spots --version and writes out a fake 1.3 would be sufficient to see if there are any further issues?

I guess you could do something like that for backwards compatibility. Although I think the proper fix is to upstream changes into CMake for future releases.

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