[CMake] building executable from static libs

Benjamin Roy Benjamin.Roy at irisa.fr
Wed Oct 11 10:29:11 EDT 2006


Hi,

My question should sound like a dummy one, but can't find the answer by 
myself, maybe I have not understand clearly the spirit of Cmake...

I try to change a build system from automake/autoconf under Cmake on 
linux, due to some portability issues...

So I need to build some executable from static library I build just 
before, actually I have this Chronology :
1-run Cmake in order to configure and create the make to build the 
static lib
2-run make to build the static library
3-re-run Cmake to update the make for the executable
4-run make to build the executable

And i try to avoid the step 3 and 4 in order to generate a make that 
build directly the executable after build static lib without re-run Cmake.

I try few solution based on test with IF or 
SET_SOURCE_FILES_PROPERTIES(... GENERATED ) or try to use dependencies 
and ADD_CUSTOM_TARGET/ADD_CUSTOM_COMMAND , but no one of this solutions 
is working fine.

So I ask for possible solutions.

Thanks in advance

Benjamin



More information about the CMake mailing list