View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014826 | VTK | (No Category) | public | 2014-06-26 18:28 | 2015-02-10 09:43 | ||||
Reporter | Jean-Christophe Fillion-Robin | ||||||||
Assigned To | Dave DeMarle | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 6.1.rc | ||||||||
Target Version | Fixed in Version | 6.2.0 | |||||||
Summary | 0014826: VTKConfigVersion does NOT complain "appropriately" if a VTK_DIR containing a different version is passed | ||||||||
Description | Using the example below, we can see that a project expecting VTK 6 can not be built against VTK 6.1: //--------------------- cmake_minimum_required(VERSION 2.8.12) find_package(VTK 6 REQUIRED) //--------------------- cmake -DVTK_DIR:PATH=/path/to/VTKv6-build # Contain build of VTK 6.1 The message returned is: // -------------------------- $ ~/Support/cmake-3.0.0/bin/cmake -DVTK_DIR:PATH=/home/jchris/Projects/VTKv6-build/ ../ -- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /home/jchris/Support/cmake-3.0.0-rc6/Modules/FindVTK.cmake:150 (message): VTK not found. Set the VTK_DIR cmake cache entry to the directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation. Call Stack (most recent call first): CMakeLists.txt:2 (find_package) -- Configuring incomplete, errors occurred! See also "/home/jchris/Projects/sandbox/test-find-vtk6/build/CMakeFiles/CMakeOutput.log". // -------------------------- | ||||||||
Tags | hackaton | ||||||||
Project | TBD | ||||||||
Type | incorrect functionality | ||||||||
Attached Files | FindVTK.cmake [^] (1,999 bytes) 2014-06-27 10:35 | ||||||||
Relationships | |
Relationships |
Notes | |
(0032943) Brad King (developer) 2014-06-27 09:16 |
What is the message if you change the call in your application to find_package(VTK 6 REQUIRED NO_MODULE) ? |
(0032945) Jean-Christophe Fillion-Robin (manager) 2014-06-27 10:17 |
It works as expected when passing the NO_MODULE parameter. // ----------- $ cmake -DVTK_DIR:PATH=/home/jchris/Projects/Slicer-2-SuperBuild-Release/VTKv6-build/ . CMake Error at CMakeLists.txt:2 (find_package): Could not find a configuration file for package "VTK" that is compatible with requested version "6". The following configuration files were considered but not accepted: /path/to/VTKv6-build/VTKConfig.cmake, version: 6.1.0 // ----------- May be FindVTK.cmake could use the approach applied to FindDCMTK.cmake to first look up for the no modulae version. See https://github.com/InsightSoftwareConsortium/ITK/blob/c537467e72f8707ae5d7ddad87c4661aa7b2d7af/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake#L15-95 [^] |
(0032946) Brad King (developer) 2014-06-27 10:36 |
Please try replacing FindVTK.cmake in your CMake installation with the attached version. By dropping support for finding VTK 4.0 we can make it a true thin-wrapper like FindITK is. |
(0032953) Jean-Christophe Fillion-Robin (manager) 2014-06-29 16:12 |
By using the attached FindVTK.cmake and calling "find_package(VTK 6.1 REQUIRED)", I indeed get the "expected" message: // ------------------ $ ~/Support/cmake-3.0.0/bin/cmake -DVTK_DIR:PATH=/home/jchris/Projects/Slicer-2-SuperBuild-Debug/VTKv6-build/ . -- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /home/jchris/Support/cmake-3.0.0/Modules/FindVTK.cmake:58 (find_package): Could not find a configuration file for package "VTK" that is compatible with requested version "6". The following configuration files were considered but not accepted: /home/jchris/Projects/Slicer-2-SuperBuild-Debug/VTKv6-build/VTKConfig.cmake, version: 6.1.0 Call Stack (most recent call first): CMakeLists.txt:2 (find_package) -- Configuring incomplete, errors occurred! // ------------------ |
(0032961) Brad King (developer) 2014-06-30 09:41 edited on: 2014-07-01 08:41 |
I've committed the simplified FindVTK to CMake here: FindVTK: Drop support for finding VTK 4.0 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=117e7e11 [^] |
(0032962) Jean-Christophe Fillion-Robin (manager) 2014-06-30 09:46 |
Thanks. |
(0033507) Dave DeMarle (administrator) 2014-10-02 14:20 |
Fixed in cmake commit 117e7e11 |
(0034193) Dave DeMarle (administrator) 2015-02-07 23:39 |
http://review.source.kitware.com/#/c/19156/ [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-06-26 18:28 | Jean-Christophe Fillion-Robin | New Issue | |
2014-06-27 09:16 | Brad King | Note Added: 0032943 | |
2014-06-27 10:17 | Jean-Christophe Fillion-Robin | Note Added: 0032945 | |
2014-06-27 10:35 | Brad King | File Added: FindVTK.cmake | |
2014-06-27 10:36 | Brad King | Note Added: 0032946 | |
2014-06-29 16:12 | Jean-Christophe Fillion-Robin | Note Added: 0032953 | |
2014-06-30 09:41 | Brad King | Note Added: 0032961 | |
2014-06-30 09:45 | Brad King | Note Edited: 0032961 | |
2014-06-30 09:46 | Jean-Christophe Fillion-Robin | Note Added: 0032962 | |
2014-07-01 08:41 | Brad King | Note Edited: 0032961 | |
2014-10-01 22:14 | Dave DeMarle | Tag Attached: hackaton | |
2014-10-01 22:14 | Dave DeMarle | Assigned To | => Dave DeMarle |
2014-10-02 14:20 | Dave DeMarle | Note Added: 0033507 | |
2014-10-02 14:20 | Dave DeMarle | Status | backlog => closed |
2014-10-02 14:20 | Dave DeMarle | Resolution | open => fixed |
2015-02-07 23:39 | Dave DeMarle | Status | closed => backlog |
2015-02-07 23:39 | Dave DeMarle | Resolution | fixed => reopened |
2015-02-07 23:39 | Dave DeMarle | Note Added: 0034193 | |
2015-02-07 23:39 | Dave DeMarle | Status | backlog => gerrit review |
2015-02-10 09:43 | Dave DeMarle | Status | gerrit review => closed |
2015-02-10 09:43 | Dave DeMarle | Resolution | reopened => fixed |
2015-02-10 09:43 | Dave DeMarle | Fixed in Version | => 6.2.0 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |