[CMake] [Dev] CMake 2.5-20070519 and tool chain support

Trevor Kellaway tkellaway at asl-electronics.co.uk
Sat May 26 12:41:07 EDT 2007


Alex,

In my tool chain file I've added a "MESSAGE (...)" to show when each
file is loaded, and note that the tool chain file is being loaded twice
when starting with an empty binary directory.

 >cmake -G"NMake Makefiles"
-DCMAKE_TOOLCHAIN_FILE=Toolchain-Freescale-HC12 ..\..\source
 Loaded: Toolchain-Freescale-HC12.cmake
 Loaded: Toolchain-Freescale-HC12.cmake
 Loaded: Windows-Freescale-HC12.cmake
 Loaded: Windows-Freescale-HC12-opt.cmake

Running CMake again without removing the cache file results in it being
loaded three times.

Any idea why?

PS: I'd suggest that CMakeDetermineSystem.cmake's loading of the tool
chain file should also search CMAKE_SOURCE_DIR after the binary
directory, this would allow me to easily version manage this file in my
source tree (you tend not to version manage the build tree).

- TrevK


More information about the CMake mailing list