suppress cmake rerun

858 views
Skip to first unread message

Duc Truong

unread,
Apr 3, 2018, 8:28:29 PM4/3/18
to ninja-build
Hi all,

Is there any flag to suppress cmake rerun when running ninja?

Background: I'm running gcc within msys2 mingw64 environment, and somehow broke the build chain cmake - make and cmake - ninja. Ninja always complains about the path

ninja: error: FindFirstFileExA(c:/building/msys64c:/building/msys64/mingw64/lib): The filename, directory name, or volume label syntax is incorrect.

I was trying to patch it via search and replace the path inside the build.ninja file, but when I run ninja to build, it automatically reruns cmake to create unpatched build.ninja file again.

Thanks for any idea how to progress.

Nico Weber

unread,
Apr 3, 2018, 9:16:22 PM4/3/18
to Duc Truong, ninja-build
Since you're editing the ninja files already, you can temporarily delete the build edge for the cmake invocation. Look for "# Re-run CMake if any of its inputs changed." and delete the "build build.ninja:" line following it (and the `pool = console` in the next line), then build.

But since it looks like cmake generates an invalid ninja file somehow, maybe your inputs to cmake are incorrect and you should try to get cmake generate a correct ninja file instead :-)

--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Claus Klein

unread,
Apr 4, 2018, 2:46:56 AM4/4/18
to Duc Truong, ninja-build
If you are working under msys2, you should prevent dos drive names!

Use only something like „/c/mingw64/lib“ than it will work, I do so.

And prevent the use of dos tools and bat files, you are on a bash shell!
Also do not use the windows version of nina or cmake, use the msy2 version!!!

Duc Truong

unread,
Apr 4, 2018, 8:10:38 PM4/4/18
to ninja-build
Thank you - it works. I need to use "ninja" instead of "cmake --build" as well. Funny the whole thing works without patching until I reinstalled the whole msys2 :o
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.

Duc Truong

unread,
Apr 4, 2018, 8:10:43 PM4/4/18
to ninja-build
Yes I use both mingw64/mingw-w64-x86_64-cmake and mingw64/mingw-w64-x86_64-ninja packages on bash shell, with nothing from windows exposed. Everything works until I reinstalled msys2 (renamed the whole folder, reinstall to the original folder).

Just checked, the build.sh does not have any reference to the C drive, yet cmake generates invalid build files for ninja and MSYS Makefile.

Claus Klein

unread,
Apr 5, 2018, 6:49:07 PM4/5/18
to Duc Truong, ninja-build
This are not the msys versions!
The /usr/bin/cmake is right!
Nina must be build from source at msys shell.

Reply all
Reply to author
Forward
0 new messages