[CMake] SOURCE_GROUP command

Sylvain Benner benner at virtools.com
Wed Dec 5 05:15:24 EST 2007


> In my cmake scripts I build a single list of all my cpp and h files 
> for the project. At the end of the script I iterate over this list and 
> add each file to the correct source group based on it's path relative 
> to the source root. This is only for MSVC.  I am running into a 
> problem where I end up with .h files in the Source Files group, or 
> .cpp files in the Header Files group. I noticed that if I only grouped 
> header files, or only grouped source files, then there was no mixing, 
> but I want both to be grouped. Below is my code for doing this. 
> PROJECT_SOURCE_FILES contains the complete list of source and header 
> files. Thanks
Hello,

It's a known bug (bug tracker url:  
http://www.cmake.org/Bug/view.php?id=5114)
It should be fixed, which version of CMake are you using ?

--Sylvain



More information about the CMake mailing list