<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Hi All.<br></div><div><br></div><div>I am tackling the "cmake must generate config.h" problem now. In doing so, I had to study Ian's code to see how he did it and this is what I learned.*</div><div><br></div><div>In Ian's CMake code (svn co http://squeakvm.org/svn/squeak/trunk), the overview I see is as follows.</div><div><br></div><div><br></div><div>platforms/unix/cmake/configure script collects some shell variables and invokes cmake with some arguments collected from the shell script.</div><div>This runs cmake which uses the platforms/unix/CMakeLists.txt file as its commands.</div><div>The structure of this file is (broadly)</div><div>&nbsp; &nbsp; &nbsp; 1 outer global structure/variables.</div><div>&nbsp; &nbsp; &nbsp; 2. INCLUDE (in place substitution) of platforms/unix/vm/build.cmake Which is basically what is done in the current CMakeVMMaker</div><div>&nbsp; &nbsp; &nbsp; 3. INCLUDE (in place substitution) of platforms/unix/vm/config.cmake. This handles testing the system and generating the config.h files on *nix.</div><div>&nbsp; &nbsp; &nbsp; 4. other stuff (packaging and stuff I glossed over)</div><div>There are ancilliary files used for testing and Macros, but that is the overall structure.</div><div><br></div><div>Now, the encouraging part is that I am porting 3 above into the CMakeVMMaker(Squeak) stuff and it is going through the config routine and giving me output (:</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>........</div><div>-- Check size of void *<br>-- Check size of void * - done<br>CMake Error: The source directory "CMAKE_BINARY_DIR/CMakeFiles/CMakeTmp" does not exist.<br>Specify --help for usage, or press the help button on the CMake GUI.<br>CMake Error: Internal CMake error, TryCompile configure of cmake failed<br>CMake Error: The source directory "CMAKE_BINARY_DIR/CMakeFiles/CMakeTmp" does not exist.<br>Specify --help for usage, or press the help button on the CMake GUI.<br>CMake Error: Internal CMake error, TryCompile configure of cmake failed<br>-- Looking for alloca.h<br>-- Looking for alloca.h - found<br>-- Looking for sys/time.h<br>-- Looking for sys/time.h - found<br>-- Looking for sys/filio.h<br>-- Looking for sys/filio.h - not found<br>-- Looking for nanosleep<br>-- Looking for nanosleep - found<br>-- Looking for iconv.h<br>-- Looking for iconv.h - found<br>-- Looking for langinfo.h<br>-- Looking for langinfo.h - found<br>CMake Error at config.cmake:147 (TRY_COMPILE):<br>  try_compile unknown error.<br>Call Stack (most recent call first):<br>  CMakeLists.txt:88 (include)<br><br><br>-- Looking for libiconv_open in iconv<br>-- Looking for libiconv_open in iconv - not found<br>-- Looking for dlfcn.h<br>-- Looking for dlfcn.h - found<br>-- Looking for dlopen in dl<br>-- Looking for dlopen in dl - found<br>-- Looking for _dyld_present<br>-- Looking for _dyld_present - not found<br>-- Looking for snprintf<br>-- Looking for snprintf - found<br>-- Looking for __snprintf<br>-- Looking for __snprintf - not found<br>-- Looking for tzset<br>-- Looking for tzset - found<br>-- Looking for timezone<br>-- Looking for timezone - found<br>-- Performing Test HAVE_TM_GMTOFF<br>-- Performing Test HAVE_TM_GMTOFF - Success<br>-- Looking for mmap<br>-- Looking for mmap - found<br>-- Configuring incomplete, errors occurred!</div></blockquote> <br><div>Which is good. I will be getting this cleaned and ported, but the gist is it is looking good for the requirements.<br></div><div><br></div><div>Then comes modifying the plugin generation such that each plugin contributes its own config.h (this is what Ian's code does. you do a find for cmake.config in the trunk directory and you will see the individual config inputs for the plugins)</div><div><br></div><div>Its getting close. If this goes well, I should have something releasable/repeatable and documented for people to poke around in next week.</div><div><br></div><div>cheers.</div><div><br></div><div>tty</div><div><br></div><div><br></div><div>*yes, I "should" have studied it earlier, but frankly, I did not have a good feel for CMake syntax or methods, so it was all greek to me. I have a better handle on CMake now.</div></div></body></html>