Am 14.08.2014 16:31, schrieb David Cole:
We have a fairly large project with about 400 targets.
$ cmake %builddir%
-> takes about 5 minutes for a No-op
$ cmake --build %builddir% --target ZERO_CHECK
-> takes 20 seconds for No-op
This is the problem.
"cmake %builddir%" should be as fast as possible for a no-op... If it's
not, it would be good to solve the real underlying problem that causes
it to take 5 minutes for "nothing" rather than write elaborate scripts
to try to workaround it.
I already had a look into our large generation time. They are multiple
reasons, not one big issue which can be solved easily.
But with all due respect, its not just a 'workaround'. I do not want to
re-compile things that haven't changed, so i also do not want to
re-generate if nothing has changed.
A ZERO_CHECK (comparing timestamps of all used CMakeLists.txt) will
always be faster than generating the project.
Test with CMake 3.0.1 configuring CMake itself:
$ git describe
v3.0.1-1690-geb3b550
$ cmake --version
cmake version 3.0.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ time cmake build
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Playground/cmake/cmake/build
real 0m14.414s
user 0m0.000s
sys 0m0.015s
$ time cmake --build build --target ZERO_CHECK
Microsoft (R) Build Engine version 4.0.30319.17929
[....]
real 0m0.421s
user 0m0.000s
sys 0m0.015s
So ZERO_CHECK is 34 times faster. Why shouldn't I take advantage of that.
Thank,
Marc
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake