[cmake-developers] [CMake 0013665]: include_directories(SYSTEM) should promote

Mantis Bug Tracker mantis at public.kitware.com
Thu Nov 8 17:01:40 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13665 
====================================================================== 
Reported By:                mwoehlke
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13665
Category:                   CMake
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-11-08 17:01 EST
Last Modified:              2012-11-08 17:01 EST
====================================================================== 
Summary:                    include_directories(SYSTEM) should promote
Description: 
In some instances (possibly related to CMake version),
include_directories(SYSTEM ${foo}) has no effect.

Steps to Reproduce: 
include_directories(${foo}) 
include_directories(SYSTEM ${foo}) 

Additional Information: 
It appears that CMake ignores an include_directories(SYSTEM) for include
directories that already exist. This is more likely in large projects where e.g.
a top-level CMake file (or even a UseFoo.cmake) includes directories without
SYSTEM, and a leaf CMakeLists.txt does an include_directories(SYSTEM) of the
same directories.

I think it would be better following the expected behavior of
include_directories if, rather than ignore the directive if the directory is
already in include_directories, to 'promote' it to SYSTEM (probably without
changing the order).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-11-08 17:01 mwoehlke       New Issue                                    
======================================================================




More information about the cmake-developers mailing list