> 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.
Wow, this seriously needs to be documented. Also, I'm surprised this has never
been mentioned on the list before (I've been searching). As a feature request,
perhaps set_source_files_properties() could have a scope parameter in the same
way set() does.
This limitation has put a major crimp in my ability to cleanly make a project.
It's a library with tons of subfolders organized by feature:
src/
somefeature1/
somefeature2/
...
I have CMakeList.txt files in each subfolder that add the sources for that
folder. Lots of these subfolders have per-source flags/args that need to be
set. Ideally, it should be up to the CMakeList in a subfolder to set these
per-source flags. Otherwise, the top level CMakeList needs to set them all,
which makes it highly cluttered (and not particularly modular).
Is there some other way to go about doing this?
Thanks,
aaron
_______________________________________________
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