It seems that the PROJECT() command does a fair bit behind the scenes and is not documented enough. It seems to "reset" several variable created before it was _first_ called.
Since i use cmake from cross compilation, i have created Platform files for Generic-gcc.cmake and Generic-gcc-uc3b1256.cmake (for the processor that I use) 1) It seems that these files are invoked inside the PROJECT() command 2) The platform files set up some needed variables such as CMAKE_C_FLAGS 3) When the PROJECT() command finishes, the variable CMAKE_C_FLAGS is again empty. The above is only true on the first run of cmake and hence executing "make rebuild_cache" overcomes the issue. Bug? -- Cheers! Kishore _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake