[CMake] cmake_check_build_system is causing a rebuild at "make install"

John Cary cary at txcorp.com
Tue Oct 13 20:01:47 EDT 2015


For future reference, one can determine what triggered the reconfigure 
by doing

   make install VERBOSE=1

It appears not to be enough to have configured with
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE.

In our case, for reasons we have not yet figured out, the depend
file for a particular .cu.o object built for a test was what was newer
and causing the rebuild. For so-far not understood reasons, this
.depend file is being touched during the build.

.........JR


On 10/13/2015 8:51 AM, cmake-request at cmake.org wrote:
> Date: Mon, 12 Oct 2015 17:41:51 -0600
> From: JR Cary <cary at txcorp.com>
> To: cmake at cmake.org
> Subject: [CMake] cmake_check_build_system is causing a rebuild at
> 	"make	install"
> Message-ID: <561C453F.1070602 at txcorp.com>
>
> In our use of cmake on a particular project, we noticed that
> after building the project, upon invoking "make install", the
> build starts all over again.  Hence we are building the project
> twice.
>
> It seems that this is occurring because nearly everything depends
> on the target, cmake_check_build_system, which sometimes causes a
> reconfiguration, i.e. reinvocation of cmake.  In particular, the
> generated Makefile's have:
>
> install: preinstall
> ...
> preinstall: all
> ...
> all: cmake_check_build_system
>
> and then the last target invokes
>
> <cmake bindir>/cmake -H<source dir> -B <build dir> --check-build-system
> CMakeFiles/Makefile.cmake 0
>
> Sometimes this causes a reconfiguration of our project and
> sometimes not.  When it does, the whole project rebuilds because
> nearly everything depends on some configure_file generated
> config.h files.
>
> How can we tell why this reconfiguring?
>
> BTW, I could not find any of the options, -B, -H, or
> --check-build-system at the documentation,
> https://cmake.org/cmake/help/v3.3/manual/cmake.1.html.
>



More information about the CMake mailing list