These are chat archives for inbilla/CMake

27th
Jul 2018
Theodore Newton
@twln1
Jul 27 2018 00:02
@JacksonFurrier Weird thing is that same clang version will work fine for -GNinja or just plain cmake so I don't really understand what the issue is.
Colin GUYON
@colin-guyon
Jul 27 2018 08:34
Hello, sorry for not being reactive
I worked on another branch to take another base branch for the FASTBuild generator, the one from JeremieA instead of the one from @comicfans, because a few things are important on this branch (https://github.com/JeremieA/fastbuild/commits/dev-IS) and I didn't succeed to quickly backport them on the comicfans' version. I think one of the important things is to always have the same fbuild.bff output when the input does not change, so that FASTBuild does not re-parse the file each time.
But at the end we will have to take some useful commits/fixes from the comicfans' version.
Here is the last version, that successfully compiles projects in my company: https://github.com/InSimo/CMake/commits/fastbuild-attempt3
With this version you also need to compile a slightly modified version of FASTBuild: https://github.com/InSimo/fastbuild/commits/dev-IS-2
So you can test it if you want ;)
It is based on CMake 3.12.0 and FASTBuild 0.96
Colin GUYON
@colin-guyon
Jul 27 2018 08:48
@twln1 Your issue if certainly due to the fact that FASTBuild tries to parse the compiler executable name to guess a "compilerFamily", but it is limited to a fixed list: https://github.com/fastbuild/fastbuild/blob/master/Code/Tools/FBuild/FBuildCore/Graph/CompilerNode.cpp#L147
"clang-3.6" is not part of it. Maybe with some CMake env var you could tell CMake that the executable to take is "clang" (I guess clang is a symlink to clang-3.6, or the contrary ?). Else, FASTBuild could maybe be improved to correctly guess the compilerFamily even if the version of the compiler is in the file name... (or temporarily you could add "clang-3.6" in FASTBuild CompilerNode.cpp)
Colin GUYON
@colin-guyon
Jul 27 2018 09:02
@twln1 Maybe you could set the C / CXX env vars to point to "\usr\bin\clang" (if it is indeed the same as your clang-3.6) (https://gitlab.kitware.com/cmake/community/wikis/FAQ#how-do-i-use-a-different-compiler)
Ádám Szűcs
@JacksonFurrier
Jul 27 2018 10:41
@colin-guyon awesome, do you plan to upstream this to both Fastbuild and CMake? I will be back as soon as I tested these version on our codebase, but before thanks for the great work you have put into this. This must be an officially supported generator!
Colin GUYON
@colin-guyon
Jul 27 2018 11:54
@JacksonFurrier Thanks ;) (but my work is limited compared to the ones who initiated the generator). Indeed it would be really great to upstream this to CMake and Fastbuild, even though I think it would need some cleaning before. I won't have time to work on it in short term, but at the end this is a goal.
Maybe also some of the changes made in FASTBuild could be removed and done using existing features of FASTBuild (the author of FASTBuild could give his feelings on this).
The distributed compilation works for my cases but this would certainly need to be improved to handle more cases (currently only tested on Windows with MSVC 2015).