[CMake] How to rename the resulting Makefile.
william.crocker at analog.com
william.crocker at analog.com
Wed Oct 13 17:31:50 EDT 2010
>
> Nevertheless,
> I think may be you did not fully read my answer (unless I'm wrong)
> but you CAN call [part of] your home made makefile rules
> ** FROM THE SEPARATE CMAKE BUILD **
I read it, I just did not get it, being a newbie and all. :-)
But, I see now.
>
> if you add some extra CMake lines like the following:
>
> add_custom_target(save
> COMMAND ${CMAKE_MAKE_PROGRAM} save
> WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
> COMMENT "Home brewed make save target")
>
> The previous line will create in the CMake generated makefile
> a rule which when invoked will call your makefile rule
> (same name) in the source tree.
>
I leave my existing makefiles in the source tree and CMake will
create the build Makefiles in the out-of-source area.
In this way they will not step on my existing makefiles.
Then, simple targets in the CMake makefiles can be used
to run the real targets in my existing makefile (which live
in the source area.)
Very clever.
Bill
More information about the CMake
mailing list