View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012155CMakeCMakepublic2011-05-04 18:592011-05-05 13:31
Reportersaravanan 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.4 
Target VersionCMake 2.8.5Fixed in VersionCMake 2.8.5 
Summary0012155: Header file list generated for CDT is missing one header
DescriptionIn the list of headers that GCC/ICC includes by default, CMake always leaves the last header from being included in CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS when generating the Makefiles for Eclipse CDT4.
Steps To ReproduceIf the following CMakeLists.txt file
PROJECT(HELLO)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF("${CMAKE_EXTRA_GENERATOR}" MATCHES "Eclipse")
   MESSAGE(STATUS "Using CMake Version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
   IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6)
      INCLUDE(${CMAKE_ROOT}/Modules/CMakeFindEclipseCDT4.cmake)
      MESSAGE(STATUS "${CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS}")
   ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6)
ENDIF("${CMAKE_EXTRA_GENERATOR}" MATCHES "Eclipse")

the output generated looks like

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using CMake Version 2.8
-- /usr/include/c++/4.1.2;/usr/include/c++/4.1.2/x86_64-suse-linux;/usr/include/c++/4.1.2/backward;/usr/local/include;/usr/lib64/gcc/x86_64-suse-linux/4.1.2/include;/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/include
-- Configuring done
-- Generating done

However when the default includes are identified using "/usr/bin/g++ -v -E -x c++ -dD ~/dummy.c", the (relevant section of the) output looks like:

#include <...> search starts here:
 /usr/include/c++/4.1.2
 /usr/include/c++/4.1.2/x86_64-suse-linux
 /usr/include/c++/4.1.2/backward
 /usr/local/include
 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/include
 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/include
 /usr/include
End of search list.

It can be seen that the last header "/usr/include" is missing from being included in CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS



Additional InformationIn the file CMakeFindEclipseCDT4.cmake, if the regular expression in the statement
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )

is changed to
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )

then the last header should probably not get ignored
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0026440)
Alex Neundorf (developer)
2011-05-05 13:31

This is already fixed in master and will be in 2.8.5 :
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a38cab2de2a529779c18e0c3872112e3851665b [^]

Alex

 Issue History
Date Modified Username Field Change
2011-05-04 18:59 saravanan New Issue
2011-05-05 13:29 Alex Neundorf Assigned To => Alex Neundorf
2011-05-05 13:29 Alex Neundorf Status new => assigned
2011-05-05 13:31 Alex Neundorf Note Added: 0026440
2011-05-05 13:31 Alex Neundorf Status assigned => closed
2011-05-05 13:31 Alex Neundorf Resolution open => no change required
2011-05-05 13:31 Alex Neundorf Fixed in Version => CMake 2.8.5
2011-05-05 13:31 Alex Neundorf Target Version => CMake 2.8.5


Copyright © 2000 - 2018 MantisBT Team