View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015067 | CMake | CMake | public | 2014-08-07 06:56 | 2016-06-10 14:31 | ||||
Reporter | Alexander Jones | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Linux | OS | CentOS | OS Version | 6.5 | ||||
Product Version | CMake 3.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015067: include does not find files in current directory if module path discovered through CMAKE_PREFIX_PATH | ||||||||
Description | Setup: someprefix/share/mytest/cmake/MyTestConfig.cmake: include(somethingspecific) --- someprefix/share/mytest/cmake/somethingspecific.cmake: message("Hello, World!") --- somesourcecode/CMakeLists.txt cmake_minimum_required(VERSION 3.0) find_package(MyTest REQUIRED CONFIG) --- Build with cmake .. -DCMAKE_PREFIX_PATH=someprefix CMake Error at (snip)/someprefix/share/mytest/cmake/MyTestConfig.cmake:1 (include): include could not find load file: somethingspecific Call Stack (most recent call first): CMakeLists.txt:3 (find_package) This is the setup LLVM has for its config, and it does not work in our setup for the same reason. Manually adding someprefix/share/mytest/cmake to the CMAKE_MODULE_PATH fixes this, but is that not implied from someprefix being on the CMAKE_PREFIX_PATH? Our scenario is that we have many isolated package installations distributed across many prefixes, each with an entry on CMAKE_PREFIX_PATH. Thanks | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0036574) Brad King (manager) 2014-08-07 09:21 |
CMAKE_MODULE_PATH is the search path for include(). CMAKE_PREFIX_PATH is a search path for find_package() and related commands. They are completely independent. Neither implies the other. |
(0036575) Brad King (manager) 2014-08-07 09:24 |
LLVM 3.5 has improved support for CMake applications. When using LLVM 3.5 you can do something like: find_package(LLVM REQUIRED CONFIG) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") include(AddLLVM) See http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project [^] (which has been updated recently). |
(0042602) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-08-07 06:56 | Alexander Jones | New Issue | |
2014-08-07 06:56 | Alexander Jones | File Added: cmakebugtest.tar.gz | |
2014-08-07 09:21 | Brad King | Note Added: 0036574 | |
2014-08-07 09:24 | Brad King | Note Added: 0036575 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042602 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |