villaearth.blogg.se

Cmake set source file porperties
Cmake set source file porperties








cmake set source file porperties

There’s set_source_files_properties but that looks like syntactic sugar for the set_property command. Is there a CMake command that would operate on all files in SomeSubdir without enumerating each one like I did with foo.c, above? Still wondering about the main question though. PROPERTY COMPILE_OPTIONS "-Wblah")Īssuming the target was defined in the parent dir. And I guess TARGET_DIRECTORY is a helper that allows you to refer to the target, and not hardcode a path in DIRECTORY.Ĭoming back to my example, if I had SomeSubdir/foo.c, I could change the source properties from directory SomeSubdir/CMakeLists.txt if I had set_property(SOURCE foo.c DIRECTORY. So if you want to set a source file property from another directory you need to specify the DIRECTORY that defined the target. Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent. I have the following in my CMakeLists.txt and its output is not making sense to me.

However, when I use the result of a GLOBRECURSE in setsourcefilesproperties, it seems to have no effect. C) not working Package: cmake Maintainer for cmake is Debian CMake Team <> Source for cmake is src:cmake ( PTS, buildd, popcon ).

c files to be CXX so that they're compiled with g++. Source file properties are visible only to targets added in the same directory (CMakeLists.txt). See properties documentation for those known to CMake. New in version 3.18: By default, source file properties are only visible to targets added in the same directory (CMakeLists.txt). Set properties associated with source files using a key/value paired list. As the docs state, the properties on source files can only be set from the directory in which the target consuming that source file is defined. I want to change the LANGUAGE property of all. Sets properties associated with source files using a key/value paired list.

cmake set source file porperties

I think I figured out the DIRECTORY param though experimentation.










Cmake set source file porperties