[Cmake] ADD_CUSTOM_COMMAND and PRE_BUILD
Brad King
brad.king at kitware.com
Thu Jan 5 11:54:55 EST 2006
William A. Hoffman wrote:
> At 06:31 PM 1/3/2006, Amit Ramesh wrote:
>> Though the current need is not as crucial, I do see some
>>pre_build scripts in the future, and was wondering if it could be
>>supported in CMake under all platforms.
> I really don't think it is possible to have pre-build rules with make.
> Working with parallel is a must.
The problem is that VS's pre-build works like this:
1.) Check if anything else in the target WILL be built.
2.) If so, run the pre-build then build other stuff.
3.) If not, do not run the pre-build or anything else.
CMake 2.2's Makefile generator does have a separate make-process per
major target, so it is possible to run a command before building
anything in a given target. However, there is no way for this command
to know whether the rest of the make process for that target will build
anything without duplicating make and doing all the work itself.
-Brad
More information about the CMake
mailing list