[cmake-developers] User vs CMake include mismatch handling
Alexander Neundorf
neundorf at kde.org
Sun Nov 21 12:39:39 EST 2010
On Saturday 20 November 2010, Alexander Neundorf wrote:
> On Thursday 18 November 2010, Brad King wrote:
> > On 11/18/2010 04:20 PM, Alexander Neundorf wrote:
> > > The direct call of find_package(ZLIB) from CMakeLists.txt would get the
> > > FindZLIB.cmake from CMAKE_MODULE_PATH, since here somebody outside
> > > CMAKE_ROOT is the includer.
> >
> > Okay, that works for the case of dependent find-modules as long as the
> > project is aware of all the dependencies. What about fixes to compiler
> > info files? We don't want projects to have to make copies of all the
> > Modules/CMake*Information.cmake files and their dependencies.
...
> What can be done...
I think this would be the thing to do (didn't test, but should work):
cmake_minimum_required(VERSION 2.8.4)
cmake_policy(SET CMP0017 OLD)
project(MyProject C CXX)
cmake_policy(SET CMP0017 whatever_they_like)
(if there wouldn't be 2.8.4 required at the top, it would work anyway, but
with warnings, if the policy goes in to cmake and is WARN by default).
Alex
More information about the cmake-developers
mailing list