These are chat archives for inbilla/CMake

8th
Nov 2016
Michael Kelley
@kelleyma49
Nov 08 2016 01:37
Hi guys - I tried the https://github.com/JeremieA/CMake/tree/fastbuild-attempt2 branch and I ran into an issue. Here's my pull request that describes the issue and a possible solution: JeremieA/CMake#1.
I also ran into another issue that I'm not sure how to solve. The generated fastbuild file from that branch uses cmake.exe to link my executable. Fastbuild will attempt to generate a response file and pass it the cmake.exe, but cmake.exe does not accept response file. This causes a link failure.
Packadal
@packadal
Nov 08 2016 07:11
@pzz2011 #cmake on freenode
@doodlydroll one way you could run the tests without having the fastbuild generator being self-hosting would be to configure/generate with fastbuild, and copy/paste the executables from another folder where you used ninja/makefiles/whatever
this should allow you to run the tests without being able to compile CMake, but those tests are CMake's unit tests, and they require at least the ability to generate for a simple project
@kelleyma49 I have no idea in what state the fastbuild-attempt2 is in, @urza57 could you pitch in ?
doodlydroll
@doodlydroll
Nov 08 2016 11:09

Thank you @packadal. I've got a tiny progress. I can generate with fastbuild now. Compilation does not work. I've fixed escaping of ',",$ and use of / instead of \ as path separator. Next on my list would be to fix the thing about running commands via a shell. That is a must. The problem is that cmake always escapes the commands for use with a shell. For instance if I have -Dfoo="bar" it would make it as -Dfoo=\"bar\". That would be plain wrong if executed directly as fastbuild would normally do. I think for now we shall always run via a shell - at least to start with. I have not figured out how to do that yet.

Back to the testing, I am not sure how this works. Most of the tests (80%) run cmake (executable) or ctest . When that is run the generator is not specified. The default generator is platform dependent. I do not think building cmake with fastbuild would make it default in anyway. So the idea of building cmake with fastbuild and then run the tests is weird to me. As fast as I can see, default generator for linux/mac os gnumake, and on windows VS (some version). I guess I can try to add some debug to check what I am saying is true... And of course, I will try your suggestion @packadal.

doodlydroll
@doodlydroll
Nov 08 2016 22:14

Hey @packadal. I see now how this works. Tests generated in the build directory would set fastbuild as generator. I tried your approach. Unfortunately it does not work. Most tests are skipped with output containing lines like this:

27: Test command: NOT_AVAILABLE
Test not available without configuration. (Missing "-C <config>"?)
1/1 Test #27: CommandLineTest ..................*Not Run 0.00 sec