[cmake-developers] [CMake] CMake 2.8.3-rc1 ready for testing!

Alexander Neundorf neundorf at kde.org
Tue Sep 28 17:20:53 EDT 2010


On Tuesday 28 September 2010, Alexander Neundorf wrote:
...
> Another option would be that I check in KDE/FPHSA.cmake
> CMAKE_PARENT_LIST_FILE to see whether KDE/FPHSA.cmake is included from a
> module in cmake or in KDE, and if it's in CMake, forward that explicitely
> to CMake/FPHSA.cmake. Unfortunately this doesn't seem work.
> I just added the following to the top of my local FPHSA.cmake:
>
> message(STATUS "parent: ${CMAKE_PARENT_LIST_FILE}")
> message(STATUS "current: ${CMAKE_CURRENT_LIST_FILE}")
>
> with the following in my CMakeLists.txt:
>
> set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
> find_package(DBusMenuQt)
> find_package(ZLIB)
>
>
> and hoped to see that I'm once include from
> ${CMAKE_SOURCE_DIR}/FindDBusMenuQt.cmake, and in the 2nd case from
> ${CMAKE_ROOT}/Modules/FindZLIB.cmake.
>
> But instead CMAKE_PARENT_LIST_FILE was always the CMakeLists.txt:
>
>
> -- parent: /home/alex/src/tests/cmake-fphsa/CMakeLists.txt
> --
> current:
> /home/alex/src/tests/cmake-fphsa/FindPackageHandleStandardArgs.cmake --
> parent: /home/alex/src/tests/cmake-fphsa/CMakeLists.txt
>
> Is this intended this way ?

The attached tiny patch seems to make CMAKE_PARENT_LIST_FILE work more like I 
expected.

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: current_parent_file.patch
Type: text/x-diff
Size: 558 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20100928/f2caf7be/attachment-0002.patch>


More information about the cmake-developers mailing list