On 3/6/2012 9:09 PM, Clifford Yapp wrote:
We use the same configuration tests on all platforms in an effort to
avoid having large chunks of platform-specific code in our build files,
but we pay a price for this on Windows - the same test process is more
than an order of magnitude slower with MSVC than (say) Linux.

Does CMake launch the MSVC C++ compiler each time it needs to do a
TRY_COMPILE or similar test?  If so, does anybody know of any techniques
for combining tests or some way to run a cl.exe instance as a "daemon"
to which multiple files can be fed without needing a full restart of cl.exe?

No, good way to do this on windows. The best you can do is to make sure it tries the windows stuff first, and that you remove as many try-compiles as possible when on Windows. Not only does CMake launch cl.exe, but it will also launch devenv.com with command line build arguments.... :) It is the only way to make sure that the compile environments are exact. So, you can optimize a build for windows with a bit of work, but there is nothing easy to do from CMake to make this faster.

-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to