Hello

I'm converting a big internal buildsystem over to cmake and need to
expose some .o files after the build[1]. I have looked around on the
web but not found a definitive answer for a way to do this, I'm
contemplating two ways of doing it:

* as a post_build command I create links in the filesystem to
"publish" the .o files
* create special targets to generate the .o file and then collecting
them into ALL

I would like to go the first way and hook into the .o generation, but
I have not found a way to do that. Alternatively I might do it in the
macro that I use to build all executables and libraries but the name
mangling to find the files feels hard to do in a robust way.

So, my questions to the list is:
* Is there a way to add steps to the .c to .o build rule?
* Is there some definition of how the .o files is named within the
CMakeFiles directory, other then the cmake-source?
* Anyone have another idea about how to solve my problem?


Best regards
/jp

[1] Reasons for this:
* In a few places dynamic linking is preformed from within the
application and it needs the .o file. (Don't ask. It will be cleaned
up sooner or later but for now it needs to be .o)
* More serious is that we need to do it staged and only change the
core product now keeping the old build system for dependant
projects/products for some time, and the old system expects to link to
.o files in the core product.

-- 
jens persson
<j...@persson.cx>
Mäster Olofsväg 24
S-224 66 LUND;SWEDEN
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to