Yes, for clarity, we do generate the files at build time, not cmake time.

Kevin


From: aaron.mead...@thomsonreuters.com [mailto:aaron.mead...@thomsonreuters.com]
Sent: Tuesday, February 21, 2012 9:14 AM
To: Kevin Schmidt; cmake@cmake.org
Subject: RE: [CMake] Shared intermediary files

I'm not sure why there would be a conflict on the generated files (unless you 
are generating them at Build time rather than at CMake time), but you can 
probably solve the issue by making one version of the Library depend on the 
other version, thus preventing them from building at the same time.

Someone with more experience may be able to jump in hear and give a better 
answer..

Aaron Meadows

From: Kevin Schmidt 
[mailto:ke...@eyesopen.com]<mailto:[mailto:ke...@eyesopen.com]>
Sent: Tuesday, February 21, 2012 8:09 AM
To: Meadows, Aaron C.; cmake@cmake.org<mailto:cmake@cmake.org>
Subject: RE: [CMake] Shared intermediary files

Hi -
  Actually, I have two calls to add_library, so they are in two projects, but 
ONE solution.  They are built simultaneously by the BUILD_ALL target

Kevin

From: aaron.mead...@thomsonreuters.com<mailto:aaron.mead...@thomsonreuters.com> 
[mailto:aaron.mead...@thomsonreuters.com]<mailto:[mailto:aaron.mead...@thomsonreuters.com]>
Sent: Tuesday, February 21, 2012 9:06 AM
To: Kevin Schmidt; cmake@cmake.org<mailto:cmake@cmake.org>
Subject: RE: [CMake] Shared intermediary files

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-boun...@cmake.org<mailto:cmake-boun...@cmake.org> 
[mailto:cmake-boun...@cmake.org]<mailto:[mailto:cmake-boun...@cmake.org]> On 
Behalf Of Kevin Schmidt
Sent: Monday, February 20, 2012 3:07 PM
To: cmake@cmake.org<mailto:cmake@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.

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.
--

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