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

Trevor Kellaway tkellaway at asl-electronics.co.uk
Sat May 26 18:47:46 EDT 2007


Alex,

I thought I had it all working, but have discovered that when CMake
auto-runs under make (e.g. after a CMakeLists.txt has been modified)
there are a couple of non-obvious gotchas.

Firstly, when using "-DCMAKE_MODULE_PATH=c:\mypath" this works on the
initial CMake command line invocation, but not on subsequent make
auto-CMake runs, however if you use
"-DCMAKE_MODULE_PATH:string=c:\mypath" it seems works OK. This is
because it is only placed in the cache if it has a type specified.


A similar problem occurs in my "Toolchain-Freescale-HC12.cmake" where I
include the platform code based on the system name:

	SET (CMAKE_SYSTEM_INFO_FILE ${CMAKE_SYSTEM_NAME}-Freescale-HC12)

On a subsequent make auto-CMake run this will fail as the system name
isn't present, I've had to specify the explicit system name to
workaround this:

	SET (CMAKE_SYSTEM_INFO_FILE Windows-Freescale-HC12)

 - TrevK


More information about the CMake mailing list