[CMake] Shared intermediary files

aaron.meadows at thomsonreuters.com aaron.meadows at thomsonreuters.com
Tue Feb 21 09:06:16 EST 2012


Can you clarify your setup just a bit?  

 

Do you have two ways you configure the build tree, once as Dynamic and
once as Static libraries?  And you are building both at the same time?

 

Or

 

Are you are calling add_library() twice with the same input files but
specifying SHARED on one of them, so they are all building together in
one project (i.e. Visual Studio Solution)?

 

Or

 

Doing something completely different?

 

Aaron Meadows

 

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of Kevin Schmidt
Sent: Monday, February 20, 2012 3:07 PM
To: cmake at cmake.org
Subject: [CMake] Shared intermediary files

 

Hello,

  I'm in the process of converting over a large, monolithic tree with
many libraries from a custom build solution over to cmake.  So far,
we've loved it.  I am wondering about others' solutions to a problem we
have encountered. 

 

We have more than a few cases of generated source files - for example,
Qt moc files.   These all get dumped into CMAKE_CURRENT_BINARY_DIR.
Now, the libraries we have build both static & shared, and have the same
source files.  In Visual Studio, this generates two projects in the
solution.  It seems that these do not share dependencies.  Occasionally,
this means that both libraries try to write to the generated source file
at the same time, which generates a (false) build failure.  

 

What do others do?  Am I misunderstanding something?

Kevin


This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120221/4c3b92c9/attachment.htm>


More information about the CMake mailing list