[CMake] How to rename the resulting Makefile.
Eric Noulard
eric.noulard at gmail.com
Tue Oct 12 12:11:33 EDT 2010
2010/10/12 william.crocker at analog.com <william.crocker at analog.com>:
>
> I will use cmake to build the app on my various platforms
> (Linux/Windows...).
> Most of my convenience targets are only used during development (Linux)
> so it is typically okay that they are not cross platform.
ACK.
>>
>> file(xxxx ...) commands
>>
>
> Yes I see.
> But if I had the ability to change the name of the Makefile I could
> start using cmake right now. If I have to rewrite my entire makefile
> the cmake way (all or nothing) it will take weeks.
How many "custom rules" do you have?
Weekssss looks like a lot of time :-)
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 **
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.
Those lines may easily be generated with a small script.
> Anyway. I understand. We can leave it at that.
>
> Thanks for all the help.
You are welcome.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list