[CMake] Why does CMAKE_FIND_FRAMEWORK always default to FIRST ignoring command line definitions?
David Cole
david.cole at kitware.com
Tue May 29 15:12:30 EDT 2012
On Tue, May 29, 2012 at 2:33 PM, Charlie Sharpsteen <chuck at sharpsteen.net>wrote:
>
> Charlie Sharpsteen wrote
> >
> >
> > Rolf Eike Beer wrote
> >>
> >> Because those value is set in the Darwin platform file
> >> (Modules/Platform/Darwin.cmake) which is taken into account by the
> >> PROJECT()
> >> call. So this is just overridden.
> >>
> >> Eike
> >>
> >
> > Any reason those definitions can't be protected by `IF(NOT DEFINED
> > CMAKE_FIND_FRAMEWORK)`? If I can't override the default from the command
> > line, it seems like the only recourse is to maintain patches for every
> > project I am trying to build with CMake--a very messy and fragile
> > solution.
> >
> > -Charlie
> >
>
>
> I would like to bump this thread again because it is causing us some pain
> over on the Homebrew package manager. For example, if the user has
> installed
> a package like the Mono distribution, there are a lot of 32-bit Framworks
> that get swept into anything compiled CMake and this breaks the builds:
>
> https://github.com/mxcl/homebrew/issues/11030
>
> In this situation it would be _really helpful_ to be able to tell CMake,
> via
> the command line, to use our 64-bit libraries first before looking at the
> 32-bit frameworks. Unfortunately, since the defaults in the platform file
> override the command line arguments there is no way to do this without
> patching the CMake build files for every software package we manage---an
> infeasible solution.
>
> So, is there any reason `IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)` cannot be
> used in the platform file to protect command line arguments?
>
I can't think of a good reason not to use that construct.
Questions:
Is there a homebrew build of CMake that you're using?
Can you patch it with `IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)` where
appropriate?
If you can, and you do, are there any noticeable ill effects? (Do all the
CMake tests pass?)
If the answers to these questions are reasonable, then I'd take a patch
that does what you want with respect to variables used in Darwin.cmake, no
problem.
Thanks,
David
> -Charlie
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Why-does-CMAKE-FIND-FRAMEWORK-always-default-to-FIRST-ignoring-command-line-definitions-tp7521759p7579586.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120529/38d5c646/attachment.htm>
More information about the CMake
mailing list