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 && "C:\Program Files\GnuWin32\bin\bison.exe" -l -d -p dv -b dv -d -o dvparse.c dvparse.y<br>
<br><b>==> this is ok</b><br><br>"C:\Program Files\CMake 2.7\bin\cmake.exe" -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 -IC:\TEMP\datadraw\src\.. -IC:\TEMP\datadraw\src\..\util -o CMakeFiles\datadraw.dir\dvparse.obj -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>==> this is not</b><br><br>Why would it want to take "CMakeTmp\dvparse.c"?<br><br><br>I have in my CMakeLists:<br>==========================<br>add_executable(<br> datadraw<br><br> # dvParse<br> dvparse.c dvparse.h<br>
# dvScan<br> 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 "/src" 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 <<a href="mailto:steven@vaningelgem.be">steven@vaningelgem.be</a>>:<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 "datadraw" into a CMake project, but I'm running against this problem:<br>
<br><br>C:\TEMP\datadraw>cmake . -G "MinGW Makefiles"<br>-- Building datadraw...<br>
CMake Error at cmake/prebuilt.cmake:41 (MESSAGE):<br> datadraw failed to build. This is a needed file for the database<br> precompilation!<br>Call Stack (most recent call first):<br> 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 "src" directory, it's building fine).<br><br><br>The command which is building datadraw is:<br>
TRY_COMPILE(<br> DATADRAW_OK<br> ${PROJECT_SOURCE_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp<br> ${PROJECT_SOURCE_DIR}/src<br> datadraw<br> )<br><br><br><br>Greetings & thanks.<br>
</blockquote></div><br>