[CMake] New warnings in CMake 2.8.4-rc2

Brad King brad.king at kitware.com
Mon Feb 7 10:37:06 EST 2011


On 02/05/2011 11:33 AM, Johan Björk wrote:
> Hi Guys,
> 
> I ran into a very similar issue, It seems that CMAKE_TOOLCHAIN_FILE does
> not trigger the whatever "mark as used" code in question, so even if it
> actually *does* use the variable, you still get a warning.
> 
> Example output:
> Johan-Bjorks-MacBook-Pro-2:build-morpher phb$ cmake -G Xcode
> -DCMAKE_TOOLCHAIN_FILE=~/DEV/client/cmake/morpher-toolchain.cmake ../
> ......
> -- Configuring done
> -- Generating done
> CMake Warning: The variable, 'CMAKE_TOOLCHAIN_FILE', specified manually,
> was not used during the generation.
> -- Build files have been written to: /Users/phb/DEV/client/build-morpher

I can only get this to happen by running CMake on a build tree that already
exists.  The variable *does* get used on the *first* run in a fresh tree.
It does *not* get used later because you don't need to specify it to
regenerate.  CMake has already recorded a rule to load the file in
CMakeFiles/CMakeSystem.cmake and does not support changing the toolchain
of an existing build tree.

IOW, this is a legitimate instance of the warning.

-Brad


More information about the CMake mailing list