<div dir="ltr">Hi,<div><br></div><div>I'm trying to build a trivial project with cmake 3.0 and Visual Studio 2013.</div><div>The project has a top-level directory, a sub-directory with the main program,</div><div>and a sub-directory that builds a static library that the main program depends on.</div><div>It all builds fine the first time. Then I change a routine in the library and rebuild.</div><div>The static library gets rebuilt but the main program does not get re-linked.</div><div><br></div><div>I have perused the cmake-built VS project for hours and it looks fine to me; the</div><div>main program depends on the library as expected. I can't figure out why the main</div><div>program is not being rebuilt.</div><div><br></div><div>More embarrassing, I can easily build a similar VS project by hand that behaves as</div><div>expected but I can' find the significant difference between the two that is causing the</div><div>problematic behavior.</div><div><br></div><div>If anyone has any insights on this I would be very appreciative.</div><div><br></div><div>Here are my three CMakeLists.txt files:</div><div><br></div><div>top level:</div><div>-----------</div><div><div>cmake_minimum_required (VERSION 2.8)</div><div>project(cmTest)</div><div>add_subdirectory (cmTestMain)</div><div>add_subdirectory (cmTestLib)</div></div><div><br></div><div>cmTestLib</div><div>--------------</div><div><div>FILE(GLOB SRC *.cpp)</div><div>FILE(GLOB H_FILES *.h)</div><div>add_library (cmTestLib STATIC ${SRC} ${H_FILES})</div></div><div><br></div><div>cmTestMain<br></div><div>----------------</div><div><div>include_directories (${cmTest_SOURCE_DIR}/cmTestLib)</div><div>add_executable (cmTestMain cmTestMain.cpp)</div><div>target_link_libraries (cmTestMain cmTestLib)</div></div><div><br></div><div>Thanks.</div><div><br></div><div>Bill</div></div>