[CMake] Re-executing CMake from the Makefile.

Óscar Fuentes ofv at wanadoo.es
Thu Aug 14 11:49:44 EDT 2008


Bill Hoffman <bill.hoffman at kitware.com>
writes:

>> If this is not possible, I would like to stop `make' when
>> /my/file/output changes, possibly showing some message to the user
>> instructing him to invoke `make' again.
>>
> You could just return an error code from the command that builds the
> /my/file/output, that should stop make from running.

Okay.

>> All this is because /my/file/input actually is an script that is used
>> for determining which libraries the executables depends on. The current
>> build system builds the libraries, then the script and finally the
>> executables. As initially it is impossible for `cmake' to stablish
>> dependencies between libraries and executables, I wish the build to stop
>> or restart once the script is built and re-execute cmake so it can use
>> the script for inquiring what the dependencies are, re-generate the
>> makefiles and continue the build.
>>
>
> Why does the script need to be constructed at make time?  Seems like
> you could push a bit more of the work into the script itself and all
> should be good.

The script examines library interdependencies dumping the symbol
definitions and references they contain. For this, you need to build the
libraries first. Later on the build, the executables just provide names
of components, the script maps this names to actual libraries and
returns the full list of needed libraries on the correct order for using
it on the link command.

If you know an elegant way to handle this with CMake, I'll like to hear
it.

BTW, this is for the Low Level Virtual Machine (LLVM) www.llvm.org

Thanks, Bill.

-- 
Oscar



More information about the CMake mailing list