I investigated this a little more and I think this is a bug in CMake:<br><br>[ 21%] [BISON][dvParse] Building parser with bison 2.1<br>cd C:\TEMP\datadraw\src &amp;&amp; &quot;C:\Program Files\GnuWin32\bin\bison.exe&quot; -l -d -p dv -b dv -d -o dvparse.c dvparse.y<br>
<br><b>==&gt; this is ok</b><br><br>&quot;C:\Program Files\CMake 2.7\bin\cmake.exe&quot; -E cmake_progress_report C:\TEMP\datadraw\CMakeFiles\CMakeTmp\CMakeFiles 1<br>[ 23%] Building C object CMakeFiles/datadraw.dir/dvparse.obj<br>
C:\MinGW\bin\gcc.exe&nbsp;&nbsp; -IC:\TEMP\datadraw\src\.. -IC:\TEMP\datadraw\src\..\util&nbsp; -o CMakeFiles\datadraw.dir\dvparse.obj&nbsp;&nbsp; -c C:\TEMP\datadraw\CMakeFiles\CMakeTmp\dvparse.c<br>gcc.exe: C:\TEMP\datadraw\CMakeFiles\CMakeTmp\dvparse.c: No such file or directory<br>
<br><b>==&gt; this is not</b><br><br>Why would it want to take &quot;CMakeTmp\dvparse.c&quot;?<br><br><br>I have in my CMakeLists:<br>==========================<br>add_executable(<br>&nbsp; datadraw<br><br>&nbsp; # dvParse<br>&nbsp; dvparse.c dvparse.h<br>
&nbsp; # dvScan<br>&nbsp; dvscan.c dvscan.h<br>....<br>)<br>set_source_files_properties(dvparse.c dvparse.h dvscan.c dvscan.h PROPERTIES GENERATED TRUE)<br>==========================<br>
<br>What I would expect is that CMake looks in the correct directory, being the &quot;/src&quot; one, and not the CMakeTmp one.<br><br><br>Greetings,<br>Steven<br><br><br><br><br><br><div class="gmail_quote">2008/7/14 Steven Van Ingelgem &lt;<a href="mailto:steven@vaningelgem.be">steven@vaningelgem.be</a>&gt;:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br><br><br>I am trying to convert &quot;datadraw&quot; into a CMake project, but I&#39;m running against this problem:<br>
<br><br>C:\TEMP\datadraw&gt;cmake . -G &quot;MinGW Makefiles&quot;<br>-- Building datadraw...<br>
CMake Error at cmake/prebuilt.cmake:41 (MESSAGE):<br>&nbsp; datadraw failed to build.&nbsp; This is a needed file for the database<br>&nbsp; precompilation!<br>Call Stack (most recent call first):<br>&nbsp; CMakeLists.txt:55 (INCLUDE)<br><br>

<br>This output is very small, and I cannot find any reason why it would be failing (because when I run the same command in the &quot;src&quot; directory, it&#39;s building fine).<br><br><br>The command which is building datadraw is:<br>

&nbsp; TRY_COMPILE(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATADRAW_OK<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${PROJECT_SOURCE_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${PROJECT_SOURCE_DIR}/src<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datadraw<br>&nbsp; )<br><br><br><br>Greetings &amp; thanks.<br>
</blockquote></div><br>