[CMake] Applying command to source files
Juan Sanchez
Juan.Sanchez at amd.com
Fri Nov 16 12:10:37 EST 2007
If I remember the original intent, I thought the desire was to enforce
some draconian indenting policy.
Shouldn't that be a script in your source code management tool? For
example, the indentation policy will be enforced the moment the file is
checked in.
Juan
Eric Noulard wrote:
> 2007/11/15, Mike Jackson <imikejackson at gmail.com>:
>> What about looking at the FindQt4.cmake file. Aren't there macros
>> that run 'moc' over a list of files and produce new source code files
>> from that? Might be a good place to start...
>
> I did that.
> But those MACROS take source file lists as argument
> and I would like to avoid to "manually" respecify files which have
> already been specified in ADD_LIBRARY or ADD_EXECUTABLE.
>
> 2007/11/16, Brandon Van Every <bvanevery at gmail.com>:
>> On Nov 15, 2007 3:04 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
>>> I currently lack a command which could give me
>>> all sources files in a directory.
>> FILE(GLOB ... ?
>
> Yep. You are right.
> I will do that if I have no other mean to get the list of file
> which was _already_ specified in ADD_LIBRARY and ADD_EXECUTABLE.
>
> To be more precise I was thinking of something like:
>
> GET_DIRECTORY_PROPERTY(SRCFILES
> DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
> SOURCES_FILES)
>
> or
>
> GET_DIRECTORY_PROPERTY(SRCFILES
> DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
> SOURCES_FILES
> LANG "CXX")
>
> Which is not currently available.
More information about the CMake
mailing list