[CMake] building source code generated using another project in cmake

Chauhan, Vikas vikas.chauhan at anritsu.com
Wed Jan 20 19:30:22 EST 2010


Hi,

I have a very interesting problem. It is described below.

I have two projects Proj1 & Proj2 under a top level root directory. 
Now, the build steps are as follows:
1.	Build Proj1 into Proj1.exe
2.	Execute Proj1.exe and it generates source1.cpp as an output (it
is a source file generator).
3.	source1.cpp is now included by Proj2
4.	Build proj2.exe

On the cmake GUI "Configure" works fine however "Generate" fails at the
root directory as Proj2 does not find the source1.cpp. Do you think we
can execute projects during build environment generation process i.e
between Proj1 & Proj2 ? 
I guess that inside cmakelists.txt Proj2 can make sure that Proj1 runs
before Proj2 builds but what if Proj2 requires source files generated by
Proj1. How this can be made possible is the question. 

Thanks,
Vikas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100121/f8ec3e42/attachment.htm>


More information about the CMake mailing list