[cmake-developers] [CMake 0015780]: Dependencies relative to /usr/include are ignored

Mantis Bug Tracker mantis at public.kitware.com
Sat Oct 10 14:12:29 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=15780 
====================================================================== 
Reported By:                Kjell Irgens
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15780
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-10-10 14:12 EDT
Last Modified:              2015-10-10 14:12 EDT
====================================================================== 
Summary:                    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


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-10-10 14:12 Kjell Irgens   New Issue                                    
======================================================================



More information about the cmake-developers mailing list