[CMake] Trouble with library Dependencies not being reflected in the generated project files
Austin Hicks
camlorn38 at gmail.com
Tue Aug 26 14:28:16 EDT 2014
Hello,
I'm having some interesting problems with dependencies, and I'm
trying to determine if this is my fault or CMake's. For the record, I'm
on cmake 3.0.1, Windows 7, and Visual Studio 2013.
I've got a project consisting of a vendored copy of Portaudio, a shared
library, and something like 10 example programs. I've set everything up
in the obvious manner-the example programs go to the library with
target_link_libraries. The example programs do not rebuild with the
library. I've been fighting with it for 6 hours.
And here comes the strangeness that makes me think this may not be my fault.
First, there is one generated file, made through add_custom_command to a
python script. I thought this could be the problem, but temporarily
turned it into a regular static file. No luck.
So I went to the Graphviz output. There is an explicit dependency from
the executables to the library, and everything looks right. This is
apparently not being reflected in any of the three backends I tried:
NMake Makefiles, NMake Makefiles JOM, or VS2013 MSBuild scripts.
I have tried a full regeneration of the build tree along with everything
I've done to fix it, so this isn't some sort of phantom state (I saw
that once or twice). Not unless CMake stores stuff outside my build tree.
I've not posted my CMakeLists.txt here because it's actually 5 linked by
add_subdirectory. I can attach them, link to the Github repository, or
post them in an e-mail one after another. I'm not sure what the
convention is, and this problem is something I've not yet managed to
isolate to a small test case.
Any help is appreciated.
More information about the CMake
mailing list