INTERFACE_COMPILE_OPTIONSΒΆ
Added in version 4.4.
List of public compile options requirements for a file set.
File sets may populate this property to publish the compile options
required to compile the sources for the target. The set_property(FILE_SET)
command populates this property.
When target dependencies are specified using target_link_libraries(),
CMake will read this property from file sets of all target dependencies to
determine the build properties of the consumer. These build properties are only
applied to the sources of the file sets. The other sources of the consumer are
unaffected.
Contents of INTERFACE_COMPILE_OPTIONS may use "generator expressions"
with the syntax $<...>. See the cmake-generator-expressions(7)
manual for available expressions. See the cmake-buildsystem(7)
-manual for more on defining buildsystem properties.
Related properties:
Use
INTERFACE_COMPILE_DEFINITIONSto pass additional preprocessor definitions.Use
INTERFACE_INCLUDE_DIRECTORIESto pass additional include directories.