[CMake] What is --build-two-config good for

Robert Maynard robert.maynard at kitware.com
Thu Dec 6 09:26:49 EST 2018


It is possible to have CMake projects where an initial configuration of the
project is insufficient for it to be in a valid state. This is generally
caused by a project which evaluates variables before they exist and saved
into the cache. By running CMake a second time for these projects the
evaluation works 'as intended' at the build is the correct state.

On Thu, Dec 6, 2018 at 1:05 AM Torsten Robitzki <Torsten at robitzki.de> wrote:

> Hello,
> can someone of you tell me, what the purpose of the CTest
> —build-two-config command line option is? The documentation says, that it
> is part of the CTest Build and Test Mode and that it will cause CTest to
> run CMake twice. I’ve checked the code and yes, it does exactly this.
>
> But why? What could be the reason to run CMake twice, when running CMake
> in a test from CTest?
>
> Best regards,
>
> Torsten
> --
>
> 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:
> https://cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181206/d391dfef/attachment.html>


More information about the CMake mailing list