[CMake] scope of set_source_files_properties?

David Cole david.cole at kitware.com
Tue Mar 23 08:59:17 EDT 2010


Sorry for my misleading answer on this yesterday. Even I, as a CMake
developer, was surprised by this.....


On Tue, Mar 23, 2010 at 8:43 AM, Michael Wild <themiwi at gmail.com> wrote:

>
> On 23. Mar, 2010, at 13:33 , Brad King wrote:
>
> > Simmons, Aaron wrote:
> >> Am I missing something?  The code is below...
> >>
> >> Top-level CMakeLists.txt:
> >>        cmake_minimum_required(VERSION 2.8)
> >>        project(test)
> >>
> >>        set(src ${CMAKE_CURRENT_SOURCE_DIR}/subdir/test.c)
> >>
> >>        add_subdirectory(subdir)
> >>        get_source_file_property( temp ${src} COMPILE_FLAGS )
> >
> > Due to historical development reasons, source file properties
> > are scoped only in the directory where they are set.  Only
> > targets created by an add_exectuable, add_library, or
> > add_custom_target commands in the *same* directory (not even
> > a subdirectory) can see the property of a source file.
> >
> > -Brad
>
> Would be nice if that was mentioned somewhere (preferably in the
> SET_SOURCE_FILES_PROPERTIES docs). Or is it just me not being able to read
> man-pages once again ;-)
>
> Michael
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100323/c708143d/attachment.htm>


More information about the CMake mailing list