[cmake-developers] [CMake 0012325]: FindDCMTK: Does not work when CMAKE_MODULE_PATH has been modified.
Mantis Bug Tracker
mantis at public.kitware.com
Fri Jul 8 13:27:06 EDT 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12325
======================================================================
Reported By: Dan Thill
Assigned To:
======================================================================
Project: CMake
Issue ID: 12325
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-07-08 13:27 EDT
Last Modified: 2011-07-08 13:27 EDT
======================================================================
Summary: FindDCMTK: Does not work when CMAKE_MODULE_PATH has
been modified.
Description:
When FindDCMTK includes FindPackageHandleStandardArgs, this will fail if
CMAKE_MODULE_PATH has been modified (under some circumstances). This was
discovered when I was making my own copy of FindDCMTK with some bug fixes and
putting it into my local source directory in order to override the stock one.
Steps to Reproduce:
1) Make a copy of FindDCMTK.cmake and put into your local source directory.
2) In CMakeLists.txt, do the following:
-------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} ${CMAKE_MODULE_PATH})
PROJECT(SomeProject)
FIND_PACKAGE(DCMTK)
-------------------------------------------
You will get the following error:
CMake Error at FindDCMTK.cmake:136 (include):
include could not find load file:
[full path to src directory]/FindPackageHandleStandardArgs.cmake
Call Stack (most recent call first):
CMakeLists.txt:8 (FIND_PACKAGE)
CMake Error at FindDCMTK.cmake:137 (find_package_handle_standard_args):
Unknown CMake command "find_package_handle_standard_args".
Call Stack (most recent call first):
CMakeLists.txt:8 (FIND_PACKAGE)
Additional Information:
Fix is modify FindDCMTK.cmake:135 and change:
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
to
include(FindPackageHandleStandardArgs)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-07-08 13:27 Dan Thill New Issue
======================================================================
More information about the cmake-developers
mailing list