View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014415CMakeModulespublic2013-09-16 08:402015-04-14 08:24
ReporterAxel Huebl 
Assigned ToJames Bigler 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionnot fixable 
PlatformLinuxOSDebian/UbuntuOS VersionWheezy
Product VersionCMake 2.8.11 
Target VersionFixed in Version 
Summary0014415: FindCUDA.cmake INCLUDE_DIRECTORIES add/honor optional SYSTEM flag
DescriptionLike GCC, nvcc knows and honors the "-isystem " include flag instead of "-I ".

It would be nice, if the CUDA_NVCC_INCLUDE_ARGS would not "copy all includes to -I" but use the appropriate isystem flag instead if it was set before:

  http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindCUDA.cmake;h=0390ae4ad78447c0ce1cb32a899e9d0f1218d952;hb=HEAD#l1040 [^]
Steps To ReproduceWrite an example CUDA program using, e.g. boost program options.
...
FIND_PACKAGE(Boost REQUIRED COMPONENTS program_options)
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
...

make VERBOSE=1

FindCUDA will add all SYSTEM libraries with -I instead of -isystem when calling nvcc.
Additional InformationThats the line when it happens:
  http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindCUDA.cmake;h=0390ae4ad78447c0ce1cb32a899e9d0f1218d952;hb=HEAD#l1040 [^]
TagsNo tags attached.
Attached Files

 Relationships
related to 0015458closedKitware Robot Expose SYSTEM INCLUDE_DIRECTORIES to CMake code 

  Notes
(0038249)
Axel Huebl (reporter)
2015-03-18 17:46

hi, any are there planned updates on that issue? :)
(0038250)
James Bigler (developer)
2015-03-18 18:09

Since FindCUDA uses the get_directory_property(INCLUDE_DIRECTORIES) command, I'm not sure how to tell the difference between includes that are system paths and ones that are not. So far as I can tell the results from this command are only paths (no additional meta-data is associated with them). All calls to include_directories() are equal.
(0038251)
Axel Huebl (reporter)
2015-03-18 18:15

Agreed, that is the problem that I found in the code linked above, too.
Is it possible that we need a (new) method in cmake itself that allows us to read/restore such meta-attributes for the individual directories?
(0038252)
James Bigler (developer)
2015-03-18 18:19

That might be possible, but adding additional information about the type of path would have to be brought up with the full CMake team and is beyond the scope of this bug. If such a feature was implemented, then FindCUDA could probably make use of it.
(0038253)
Axel Huebl (reporter)
2015-03-18 18:25

that sounds like a plan, shall we open a corresponding new issue for that?
(0038254)
James Bigler (developer)
2015-03-18 18:26

Yeah, you should open a new bug for that. I'm going to close this bug as "not a bug" for now.
(0038255)
James Bigler (developer)
2015-03-18 18:28

Can't implement this feature until there is a way to tell the difference between system paths and not.

 Issue History
Date Modified Username Field Change
2013-09-16 08:40 Axel Huebl New Issue
2013-09-16 08:56 Brad King Assigned To => James Bigler
2013-09-16 08:56 Brad King Status new => assigned
2015-03-18 17:46 Axel Huebl Note Added: 0038249
2015-03-18 18:09 James Bigler Note Added: 0038250
2015-03-18 18:15 Axel Huebl Note Added: 0038251
2015-03-18 18:19 James Bigler Note Added: 0038252
2015-03-18 18:25 Axel Huebl Note Added: 0038253
2015-03-18 18:26 James Bigler Note Added: 0038254
2015-03-18 18:28 James Bigler Note Added: 0038255
2015-03-18 18:28 James Bigler Status assigned => closed
2015-03-18 18:28 James Bigler Resolution open => not fixable
2015-04-14 08:24 Brad King Relationship added related to 0015458


Copyright © 2000 - 2018 MantisBT Team