Hi all.<div><br></div><div>I have a problem where I have a project of C++ headers and source files which are built into a .lib .dll.</div><div>Now this works just fine with CMake 2.8.x and VisualStudio 2008.</div><div><br>

</div><div>I press F7 everything builds. I press F7 again, it is all built, nothing to be done.</div><div><br></div><div>But now when I move over to vs2010, I get into problems where no matter how I build the project, it constantly want to rebuild everything.</div>

<div><br></div><div>I have tried both &#39;msbuild project.sln&#39; from the command line, as well as build (F7) inside of VisualStudio  as well as using Incredibuild. The result is the same. If I press F7, it builds everything as it was not built before.</div>

<div><br></div><div>I did some googling on the issue, and some suggest that there is a file in the project (header) which does not exist on disk, causing the problem.</div><div>We do file(glob) on all files, so a file which is not found, should not be part of the project.</div>

<div><br></div><div>Right now, it seems to be hard to reduce the problem. When I start from the full project, 107 files, it want to rebuild everything.</div><div>When I reduce the problem, I can get down to one single file, still it wants to build it. Its a c file, and there is nothing special about it. I even managed to reduce that down to one function, no includes. still the same problem.</div>

<div><br></div><div>If I copy the relevant files (a few cmakelists.txt and the directory structure, including the two files (.h .c) it builds as it should again.</div><div>I tried to run cmake and generate vs2008 files, that works. Open them in vs2010, build, then that works (with the two files only).</div>

<div><br></div><div><br></div><div>So anyway, before I put you all to sleep, as far as I know, there are two dependency parsers involved here:</div><div><br></div><div>- CMake runs through source files and generates dependencies, right?</div>

<div>- THen visual studio does the same (generating the External dependencies folder in the project). Now there is SOMETHING wrong in either one, or both or none related to VS2010.</div><div><br></div><div>Does someone have any hints on how to debug this problem? I have spent substantial time, and I cant seem to get anywhere.</div>

<div>I cant reduce it to something I can post on the list, as it just magically works when I want to rip it out.</div><div><br></div><div>At one point, I had 3 cmakelists, each with about 3 lines. 2 source files (.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded the project build and got the error. Fairly simple scene. But as soon as I try to move that to another dir, it fails.</div>

<div><br></div><div>Thankful for any advice on the matter.</div><div><br></div><div><br>-- <br><br>
</div>