View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015780 | CMake | CMake | public | 2015-10-10 14:12 | 2016-06-10 14:31 | ||||
Reporter | Kjell Irgens | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Linux | OS | Fedora | OS Version | 22 | ||||
Product Version | CMake 3.3.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015780: Dependencies relative to /usr/include are ignored | ||||||||
Description | Include files which are included relative to /usr/include (or /usr/local/include) do not end up in depend.make. I do not know if this is some kind of optimization to speed up dependency checking, but there should at least be some way to ensure that a specific subdirectory of /usr/include (like /usr/include/curl in the example below) is included. The way it works on unix-like systems now, some external projects (like gtk) have include dependencies checked while others (like curl) do not. This is not very consistent. This may of course be a Fedora-specific problem, I have not checked that. | ||||||||
Steps To Reproduce | CMakeLists.txt: cmake_minimum_required (VERSION 3.2) project(mytest VERSION 1.0) set(PROJECT_RELEASE rc2) include_regular_expression("^.*$" "^.*$") find_package (CURL REQUIRED) add_executable (a.out main.cpp) main.cpp: #include <curl/curl.h> int main() {return 0;} Then run: cmake . make Output of make: CMake Error: Cannot find file "curl/curl.h". [ 50%] Building CXX object CMakeFiles/a.out.dir/main.cpp.o [100%] Linking CXX executable a.out ls -l /usr/include/curl/curl.h -rw-r--r--. 1 root root 89014 Dec 28 2014 /usr/include/curl/curl.h | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0039563) Greg Jung (reporter) 2015-10-10 14:57 |
Use "curl/curl.h" and it works ok. Brackets imply looking in the system include directories attached to the compiler. |
(0039564) Kjell Irgens (reporter) 2015-10-10 16:23 |
It did now work any better for "curl/curl.h" here. Dependencies are added for other include files in brackets, as long as they are relative to a different directory like/usr/include/gtk-2.0. I really don't see the logic here. Even if this is how it works, it is unfortunate that CMake has a different idea of where to look for include files than the compier does. I have never seen a C/C++ compiler on any UNIX-like platform that has not found include files relative to /usr/include. |
(0042852) 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 |
2015-10-10 14:12 | Kjell Irgens | New Issue | |
2015-10-10 14:57 | Greg Jung | Note Added: 0039563 | |
2015-10-10 16:23 | Kjell Irgens | Note Added: 0039564 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042852 | |
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 |