sakra / cotire

CMake module to speed up builds.
MIT License
1.3k stars 142 forks source link

Xoreax IncrediBuild does not work with precompiled headers created by cotire #11

Closed nikolayku closed 9 years ago

nikolayku commented 12 years ago

Hi, thanks for the great project. There is an issue using Cotire(v1.2) with Xoreax Incredibuild(v3.6, v4.5). It looks like that Incredibuild can’t generate unity file and prefix headers. This problem also exist when use manual generated precompiled headers.

Using Cotire without Incredibuild works great. Cotire configuration is simple: SET(PROJECT Utils.Cpp98) ... SET(BUILD_TYPE SHARED) ... COTIRE(${PROJECT})

But if we use Visual Studio compiler it work fine. Incredibuild and msbuild logs:

--------------- Visual studio compiler (without Incredibuild) -------------------------------- 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug Win32 ------ 1>Deleting intermediate and output files for project 'ZERO_CHECK', configuration 'Debug|Win32' 1>Checking Build System 1>CMake does not need to re-run because D:/engine/.build/CMakeFiles/generate.stamp is up-to-date. 1>CMake does not need to re-run because D:/engine/.build/engine/Utils/CMakeFiles/generate.stamp is up-to-date. 1>CMake does not need to re-run because D:/engine/.build/engine/Utils/Lz4/CMakeFiles/generate.stamp is up-to-date. 1>Build log was saved at "file://d:\engine.build\ZERO_CHECK.dir\Debug\BuildLog.htm" 1>ZERO_CHECK - 0 error(s), 0 warning(s) 3>------ Rebuild All started: Project: Utils.Cpp98, Configuration: Debug Win32 ------ 3>Deleting intermediate and output files for project 'Utils.Cpp98', configuration 'Debug|Win32' 3>Performing Pre-Build Event... 3>Generating CXX unity source engine/Utils/Debug/cotire/Utils.Cpp98_CXX_unity.cxx <!-- GENERATE UNITY FILE 3>Generating CXX prefix header engine/Utils/Debug/cotire/Utils.Cpp98_CXX_prefix.hxx <!-- GENERATE PREFIX FILE 3>Building Custom Rule D:/engine/code/cpp98/Utils/CMakeLists.txt 3>CMake does not need to re-run because D:\engine.build\engine\Utils\CMakeFiles\generate.stamp is up-to-date. 3>Compiling... 3>ClLog.cpp ............ a lot of .cpp, but compilation successful ..........

---------------------- Incredibuild(probably it can’t generate unity and prefix file ------------------------- Initializing... Deleting intermediate files and output files for project 'ZERO_CHECK - Debug|Win32' Deleting intermediate files and output files for project 'Lz4 - Debug|Win32' Deleting intermediate files and output files for project 'Utils.Cpp98 - Debug|Win32' --------------------Configuration: ZERO_CHECK - Debug|Win32-------------------- Checking Build System CMake does not need to re-run because D:/engine/.build/CMakeFiles/generate.stamp is up-to-date. CMake does not need to re-run because D:/engine/.build/engine/Utils/CMakeFiles/generate.stamp is up-to-date. CMake does not need to re-run because D:/engine/.build/engine/Utils/Lz4/CMakeFiles/generate.stamp is up-to-date. --------------------Configuration: Utils.Cpp98 - Debug|Win32-------- Performing Pre-Build Event... --------------------Build System Error----------------------------------------- Fatal error: Task queue management failed. <- Precompiled header define map unavailable (x:\Dev\ib\VCDepEvalTask.pas, line 357)


1 build system error(s)

sakra commented 12 years ago

Can you please run cotire with the option COTIRE_DEBUG turned on, i.e.:

 cmake -DCOTIRE_DEBUG=TRUE ..

Then copy the resulting to this thread as a comment.

nikolayku commented 12 years ago

Hi. Thank you for quick response. There is our log (with -DCOTIRE_DEBUG=TRUE). I paste it into pastebin.com

http://pastebin.com/1a53Zm6F

mlimber commented 6 years ago

Just wondering why this was closed. Are cotire and IncrediBuild inherently incompatible?

ISTM like the two could be useful together on large projects -- say, a unity build of 100 files split into unity batches of 10 or 20 files OR a project with many sub-projects creating libraries or executables that could each be "unitized".