Spec-Zone.ru › CMake

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_DEFINITIONS to pass additional preprocessor definitions.
  • Use INTERFACE_INCLUDE_DIRECTORIES to pass additional include directories.

© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/prop_fs/INTERFACE_COMPILE_OPTIONS.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API