On 8/14/2014 11:26 AM, Nagger wrote:

So ZERO_CHECK is 34 times faster. Why shouldn't I take advantage of that.
If CMake does not need to re-run, then ZERO_CHECK will always be faster than cmake build_dir. cmake build_dir will run a full configure and generate no matter what. That said, a cmake --build all, should do the same thing. Going back to your original question:


For our Continuous Integration tests we need fast incremental builds (only 
build what has changed).
This also includes that CMake only has to run if necessary (some CMakeLists.txt 
changed).
It seems there is no beautiful/portable/generator-independent way to do this?!

The way to do this is to use a ctest script. You can basically do all the stuff in your batch script. It would be something like this:

if(NOT EXISTS ${BULD_TREE)
    do_configure_and_build()
endif()

function(do_configure_and_build)
  ctest_update()
  ctest_configure()
  ctest_build()
endfunction()

Usually, it should be enough to have your version control system tell you if something has really changed. If so, you will want to do a configure/build.

-Bill

--

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

Reply via email to