[Cmake] Basic questions

William A. Hoffman billlist at nycap.rr.com
Thu, 25 Mar 2004 13:08:54 -0500


SOURCE_GROUP should do what you want, you may be using it incorrectly.

SOURCE_GROUP: Define a grouping for sources in the makefile.

  SOURCE_GROUP(name [REGULAR_EXPRESSION regex] [FILES src1 src2 ...])

Defines a group into which sources will be placed in project files. This is mainly used to setup file tabs in Visual Studio. Any file whose name is listed or matches the regular expression will be placed in this group. If a file matches multiple groups, the LAST group that explicitly lists the file will be favored, if any. If no group explicitly lists the file, the LAST group whose regular expression matches the file will be favored. For backwards compatibility,this command is also supports the format SOURCE_GROUP(name regex). 

At 01:02 PM 3/25/2004, Bernhard Glück wrote:
>Hi !
>
>We recently tried out several make tools and found cmake to be the best fit for our purposes.
>However we seem to be unable to achieve the following ( short elaboration )
>
>Our project is comprised of a single big source tree. Subdivided into namespaces and correspondig directories.. e.g
>
>Source\Fr .. Root Source Directory
>Source\Fr\Core .. Core source direcotry
>Source\Fr\Core\Platform Platform module of core
>Source\Fr\Core\Platform\Win32 Win32 specifics of platform module.
>Source\Fr\Core\Math Math module of core.
>
>Each of those directories correspond to a namespace too e.g All headers in Fr\Core\Platform are in the namespace Fr::Core::Platform
>
>Ok what we want to achieve now is to generate a Shared Library for each top level package ( those unter Source\Fr )
>this works fine..
>However for each further subdirectory we want to have a folder in our VC project file too e.g it should look like this
>in the solution view:
>
>Project: Fr.Core
>Folders:
>Platform
>Platform\Win32
>Math
>
>
>However we can.t seem to achieve that using the source commands and SOURCE_GROUP does not seem to work either...
>Any help on this ?
>
>
>-- 
>Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake