[CMake] feature request for eclipse

Andrea Galeazzi Galeazzi at korg.it
Wed Jan 12 12:19:50 EST 2011


Suppose you have a project with a lot of sub-projects like:
  add_subdirectory("path1/lib1"  "${CMAKE_CURRENT_BINARY_DIR}/lib1")
  add_subdirectory("path2/lib2"  "${CMAKE_CURRENT_BINARY_DIR}/lib2")
.............
When I choose VS as target CMake generates a solution made up of each 
sub-project with all files. Unfortunately that's not possible with 
eclipse because a project must be,at least, a sibling of source 
directory in order to browse the source files.
So I wrote a simple program that generates an eclipse project by parsing 
each add_subdirectory statement in a sibling directory named dir_postfix.
For instance,  add_subdirectory("path1/lib1"  
"${CMAKE_CURRENT_BINARY_DIR}/lib1") generates an eclipse project in the 
directory path1/lib1_eclipse_debug.
After that I import all generated project into my workspace.
My question is: don't you think this could be an useful "native" feature 
that  should improve the eclipse/cmake interaction?
Did anyone ever have such need?


More information about the CMake mailing list