[CMake] Passing CMAKE_TOOLCHAIN_FILE on command line causes CMake warning

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Feb 6 08:05:25 EST 2013


On Wed, Feb 6, 2013 at 5:59 AM, Pat Marion <pat.marion at kitware.com> wrote:
> Hi,
>
> I'm emailing about bug 13093 in the backlog.  I found comments by Brad that
> suggest it's a legitimate warning, but I'm not sure how a project could
> avoid the warning.  Maybe cmake could send a fatal error if the toolchain
> filename differs from the filename that was used originally to generate the
> build tree, but otherwise suppress the warning?  I'm happy to try fixing the
> issue myself, but maybe a cmake developer can revisit the bug report and let
> me know what they think.  Thanks!
>
In the context of external project you can simply switch to
CMAKE_CACHE_ARGS rather than CMAKE_ARGS. You get around argument
length limitations on the more brain dead platforms and will never see
these warnings.

I like the feature they added, but wish they had defaulted it to off
(as was previous behavior) so that we saw it when debugging/checking a
project just like we turn on the warnings with compiler flags...

Marcus


More information about the CMake mailing list