MantisBT - CMake
View Issue Details
0014599CMakeCMakepublic2013-11-26 11:552016-06-10 14:31
Galeazzi 
Alex Neundorf 
normalfeaturehave not tried
closedmoved 
CMake 2.8.12 
 
0014599: Show sources out of CMakeLists directory in Project Explorer view of Eclipse
In many subprojects I've got some sources outside of CMakeLists directory. This is an example:
C:\Product1\project1\CMakeLists.txt
C:\SharedFiles\dir1\foo.cpp
C:\SharedFiles\dir1\foo.h

Should it be possible to add dir1 as linked folder or add foo.* as linked files?
In this way the
behavior of the Eclipse generator would be closer to the VS's one.
A previous discussion having the object "Eclipse: sources out of CMakeLists directory" is reported in the mailing list.
No tags attached.
rar Example.rar (748) 2013-11-27 05:16
https://public.kitware.com/Bug/file/4974/Example.rar
Issue History
2013-11-26 11:55GaleazziNew Issue
2013-11-27 02:59Eric NOULARDNote Added: 0034581
2013-11-27 05:16GaleazziFile Added: Example.rar
2013-11-27 05:37GaleazziNote Added: 0034584
2013-11-28 15:49Alex NeundorfAssigned To => Alex Neundorf
2013-11-28 15:49Alex NeundorfStatusnew => assigned
2016-06-10 14:29Kitware RobotNote Added: 0042434
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034581)
Eric NOULARD   
2013-11-27 02:59   
Here comes the ML reference
http://www.cmake.org/pipermail/cmake/2013-November/056483.html [^]

Andrea,

Could you provide us a minimal project example including
a *working* CMakeLists.txt and a couple of files.
Sommething like:

OutOfTree/Project/CMakeLists.txt
OUfOfTree/Project/Source/*
OutOfTree/OtherDir/foo.cpp
OutOfTree/OtherDir/foo.h

this should be enough to give us an example of what you want.
(0034584)
Galeazzi   
2013-11-27 05:37   
That's an example:
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8.10)

# Project name
project(FooLib)

include_directories(C:/Lib)

set (TARGET_NAME_STATIC FooLib)
set (SRC_FooLIB
             ./Foo.h
             ./Foo.cpp
             C:/Lib/OtherHeader.h)

add_library(${TARGET_NAME_STATIC} ${SRC_FooLIB})

My idea is FooLib project should have:
1 - A linked directory to C:/Lib
or
2 - A virtual directory named something like C_Lib containing a linked file to OtherHeader.h.
With linked directory or linked file I mean what is described here: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-45.htm [^]

Let me know if I clarified my vague idea.

Thanks.
(0042434)
Kitware Robot   
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.