Unleashing CMake's Potential: The set_property() Command Explained

CMake is a cross-platform, open-source build system that generates platform-specific makefiles, project files, and IDE code for building, testing, and packaging software. It provides a powerful way to manage the build process across different operating systems and compilers.

set_property() is a versatile command in CMake that allows you to associate named properties with various entities within your project, including:

  • Targets: Executable binaries, libraries, custom commands, etc.
  • Sources: Source files like C++, C, Fortran, etc.
  • Directories: Specific directories within your project.
  • Global (cache entries): Properties that persist across projects and configurations.

The basic syntax of set_property() is as follows:

  • GLOBAL : Sets a property in the global cache that applies to all projects.
  • DIRECTORY [<dir>] : Sets a property in a specific directory or its subdirectories.
  • TARGET [<target1> ...] : Sets a property on one or more targets.
  • SOURCE [<src1> ...] [DIRECTORY <dirs>] : Sets a property on one or more source files.
  • <TARGETS> (optional): One or more target names affected by the property.
  • <DIRECTORIES> (optional): One or more directories where the property applies.
  • PROPERTY <PROPERTY_NAME>: The name of the property to set.
  • <VALUE>: The value to assign to the property.

Common Property Names:

  • COMPILE_FLAGS: Compiler flags applied to source files.
  • LINK_FLAGS: Linker flags applied to targets.
  • SOURCE_FILES: List of source files associated with a target.
  • HEADER_FILES: List of header files associated with a target.
  • EXCLUDE_FROM_ALL: Excludes a target from all build configurations.
  • CXX_STANDARD: Sets the C++ standard for source files (e.g., 11 , 14 , 17 ).

Sample Code:

  • Properties can be strings, lists, or booleans.
  • Use set_property(APPEND) to add values to list-type properties.
  • Use set_property(APPEND_STRING) to concatenate strings to string-type properties.
  • Customizing build behavior
  • Providing information to downstream tools
  • Configuring project-specific settings
  • Incorrect scope or property name
  • Missing or invalid target or source file
  • Attempting to set a property on an inappropriate entity (e.g., setting COMPILE_FLAGS on a target)

Additional Considerations:

  • Refer to the official CMake documentation for a complete list of supported properties and their meanings.
  • Use properties judiciously to avoid cluttering your project and making it harder to maintain.
  • Consider using CMake variables or other mechanisms for configuration options that might change frequently.

By effectively using set_property() , you can enhance the flexibility and control you have over your CMake projects, tailoring them to your specific build requirements.

Set a named property in a given scope.

Sets one property on zero or more objects of a scope.

The first argument determines the scope in which the property is set. It must be one of the following:

Scope is unique and does not accept a name.

Scope defaults to the current directory but other directories (already processed by CMake) may be named by full or relative path. Relative paths are treated as relative to the current source directory. See also the set_directory_properties() command.

New in version 3.19: <dir> may reference a binary directory.

Scope may name zero or more existing targets. See also the set_target_properties() command.

Scope may name zero or more source files. By default, source file properties are only visible to targets added in the same directory ( CMakeLists.txt ).

New in version 3.18: Visibility can be set in other directory scopes using one or both of the following sub-options:

The source file property will be set in each of the <dirs> directories' scopes. CMake must already know about each of these directories, either by having added them through a call to add_subdirectory() or it being the top level source directory. Relative paths are treated as relative to the current source directory.

New in version 3.19: <dirs> may reference a binary directory.

The source file property will be set in each of the directory scopes where any of the specified <targets> were created (the <targets> must therefore already exist).

See also the set_source_files_properties() command.

New in version 3.1.

Scope may name zero or more installed file paths. These are made available to CPack to influence deployment.

Both the property key and value may use generator expressions. Specific properties may apply to installed files and/or directories.

Path components have to be separated by forward slashes, must be normalized and are case sensitive.

To reference the installation prefix itself with a relative path use . .

Currently installed file properties are only defined for the WIX generator where the given paths are relative to the installation prefix.

Scope may name zero or more existing tests. See also the set_tests_properties() command.

Test property values may be specified using generator expressions for tests created by the add_test(NAME) signature.

Scope must name zero or more cache existing entries.

The required PROPERTY option is immediately followed by the name of the property to set. Remaining arguments are used to compose the property value in the form of a semicolon-separated list.

If the APPEND option is given the list is appended to any existing property value (except that empty values are ignored and not appended). If the APPEND_STRING option is given the string is appended to any existing property value as string, i.e. it results in a longer string and not a list of strings. When using APPEND or APPEND_STRING with a property defined to support INHERITED behavior (see define_property() ), no inheriting occurs when finding the initial value to append to. If the property is not already directly set in the nominated scope, the command will behave as though APPEND or APPEND_STRING had not been given.

The GENERATED source file property may be globally visible. See its documentation for details.

  • define_property()
  • get_property()
  • The cmake-properties(7) manual for a list of properties in each scope.

© 2000–2023 Kitware, Inc. and Contributors Licensed under the BSD 3-clause License. https://cmake.org/cmake/help/v3.26/command/set_property.html

Beyond ctest_sleep(): Mastering Time Manipulation and User Interaction in CMake Tests

Usage:The ctest_sleep() macro takes one argument: the duration in seconds you want the test to sleep. Here's the basic syntax:

  • Mastering CMake's else() for Flawless Conditional Logic
  • Farewell install_programs() : Embracing the New install() Command in CMake
  • CMake: Alternatives to Deprecated load_command()

set_property global cmake

The Future of FLTK Development: Embracing CMake for Efficiency and Scalability

set_property global cmake

Keep an Eye on Your CMake Variables: Leveraging variable_watch() for Efficient Development

Error-proofing your loops: avoiding pitfalls with cmake's "continue()".

set_property global cmake

LOGO

  • add_compile_definitions()
  • add_compile_options()
  • add_custom_command()
  • add_custom_target()
  • add_definitions()
  • add_dependencies()
  • add_executable()
  • add_library()
  • add_link_options()
  • add_subdirectory()
  • aux_source_directory()
  • build_command()
  • build_name()
  • cmake_host_system_information()
  • cmake_language()
  • cmake_minimum_required()
  • cmake_parse_arguments()
  • cmake_policy()
  • configure_file()
  • create_test_sourcelist()
  • ctest_build()
  • ctest_configure()
  • ctest_coverage()
  • ctest_empty_binary_directory()
  • ctest_memcheck()
  • ctest_read_custom_files()
  • ctest_run_script()
  • ctest_sleep()
  • ctest_start()
  • ctest_submit()
  • ctest_test()
  • ctest_update()
  • ctest_upload()
  • define_property()
  • enable_language()
  • enable_testing()
  • endforeach()
  • endfunction()
  • exec_program()
  • execute_process()
  • export_library_dependencies()
  • find_file()
  • find_library()
  • find_package()
  • find_path()
  • find_program()
  • fltk_wrap_ui()
  • get_cmake_property()
  • get_directory_property()
  • get_filename_component()
  • get_property()
  • get_source_file_property()
  • get_target_property()
  • get_test_property()
  • include_directories()
  • include_external_msproject()
  • include_guard()
  • include_regular_expression()
  • install_files()
  • install_programs()
  • install_targets()
  • link_directories()
  • link_libraries()
  • load_cache()
  • load_command()
  • make_directory()
  • mark_as_advanced()
  • output_required_files()
  • qt_wrap_cpp()
  • qt_wrap_ui()
  • remove_definitions()
  • separate_arguments()
  • set_directory_properties()
  • set_property()
  • set_source_files_properties()
  • set_target_properties()
  • set_tests_properties()
  • site_name()
  • source_group()
  • subdir_depends()
  • target_compile_definitions()
  • target_compile_features()
  • target_compile_options()
  • target_include_directories()
  • target_link_directories()
  • target_link_libraries()
  • target_link_options()
  • target_precompile_headers()
  • target_sources()
  • try_compile()
  • use_mangled_mesa()
  • utility_source()
  • variable_requires()
  • variable_watch()
  • write_file()
  • ASM_DIALECT
  • ASM_DIALECTFLAGS
  • CCMAKE_COLORS
  • CMAKE_BUILD_PARALLEL_LEVEL
  • CMAKE_CONFIG_TYPE
  • CMAKE_EXPORT_COMPILE_COMMANDS
  • CMAKE_GENERATOR
  • CMAKE_GENERATOR_INSTANCE
  • CMAKE_GENERATOR_PLATFORM
  • CMAKE_GENERATOR_TOOLSET
  • CMAKE_LANG_COMPILER_LAUNCHER
  • CMAKE_MSVCIDE_RUN_PATH
  • CMAKE_NO_VERBOSE
  • CMAKE_OSX_ARCHITECTURES
  • CMAKE_PREFIX_PATH
  • CTEST_INTERACTIVE_DEBUG_MODE
  • CTEST_OUTPUT_ON_FAILURE
  • CTEST_PARALLEL_LEVEL
  • CTEST_PROGRESS_OUTPUT
  • CTEST_USE_LAUNCHERS_DEFAULT
  • CUDAHOSTCXX
  • DASHBOARD_TEST_FROM_CTEST
  • MACOSX_DEPLOYMENT_TARGET
  • PackageName_ROOT
  • user-interaction
  • using-dependencies
  • Buildsystem
  • Compile Features
  • cpack-generators.7
  • Env Variables
  • Generator Expressions
  • AddFileDependencies
  • AndroidTestUtilities
  • BundleUtilities
  • CheckCCompilerFlag
  • CheckCSourceCompiles
  • CheckCSourceRuns
  • CheckCXXCompilerFlag
  • CheckCXXSourceCompiles
  • CheckCXXSourceRuns
  • CheckCXXSymbolExists
  • CheckFortranCompilerFlag
  • CheckFortranFunctionExists
  • CheckFortranSourceCompiles
  • CheckFortranSourceRuns
  • CheckFunctionExists
  • CheckIncludeFile
  • CheckIncludeFileCXX
  • CheckIncludeFiles
  • CheckIPOSupported
  • CheckLanguage
  • CheckLibraryExists
  • CheckLinkerFlag
  • CheckOBJCCompilerFlag
  • CheckOBJCSourceCompiles
  • CheckOBJCSourceRuns
  • CheckOBJCXXCompilerFlag
  • CheckOBJCXXSourceCompiles
  • CheckOBJCXXSourceRuns
  • CheckPIESupported
  • CheckPrototypeDefinition
  • CheckStructHasMember
  • CheckSymbolExists
  • CheckTypeSize
  • CheckVariableExists
  • CMakeAddFortranSubdirectory
  • CMakeBackwardCompatibilityCXX
  • CMakeDependentOption
  • CMakeDetermineVSServicePack
  • CMakeExpandImportedTargets
  • CMakeFindDependencyMacro
  • CMakeFindFrameworks
  • CMakeFindPackageMode
  • CMakeForceCompiler
  • CMakeGraphVizOptions
  • CMakePackageConfigHelpers
  • CMakeParseArguments
  • CMakePrintHelpers
  • CMakePrintSystemInformation
  • CMakePushCheckState
  • CMakeVerifyManifest
  • CPackArchive
  • CPackBundle
  • CPackComponent
  • CPackCygwin
  • CPackFreeBSD
  • CPackIFWConfigureFile
  • CPackPackageMaker
  • CPackProductBuild
  • CSharpUtilities
  • CTestCoverageCollectGCOV
  • CTestScriptMode
  • CTestUseLaunchers
  • Documentation
  • ExternalData
  • ExternalProject
  • FeatureSummary
  • FetchContent
  • FindArmadillo
  • FindAVIFile
  • FindBacktrace
  • FindCUDAToolkit
  • FindCxxTest
  • FindDoxygen
  • FindEnvModules
  • FindFontconfig
  • FindFreetype
  • FindGettext
  • FindGnuplot
  • FindHTMLHelp
  • FindIcotool
  • FindImageMagick
  • FindLibArchive
  • FindLibinput
  • FindLibLZMA
  • FindLibXml2
  • FindLibXslt
  • FindLTTngUST
  • FindOpenACC
  • FindOpenSceneGraph
  • FindOpenSSL
  • FindOpenThreads
  • Findosg_functions
  • FindosgAnimation
  • FindosgIntrospection
  • FindosgManipulator
  • FindosgParticle
  • FindosgPresentation
  • FindosgProducer
  • FindosgShadow
  • FindosgTerrain
  • FindosgText
  • FindosgUtil
  • FindosgViewer
  • FindosgVolume
  • FindosgWidget
  • FindPackageHandleStandardArgs
  • FindPackageMessage
  • FindPerlLibs
  • FindPkgConfig
  • FindPostgreSQL
  • FindProducer
  • FindProtobuf
  • FindPython2
  • FindPython3
  • FindPythonInterp
  • FindPythonLibs
  • FindQuickTime
  • FindSDL_image
  • FindSDL_mixer
  • FindSDL_net
  • FindSDL_sound
  • FindSDL_ttf
  • FindSelfPackers
  • FindSQLite3
  • FindSubversion
  • FindTclStub
  • FindThreads
  • FindUnixCommands
  • FindwxWidgets
  • FindwxWindows
  • FindXercesC
  • FortranCInterface
  • GenerateExportHeader
  • GetPrerequisites
  • GNUInstallDirs
  • InstallRequiredSystemLibraries
  • MacroAddFileDependencies
  • ProcessorCount
  • SelectLibraryConfigurations
  • SquishTestScript
  • TestBigEndian
  • TestCXXAcceptsFlag
  • TestForANSIForScope
  • TestForANSIStreamHeaders
  • TestForSSTREAM
  • TestForSTDNamespace
  • Use_wxWindows
  • UseJavaClassFilelist
  • UseJavaSymlinks
  • UsePkgConfig
  • UsewxWidgets
  • WriteBasicConfigVersionFile
  • WriteCompilerDetectionHeader
  • ALLOW_DUPLICATE_CUSTOM_TARGETS
  • AUTOGEN_SOURCE_GROUP
  • AUTOGEN_TARGETS_FOLDER
  • AUTOMOC_SOURCE_GROUP
  • AUTOMOC_TARGETS_FOLDER
  • AUTORCC_SOURCE_GROUP
  • CMAKE_C_KNOWN_FEATURES
  • CMAKE_CUDA_KNOWN_FEATURES
  • CMAKE_CXX_KNOWN_FEATURES
  • DEBUG_CONFIGURATIONS
  • DISABLED_FEATURES
  • ECLIPSE_EXTRA_CPROJECT_CONTENTS
  • ECLIPSE_EXTRA_NATURES
  • ENABLED_FEATURES
  • ENABLED_LANGUAGES
  • FIND_LIBRARY_USE_LIB32_PATHS
  • FIND_LIBRARY_USE_LIB64_PATHS
  • FIND_LIBRARY_USE_LIBX32_PATHS
  • FIND_LIBRARY_USE_OPENBSD_VERSIONING
  • GENERATOR_IS_MULTI_CONFIG
  • GLOBAL_DEPENDS_DEBUG_MODE
  • GLOBAL_DEPENDS_NO_CYCLES
  • IN_TRY_COMPILE
  • PACKAGES_FOUND
  • PACKAGES_NOT_FOUND
  • PREDEFINED_TARGETS_FOLDER
  • REPORT_UNDEFINED_PROPERTIES
  • RULE_LAUNCH_COMPILE
  • RULE_LAUNCH_CUSTOM
  • RULE_LAUNCH_LINK
  • RULE_MESSAGES
  • TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
  • TARGET_MESSAGES
  • TARGET_SUPPORTS_SHARED_LIBS
  • USE_FOLDERS
  • XCODE_EMIT_EFFECTIVE_PLATFORM_NAME
  • ADDITIONAL_CLEAN_FILES
  • ADDITIONAL_MAKE_CLEAN_FILES
  • BUILDSYSTEM_TARGETS
  • CACHE_VARIABLES
  • CLEAN_NO_CUSTOM
  • CMAKE_CONFIGURE_DEPENDS
  • COMPILE_DEFINITIONS
  • COMPILE_DEFINITIONS_CONFIG
  • COMPILE_OPTIONS
  • DEFINITIONS
  • EXCLUDE_FROM_ALL
  • IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
  • INCLUDE_DIRECTORIES
  • INCLUDE_REGULAR_EXPRESSION
  • INTERPROCEDURAL_OPTIMIZATION
  • INTERPROCEDURAL_OPTIMIZATION_CONFIG
  • LINK_DIRECTORIES
  • LINK_OPTIONS
  • LISTFILE_STACK
  • PARENT_DIRECTORY
  • SUBDIRECTORIES
  • TEST_INCLUDE_FILE
  • TEST_INCLUDE_FILES
  • VS_GLOBAL_SECTION_POST_section
  • VS_GLOBAL_SECTION_PRE_section
  • VS_STARTUP_PROJECT
  • CPACK_DESKTOP_SHORTCUTS
  • CPACK_NEVER_OVERWRITE
  • CPACK_PERMANENT
  • CPACK_START_MENU_SHORTCUTS
  • CPACK_STARTUP_SHORTCUTS
  • CPACK_WIX_ACL
  • AUTORCC_OPTIONS
  • AUTOUIC_OPTIONS
  • COMPILE_FLAGS
  • EXTERNAL_OBJECT
  • Fortran_FORMAT
  • Fortran_PREPROCESS
  • HEADER_FILE_ONLY
  • KEEP_EXTENSION
  • MACOSX_PACKAGE_LOCATION
  • OBJECT_DEPENDS
  • OBJECT_OUTPUTS
  • SKIP_AUTOGEN
  • SKIP_AUTOMOC
  • SKIP_AUTORCC
  • SKIP_AUTOUIC
  • SKIP_PRECOMPILE_HEADERS
  • SKIP_UNITY_BUILD_INCLUSION
  • Swift_DEPENDENCIES_FILE
  • Swift_DIAGNOSTICS_FILE
  • UNITY_GROUP
  • VS_COPY_TO_OUT_DIR
  • VS_CSHARP_tagname
  • VS_DEPLOYMENT_CONTENT
  • VS_DEPLOYMENT_LOCATION
  • VS_INCLUDE_IN_VSIX
  • VS_RESOURCE_GENERATOR
  • VS_SETTINGS
  • VS_SHADER_DISABLE_OPTIMIZATIONS
  • VS_SHADER_ENABLE_DEBUG
  • VS_SHADER_ENTRYPOINT
  • VS_SHADER_FLAGS
  • VS_SHADER_MODEL
  • VS_SHADER_OBJECT_FILE_NAME
  • VS_SHADER_OUTPUT_HEADER_FILE
  • VS_SHADER_TYPE
  • VS_SHADER_VARIABLE_NAME
  • VS_TOOL_OVERRIDE
  • VS_XAML_TYPE
  • WRAP_EXCLUDE
  • XCODE_EXPLICIT_FILE_TYPE
  • XCODE_FILE_ATTRIBUTES
  • XCODE_LAST_KNOWN_FILE_TYPE
  • AIX_EXPORT_ALL_SYMBOLS
  • ALIAS_GLOBAL
  • ALIASED_TARGET
  • ANDROID_ANT_ADDITIONAL_OPTIONS
  • ANDROID_API
  • ANDROID_API_MIN
  • ANDROID_ARCH
  • ANDROID_ASSETS_DIRECTORIES
  • ANDROID_GUI
  • ANDROID_JAR_DEPENDENCIES
  • ANDROID_JAR_DIRECTORIES
  • ANDROID_JAVA_SOURCE_DIR
  • ANDROID_NATIVE_LIB_DEPENDENCIES
  • ANDROID_NATIVE_LIB_DIRECTORIES
  • ANDROID_PROCESS_MAX
  • ANDROID_PROGUARD
  • ANDROID_PROGUARD_CONFIG_PATH
  • ANDROID_SECURE_PROPS_PATH
  • ANDROID_SKIP_ANT_STEP
  • ANDROID_STL_TYPE
  • ARCHIVE_OUTPUT_DIRECTORY
  • ARCHIVE_OUTPUT_DIRECTORY_CONFIG
  • ARCHIVE_OUTPUT_NAME
  • ARCHIVE_OUTPUT_NAME_CONFIG
  • AUTOGEN_BUILD_DIR
  • AUTOGEN_ORIGIN_DEPENDS
  • AUTOGEN_PARALLEL
  • AUTOGEN_TARGET_DEPENDS
  • AUTOMOC_COMPILER_PREDEFINES
  • AUTOMOC_DEPEND_FILTERS
  • AUTOMOC_EXECUTABLE
  • AUTOMOC_MACRO_NAMES
  • AUTOMOC_MOC_OPTIONS
  • AUTOMOC_PATH_PREFIX
  • AUTORCC_EXECUTABLE
  • AUTOUIC_EXECUTABLE
  • AUTOUIC_SEARCH_PATHS
  • BUILD_RPATH
  • BUILD_RPATH_USE_ORIGIN
  • BUILD_WITH_INSTALL_NAME_DIR
  • BUILD_WITH_INSTALL_RPATH
  • BUNDLE_EXTENSION
  • C_EXTENSIONS
  • C_STANDARD_REQUIRED
  • COMMON_LANGUAGE_RUNTIME
  • COMPATIBLE_INTERFACE_BOOL
  • COMPATIBLE_INTERFACE_NUMBER_MAX
  • COMPATIBLE_INTERFACE_NUMBER_MIN
  • COMPATIBLE_INTERFACE_STRING
  • COMPILE_FEATURES
  • COMPILE_PDB_NAME
  • COMPILE_PDB_NAME_CONFIG
  • COMPILE_PDB_OUTPUT_DIRECTORY
  • COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
  • CONFIG_OUTPUT_NAME
  • CONFIG_POSTFIX
  • CROSSCOMPILING_EMULATOR
  • CUDA_ARCHITECTURES
  • CUDA_EXTENSIONS
  • CUDA_PTX_COMPILATION
  • CUDA_RESOLVE_DEVICE_SYMBOLS
  • CUDA_RUNTIME_LIBRARY
  • CUDA_SEPARABLE_COMPILATION
  • CUDA_STANDARD
  • CUDA_STANDARD_REQUIRED
  • CXX_EXTENSIONS
  • CXX_STANDARD
  • CXX_STANDARD_REQUIRED
  • DEBUG_POSTFIX
  • DEFINE_SYMBOL
  • DEPLOYMENT_ADDITIONAL_FILES
  • DEPLOYMENT_REMOTE_DIRECTORY
  • DEPRECATION
  • DISABLE_PRECOMPILE_HEADERS
  • DOTNET_TARGET_FRAMEWORK
  • DOTNET_TARGET_FRAMEWORK_VERSION
  • ENABLE_EXPORTS
  • EXCLUDE_FROM_DEFAULT_BUILD
  • EXCLUDE_FROM_DEFAULT_BUILD_CONFIG
  • EXPORT_NAME
  • EXPORT_PROPERTIES
  • Fortran_MODULE_DIRECTORY
  • FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
  • FRAMEWORK_VERSION
  • GENERATOR_FILE_NAME
  • GHS_INTEGRITY_APP
  • GHS_NO_SOURCE_GROUP_FILE
  • IMPORT_PREFIX
  • IMPORT_SUFFIX
  • IMPORTED_COMMON_LANGUAGE_RUNTIME
  • IMPORTED_CONFIGURATIONS
  • IMPORTED_GLOBAL
  • IMPORTED_IMPLIB
  • IMPORTED_IMPLIB_CONFIG
  • IMPORTED_LIBNAME
  • IMPORTED_LIBNAME_CONFIG
  • IMPORTED_LINK_DEPENDENT_LIBRARIES
  • IMPORTED_LINK_DEPENDENT_LIBRARIES_CONFIG
  • IMPORTED_LINK_INTERFACE_LANGUAGES
  • IMPORTED_LINK_INTERFACE_LANGUAGES_CONFIG
  • IMPORTED_LINK_INTERFACE_LIBRARIES
  • IMPORTED_LINK_INTERFACE_LIBRARIES_CONFIG
  • IMPORTED_LINK_INTERFACE_MULTIPLICITY
  • IMPORTED_LINK_INTERFACE_MULTIPLICITY_CONFIG
  • IMPORTED_LOCATION
  • IMPORTED_LOCATION_CONFIG
  • IMPORTED_NO_SONAME
  • IMPORTED_NO_SONAME_CONFIG
  • IMPORTED_OBJECTS
  • IMPORTED_OBJECTS_CONFIG
  • IMPORTED_SONAME
  • IMPORTED_SONAME_CONFIG
  • INSTALL_NAME_DIR
  • INSTALL_REMOVE_ENVIRONMENT_RPATH
  • INSTALL_RPATH
  • INSTALL_RPATH_USE_LINK_PATH
  • INTERFACE_AUTOUIC_OPTIONS
  • INTERFACE_COMPILE_DEFINITIONS
  • INTERFACE_COMPILE_FEATURES
  • INTERFACE_COMPILE_OPTIONS
  • INTERFACE_INCLUDE_DIRECTORIES
  • INTERFACE_LINK_DEPENDS
  • INTERFACE_LINK_DIRECTORIES
  • INTERFACE_LINK_LIBRARIES
  • INTERFACE_LINK_OPTIONS
  • INTERFACE_POSITION_INDEPENDENT_CODE
  • INTERFACE_PRECOMPILE_HEADERS
  • INTERFACE_SOURCES
  • INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
  • IOS_INSTALL_COMBINED
  • JOB_POOL_COMPILE
  • JOB_POOL_LINK
  • JOB_POOL_PRECOMPILE_HEADER
  • LANG_CLANG_TIDY
  • LANG_COMPILER_LAUNCHER
  • LANG_CPPCHECK
  • LANG_CPPLINT
  • LANG_INCLUDE_WHAT_YOU_USE
  • LANG_VISIBILITY_PRESET
  • LIBRARY_OUTPUT_DIRECTORY
  • LIBRARY_OUTPUT_DIRECTORY_CONFIG
  • LIBRARY_OUTPUT_NAME
  • LIBRARY_OUTPUT_NAME_CONFIG
  • LINK_DEPENDS
  • LINK_DEPENDS_NO_SHARED
  • LINK_FLAGS_CONFIG
  • LINK_INTERFACE_LIBRARIES
  • LINK_INTERFACE_LIBRARIES_CONFIG
  • LINK_INTERFACE_MULTIPLICITY
  • LINK_INTERFACE_MULTIPLICITY_CONFIG
  • LINK_LIBRARIES
  • LINK_SEARCH_END_STATIC
  • LINK_SEARCH_START_STATIC
  • LINK_WHAT_YOU_USE
  • LINKER_LANGUAGE
  • LOCATION_CONFIG
  • MACHO_COMPATIBILITY_VERSION
  • MACHO_CURRENT_VERSION
  • MACOSX_BUNDLE
  • MACOSX_BUNDLE_INFO_PLIST
  • MACOSX_FRAMEWORK_INFO_PLIST
  • MACOSX_RPATH
  • MANUALLY_ADDED_DEPENDENCIES
  • MAP_IMPORTED_CONFIG_CONFIG
  • MSVC_RUNTIME_LIBRARY
  • NO_SYSTEM_FROM_IMPORTED
  • OBJC_EXTENSIONS
  • OBJC_STANDARD
  • OBJC_STANDARD_REQUIRED
  • OBJCXX_EXTENSIONS
  • OBJCXX_STANDARD
  • OBJCXX_STANDARD_REQUIRED
  • OSX_ARCHITECTURES
  • OSX_ARCHITECTURES_CONFIG
  • OUTPUT_NAME
  • OUTPUT_NAME_CONFIG
  • PCH_WARN_INVALID
  • PDB_NAME_CONFIG
  • PDB_OUTPUT_DIRECTORY
  • PDB_OUTPUT_DIRECTORY_CONFIG
  • POSITION_INDEPENDENT_CODE
  • POST_INSTALL_SCRIPT
  • PRE_INSTALL_SCRIPT
  • PRECOMPILE_HEADERS
  • PRECOMPILE_HEADERS_REUSE_FROM
  • PRIVATE_HEADER
  • PROJECT_LABEL
  • PUBLIC_HEADER
  • RUNTIME_OUTPUT_DIRECTORY
  • RUNTIME_OUTPUT_DIRECTORY_CONFIG
  • RUNTIME_OUTPUT_NAME
  • RUNTIME_OUTPUT_NAME_CONFIG
  • SKIP_BUILD_RPATH
  • STATIC_LIBRARY_FLAGS
  • STATIC_LIBRARY_FLAGS_CONFIG
  • STATIC_LIBRARY_OPTIONS
  • Swift_LANGUAGE_VERSION
  • Swift_MODULE_DIRECTORY
  • Swift_MODULE_NAME
  • UNITY_BUILD
  • UNITY_BUILD_BATCH_SIZE
  • UNITY_BUILD_CODE_AFTER_INCLUDE
  • UNITY_BUILD_CODE_BEFORE_INCLUDE
  • UNITY_BUILD_MODE
  • VISIBILITY_INLINES_HIDDEN
  • VS_CONFIGURATION_TYPE
  • VS_DEBUGGER_COMMAND
  • VS_DEBUGGER_COMMAND_ARGUMENTS
  • VS_DEBUGGER_ENVIRONMENT
  • VS_DEBUGGER_WORKING_DIRECTORY
  • VS_DESKTOP_EXTENSIONS_VERSION
  • VS_DOTNET_DOCUMENTATION_FILE
  • VS_DOTNET_REFERENCE_refname
  • VS_DOTNET_REFERENCEPROP_refname_TAG_tagname
  • VS_DOTNET_REFERENCES
  • VS_DOTNET_REFERENCES_COPY_LOCAL
  • VS_DOTNET_TARGET_FRAMEWORK_VERSION
  • VS_DPI_AWARE
  • VS_GLOBAL_KEYWORD
  • VS_GLOBAL_PROJECT_TYPES
  • VS_GLOBAL_ROOTNAMESPACE
  • VS_GLOBAL_variable
  • VS_IOT_EXTENSIONS_VERSION
  • VS_IOT_STARTUP_TASK
  • VS_JUST_MY_CODE_DEBUGGING
  • VS_MOBILE_EXTENSIONS_VERSION
  • VS_NO_SOLUTION_DEPLOY
  • VS_PACKAGE_REFERENCES
  • VS_PLATFORM_TOOLSET
  • VS_PROJECT_IMPORT
  • VS_SCC_AUXPATH
  • VS_SCC_LOCALPATH
  • VS_SCC_PROJECTNAME
  • VS_SCC_PROVIDER
  • VS_SDK_REFERENCES
  • VS_SOLUTION_DEPLOY
  • VS_SOURCE_SETTINGS_tool
  • VS_USER_PROPS
  • VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
  • VS_WINRT_COMPONENT
  • VS_WINRT_EXTENSIONS
  • VS_WINRT_REFERENCES
  • WIN32_EXECUTABLE
  • WINDOWS_EXPORT_ALL_SYMBOLS
  • XCODE_ATTRIBUTE_an-attribute
  • XCODE_GENERATE_SCHEME
  • XCODE_PRODUCT_TYPE
  • XCODE_SCHEME_ADDRESS_SANITIZER
  • XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
  • XCODE_SCHEME_ARGUMENTS
  • XCODE_SCHEME_DEBUG_AS_ROOT
  • XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
  • XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
  • XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
  • XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
  • XCODE_SCHEME_ENVIRONMENT
  • XCODE_SCHEME_EXECUTABLE
  • XCODE_SCHEME_GUARD_MALLOC
  • XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
  • XCODE_SCHEME_MALLOC_GUARD_EDGES
  • XCODE_SCHEME_MALLOC_SCRIBBLE
  • XCODE_SCHEME_MALLOC_STACK
  • XCODE_SCHEME_THREAD_SANITIZER
  • XCODE_SCHEME_THREAD_SANITIZER_STOP
  • XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
  • XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
  • XCODE_SCHEME_WORKING_DIRECTORY
  • XCODE_SCHEME_ZOMBIE_OBJECTS
  • ATTACHED_FILES
  • ATTACHED_FILES_ON_FAIL
  • ENVIRONMENT
  • FAIL_REGULAR_EXPRESSION
  • FIXTURES_CLEANUP
  • FIXTURES_REQUIRED
  • FIXTURES_SETUP
  • MEASUREMENT
  • PASS_REGULAR_EXPRESSION
  • PROCESSOR_AFFINITY
  • REQUIRED_FILES
  • RESOURCE_GROUPS
  • RESOURCE_LOCK
  • SKIP_REGULAR_EXPRESSION
  • SKIP_RETURN_CODE
  • TIMEOUT_AFTER_MATCH
  • WORKING_DIRECTORY
  • BUILD_SHARED_LIBS
  • CMAKE_ABSOLUTE_DESTINATION_FILES
  • CMAKE_AIX_EXPORT_ALL_SYMBOLS
  • CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS
  • CMAKE_ANDROID_API
  • CMAKE_ANDROID_API_MIN
  • CMAKE_ANDROID_ARCH
  • CMAKE_ANDROID_ARCH_ABI
  • CMAKE_ANDROID_ARM_MODE
  • CMAKE_ANDROID_ARM_NEON
  • CMAKE_ANDROID_ASSETS_DIRECTORIES
  • CMAKE_ANDROID_GUI
  • CMAKE_ANDROID_JAR_DEPENDENCIES
  • CMAKE_ANDROID_JAR_DIRECTORIES
  • CMAKE_ANDROID_JAVA_SOURCE_DIR
  • CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
  • CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
  • CMAKE_ANDROID_NDK
  • CMAKE_ANDROID_NDK_DEPRECATED_HEADERS
  • CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
  • CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
  • CMAKE_ANDROID_PROCESS_MAX
  • CMAKE_ANDROID_PROGUARD
  • CMAKE_ANDROID_PROGUARD_CONFIG_PATH
  • CMAKE_ANDROID_SECURE_PROPS_PATH
  • CMAKE_ANDROID_SKIP_ANT_STEP
  • CMAKE_ANDROID_STANDALONE_TOOLCHAIN
  • CMAKE_ANDROID_STL_TYPE
  • CMAKE_APPBUNDLE_PATH
  • CMAKE_ARCHIVE_OUTPUT_DIRECTORY
  • CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
  • CMAKE_ARGV0
  • CMAKE_AUTOGEN_ORIGIN_DEPENDS
  • CMAKE_AUTOGEN_PARALLEL
  • CMAKE_AUTOGEN_VERBOSE
  • CMAKE_AUTOMOC
  • CMAKE_AUTOMOC_COMPILER_PREDEFINES
  • CMAKE_AUTOMOC_DEPEND_FILTERS
  • CMAKE_AUTOMOC_MACRO_NAMES
  • CMAKE_AUTOMOC_MOC_OPTIONS
  • CMAKE_AUTOMOC_PATH_PREFIX
  • CMAKE_AUTOMOC_RELAXED_MODE
  • CMAKE_AUTORCC
  • CMAKE_AUTORCC_OPTIONS
  • CMAKE_AUTOUIC
  • CMAKE_AUTOUIC_OPTIONS
  • CMAKE_AUTOUIC_SEARCH_PATHS
  • CMAKE_BACKWARDS_COMPATIBILITY
  • CMAKE_BINARY_DIR
  • CMAKE_BUILD_RPATH
  • CMAKE_BUILD_RPATH_USE_ORIGIN
  • CMAKE_BUILD_TOOL
  • CMAKE_BUILD_TYPE
  • CMAKE_BUILD_WITH_INSTALL_NAME_DIR
  • CMAKE_BUILD_WITH_INSTALL_RPATH
  • CMAKE_C_COMPILE_FEATURES
  • CMAKE_C_EXTENSIONS
  • CMAKE_C_STANDARD
  • CMAKE_C_STANDARD_REQUIRED
  • CMAKE_CACHE_MAJOR_VERSION
  • CMAKE_CACHE_MINOR_VERSION
  • CMAKE_CACHE_PATCH_VERSION
  • CMAKE_CACHEFILE_DIR
  • CMAKE_CFG_INTDIR
  • CMAKE_CL_64
  • CMAKE_CODEBLOCKS_COMPILER_ID
  • CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
  • CMAKE_CODELITE_USE_TARGETS
  • CMAKE_COLOR_MAKEFILE
  • CMAKE_COMMAND
  • CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
  • CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
  • CMAKE_COMPILER_2005
  • CMAKE_COMPILER_IS_GNUCC
  • CMAKE_COMPILER_IS_GNUCXX
  • CMAKE_COMPILER_IS_GNUG77
  • CMAKE_CONFIG_POSTFIX
  • CMAKE_CONFIGURATION_TYPES
  • CMAKE_CPACK_COMMAND
  • CMAKE_CROSS_CONFIGS
  • CMAKE_CROSSCOMPILING
  • CMAKE_CROSSCOMPILING_EMULATOR
  • CMAKE_CTEST_ARGUMENTS
  • CMAKE_CTEST_COMMAND
  • CMAKE_CUDA_ARCHITECTURES
  • CMAKE_CUDA_COMPILE_FEATURES
  • CMAKE_CUDA_EXTENSIONS
  • CMAKE_CUDA_HOST_COMPILER
  • CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
  • CMAKE_CUDA_RUNTIME_LIBRARY
  • CMAKE_CUDA_SEPARABLE_COMPILATION
  • CMAKE_CUDA_STANDARD
  • CMAKE_CUDA_STANDARD_REQUIRED
  • CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
  • CMAKE_CURRENT_BINARY_DIR
  • CMAKE_CURRENT_FUNCTION
  • CMAKE_CURRENT_FUNCTION_LIST_DIR
  • CMAKE_CURRENT_FUNCTION_LIST_FILE
  • CMAKE_CURRENT_FUNCTION_LIST_LINE
  • CMAKE_CURRENT_LIST_DIR
  • CMAKE_CURRENT_LIST_FILE
  • CMAKE_CURRENT_LIST_LINE
  • CMAKE_CURRENT_SOURCE_DIR
  • CMAKE_CXX_COMPILE_FEATURES
  • CMAKE_CXX_EXTENSIONS
  • CMAKE_CXX_STANDARD
  • CMAKE_CXX_STANDARD_REQUIRED
  • CMAKE_DEBUG_POSTFIX
  • CMAKE_DEBUG_TARGET_PROPERTIES
  • CMAKE_DEFAULT_BUILD_TYPE
  • CMAKE_DEFAULT_CONFIGS
  • CMAKE_DEPENDS_IN_PROJECT_ONLY
  • CMAKE_DIRECTORY_LABELS
  • CMAKE_DISABLE_FIND_PACKAGE_PackageName
  • CMAKE_DISABLE_PRECOMPILE_HEADERS
  • CMAKE_DL_LIBS
  • CMAKE_DOTNET_TARGET_FRAMEWORK
  • CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
  • CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
  • CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
  • CMAKE_ECLIPSE_MAKE_ARGUMENTS
  • CMAKE_ECLIPSE_RESOURCE_ENCODING
  • CMAKE_ECLIPSE_VERSION
  • CMAKE_EDIT_COMMAND
  • CMAKE_ENABLE_EXPORTS
  • CMAKE_ERROR_DEPRECATED
  • CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
  • CMAKE_EXE_LINKER_FLAGS
  • CMAKE_EXE_LINKER_FLAGS_CONFIG
  • CMAKE_EXE_LINKER_FLAGS_CONFIG_INIT
  • CMAKE_EXE_LINKER_FLAGS_INIT
  • CMAKE_EXECUTABLE_SUFFIX
  • CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
  • CMAKE_EXPORT_NO_PACKAGE_REGISTRY
  • CMAKE_EXPORT_PACKAGE_REGISTRY
  • CMAKE_EXTRA_GENERATOR
  • CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
  • CMAKE_FIND_APPBUNDLE
  • CMAKE_FIND_DEBUG_MODE
  • CMAKE_FIND_FRAMEWORK
  • CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX
  • CMAKE_FIND_LIBRARY_PREFIXES
  • CMAKE_FIND_LIBRARY_SUFFIXES
  • CMAKE_FIND_NO_INSTALL_PREFIX
  • CMAKE_FIND_PACKAGE_NAME
  • CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
  • CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
  • CMAKE_FIND_PACKAGE_PREFER_CONFIG
  • CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
  • CMAKE_FIND_PACKAGE_SORT_DIRECTION
  • CMAKE_FIND_PACKAGE_SORT_ORDER
  • CMAKE_FIND_PACKAGE_WARN_NO_MODULE
  • CMAKE_FIND_ROOT_PATH
  • CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
  • CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
  • CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
  • CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
  • CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
  • CMAKE_FIND_USE_CMAKE_PATH
  • CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
  • CMAKE_FIND_USE_PACKAGE_REGISTRY
  • CMAKE_FIND_USE_PACKAGE_ROOT_PATH
  • CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH
  • CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
  • CMAKE_FOLDER
  • CMAKE_Fortran_FORMAT
  • CMAKE_Fortran_MODDIR_DEFAULT
  • CMAKE_Fortran_MODDIR_FLAG
  • CMAKE_Fortran_MODOUT_FLAG
  • CMAKE_Fortran_MODULE_DIRECTORY
  • CMAKE_Fortran_PREPROCESS
  • CMAKE_FRAMEWORK
  • CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
  • CMAKE_FRAMEWORK_PATH
  • CMAKE_GHS_NO_SOURCE_GROUP_FILE
  • CMAKE_GLOBAL_AUTOGEN_TARGET
  • CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
  • CMAKE_GLOBAL_AUTORCC_TARGET
  • CMAKE_GLOBAL_AUTORCC_TARGET_NAME
  • CMAKE_GNUtoMS
  • CMAKE_HOME_DIRECTORY
  • CMAKE_HOST_APPLE
  • CMAKE_HOST_SOLARIS
  • CMAKE_HOST_SYSTEM
  • CMAKE_HOST_SYSTEM_NAME
  • CMAKE_HOST_SYSTEM_PROCESSOR
  • CMAKE_HOST_SYSTEM_VERSION
  • CMAKE_HOST_UNIX
  • CMAKE_HOST_WIN32
  • CMAKE_IGNORE_PATH
  • CMAKE_IMPORT_LIBRARY_PREFIX
  • CMAKE_IMPORT_LIBRARY_SUFFIX
  • CMAKE_INCLUDE_CURRENT_DIR
  • CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
  • CMAKE_INCLUDE_DIRECTORIES_BEFORE
  • CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
  • CMAKE_INCLUDE_PATH
  • CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
  • CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
  • CMAKE_INSTALL_MESSAGE
  • CMAKE_INSTALL_NAME_DIR
  • CMAKE_INSTALL_PREFIX
  • CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
  • CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
  • CMAKE_INSTALL_RPATH
  • CMAKE_INSTALL_RPATH_USE_LINK_PATH
  • CMAKE_INTERNAL_PLATFORM_ABI
  • CMAKE_INTERPROCEDURAL_OPTIMIZATION
  • CMAKE_INTERPROCEDURAL_OPTIMIZATION_CONFIG
  • CMAKE_IOS_INSTALL_COMBINED
  • CMAKE_JOB_POOL_COMPILE
  • CMAKE_JOB_POOL_LINK
  • CMAKE_JOB_POOL_PRECOMPILE_HEADER
  • CMAKE_JOB_POOLS
  • CMAKE_LANG_ANDROID_TOOLCHAIN_MACHINE
  • CMAKE_LANG_ANDROID_TOOLCHAIN_PREFIX
  • CMAKE_LANG_ANDROID_TOOLCHAIN_SUFFIX
  • CMAKE_LANG_ARCHIVE_APPEND
  • CMAKE_LANG_ARCHIVE_CREATE
  • CMAKE_LANG_ARCHIVE_FINISH
  • CMAKE_LANG_CLANG_TIDY
  • CMAKE_LANG_COMPILE_OBJECT
  • CMAKE_LANG_COMPILER
  • CMAKE_LANG_COMPILER_ABI
  • CMAKE_LANG_COMPILER_AR
  • CMAKE_LANG_COMPILER_ARCHITECTURE_ID
  • CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN
  • CMAKE_LANG_COMPILER_ID
  • CMAKE_LANG_COMPILER_LOADED
  • CMAKE_LANG_COMPILER_PREDEFINES_COMMAND
  • CMAKE_LANG_COMPILER_RANLIB
  • CMAKE_LANG_COMPILER_TARGET
  • CMAKE_LANG_COMPILER_VERSION
  • CMAKE_LANG_COMPILER_VERSION_INTERNAL
  • CMAKE_LANG_CPPCHECK
  • CMAKE_LANG_CPPLINT
  • CMAKE_LANG_CREATE_SHARED_LIBRARY
  • CMAKE_LANG_CREATE_SHARED_MODULE
  • CMAKE_LANG_CREATE_STATIC_LIBRARY
  • CMAKE_LANG_FLAGS
  • CMAKE_LANG_FLAGS_CONFIG
  • CMAKE_LANG_FLAGS_CONFIG_INIT
  • CMAKE_LANG_FLAGS_DEBUG
  • CMAKE_LANG_FLAGS_DEBUG_INIT
  • CMAKE_LANG_FLAGS_INIT
  • CMAKE_LANG_FLAGS_MINSIZEREL
  • CMAKE_LANG_FLAGS_MINSIZEREL_INIT
  • CMAKE_LANG_FLAGS_RELEASE
  • CMAKE_LANG_FLAGS_RELEASE_INIT
  • CMAKE_LANG_FLAGS_RELWITHDEBINFO
  • CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT
  • CMAKE_LANG_IGNORE_EXTENSIONS
  • CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES
  • CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES
  • CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
  • CMAKE_LANG_IMPLICIT_LINK_LIBRARIES
  • CMAKE_LANG_INCLUDE_WHAT_YOU_USE
  • CMAKE_LANG_LIBRARY_ARCHITECTURE
  • CMAKE_LANG_LINK_EXECUTABLE
  • CMAKE_LANG_LINK_LIBRARY_FILE_FLAG
  • CMAKE_LANG_LINK_LIBRARY_FLAG
  • CMAKE_LANG_LINK_LIBRARY_SUFFIX
  • CMAKE_LANG_LINKER_PREFERENCE
  • CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES
  • CMAKE_LANG_LINKER_WRAPPER_FLAG
  • CMAKE_LANG_LINKER_WRAPPER_FLAG_SEP
  • CMAKE_LANG_OUTPUT_EXTENSION
  • CMAKE_LANG_PLATFORM_ID
  • CMAKE_LANG_SIMULATE_ID
  • CMAKE_LANG_SIMULATE_VERSION
  • CMAKE_LANG_SIZEOF_DATA_PTR
  • CMAKE_LANG_SOURCE_FILE_EXTENSIONS
  • CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES
  • CMAKE_LANG_STANDARD_LIBRARIES
  • CMAKE_LANG_VISIBILITY_PRESET
  • CMAKE_LIBRARY_ARCHITECTURE
  • CMAKE_LIBRARY_ARCHITECTURE_REGEX
  • CMAKE_LIBRARY_OUTPUT_DIRECTORY
  • CMAKE_LIBRARY_OUTPUT_DIRECTORY_CONFIG
  • CMAKE_LIBRARY_PATH
  • CMAKE_LIBRARY_PATH_FLAG
  • CMAKE_LINK_DEF_FILE_FLAG
  • CMAKE_LINK_DEPENDS_NO_SHARED
  • CMAKE_LINK_DIRECTORIES_BEFORE
  • CMAKE_LINK_INTERFACE_LIBRARIES
  • CMAKE_LINK_LIBRARY_FILE_FLAG
  • CMAKE_LINK_LIBRARY_FLAG
  • CMAKE_LINK_LIBRARY_SUFFIX
  • CMAKE_LINK_SEARCH_END_STATIC
  • CMAKE_LINK_SEARCH_START_STATIC
  • CMAKE_LINK_WHAT_YOU_USE
  • CMAKE_MACOSX_BUNDLE
  • CMAKE_MACOSX_RPATH
  • CMAKE_MAJOR_VERSION
  • CMAKE_MAKE_PROGRAM
  • CMAKE_MAP_IMPORTED_CONFIG_CONFIG
  • CMAKE_MATCH_COUNT
  • CMAKE_MATCH_n
  • CMAKE_MAXIMUM_RECURSION_DEPTH
  • CMAKE_MESSAGE_CONTEXT
  • CMAKE_MESSAGE_CONTEXT_SHOW
  • CMAKE_MESSAGE_INDENT
  • CMAKE_MESSAGE_LOG_LEVEL
  • CMAKE_MFC_FLAG
  • CMAKE_MINIMUM_REQUIRED_VERSION
  • CMAKE_MINOR_VERSION
  • CMAKE_MODULE_LINKER_FLAGS
  • CMAKE_MODULE_LINKER_FLAGS_CONFIG
  • CMAKE_MODULE_LINKER_FLAGS_CONFIG_INIT
  • CMAKE_MODULE_LINKER_FLAGS_INIT
  • CMAKE_MODULE_PATH
  • CMAKE_MSVC_RUNTIME_LIBRARY
  • CMAKE_NETRC
  • CMAKE_NETRC_FILE
  • CMAKE_NINJA_OUTPUT_PATH_PREFIX
  • CMAKE_NO_BUILTIN_CHRPATH
  • CMAKE_NO_SYSTEM_FROM_IMPORTED
  • CMAKE_NOT_USING_CONFIG_FLAGS
  • CMAKE_OBJC_EXTENSIONS
  • CMAKE_OBJC_STANDARD
  • CMAKE_OBJC_STANDARD_REQUIRED
  • CMAKE_OBJCXX_EXTENSIONS
  • CMAKE_OBJCXX_STANDARD
  • CMAKE_OBJCXX_STANDARD_REQUIRED
  • CMAKE_OBJECT_PATH_MAX
  • CMAKE_OSX_DEPLOYMENT_TARGET
  • CMAKE_OSX_SYSROOT
  • CMAKE_PARENT_LIST_FILE
  • CMAKE_PATCH_VERSION
  • CMAKE_PCH_WARN_INVALID
  • CMAKE_PDB_OUTPUT_DIRECTORY
  • CMAKE_PDB_OUTPUT_DIRECTORY_CONFIG
  • CMAKE_POLICY_DEFAULT_CMPNNNN
  • CMAKE_POLICY_WARNING_CMPNNNN
  • CMAKE_POSITION_INDEPENDENT_CODE
  • CMAKE_PROGRAM_PATH
  • CMAKE_PROJECT_DESCRIPTION
  • CMAKE_PROJECT_HOMEPAGE_URL
  • CMAKE_PROJECT_INCLUDE
  • CMAKE_PROJECT_INCLUDE_BEFORE
  • CMAKE_PROJECT_NAME
  • CMAKE_PROJECT_PROJECT-NAME_INCLUDE
  • CMAKE_PROJECT_PROJECT-NAME_INCLUDE_BEFORE
  • CMAKE_PROJECT_VERSION
  • CMAKE_PROJECT_VERSION_MAJOR
  • CMAKE_PROJECT_VERSION_MINOR
  • CMAKE_PROJECT_VERSION_PATCH
  • CMAKE_PROJECT_VERSION_TWEAK
  • CMAKE_RANLIB
  • CMAKE_RULE_MESSAGES
  • CMAKE_RUNTIME_OUTPUT_DIRECTORY
  • CMAKE_RUNTIME_OUTPUT_DIRECTORY_CONFIG
  • CMAKE_SCRIPT_MODE_FILE
  • CMAKE_SHARED_LIBRARY_PREFIX
  • CMAKE_SHARED_LIBRARY_SUFFIX
  • CMAKE_SHARED_LINKER_FLAGS
  • CMAKE_SHARED_LINKER_FLAGS_CONFIG
  • CMAKE_SHARED_LINKER_FLAGS_CONFIG_INIT
  • CMAKE_SHARED_LINKER_FLAGS_INIT
  • CMAKE_SHARED_MODULE_PREFIX
  • CMAKE_SHARED_MODULE_SUFFIX
  • CMAKE_SIZEOF_VOID_P
  • CMAKE_SKIP_BUILD_RPATH
  • CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
  • CMAKE_SKIP_INSTALL_RPATH
  • CMAKE_SKIP_INSTALL_RULES
  • CMAKE_SKIP_RPATH
  • CMAKE_SOURCE_DIR
  • CMAKE_STAGING_PREFIX
  • CMAKE_STATIC_LIBRARY_PREFIX
  • CMAKE_STATIC_LIBRARY_SUFFIX
  • CMAKE_STATIC_LINKER_FLAGS
  • CMAKE_STATIC_LINKER_FLAGS_CONFIG
  • CMAKE_STATIC_LINKER_FLAGS_CONFIG_INIT
  • CMAKE_STATIC_LINKER_FLAGS_INIT
  • CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
  • CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
  • CMAKE_SUPPRESS_REGENERATION
  • CMAKE_Swift_LANGUAGE_VERSION
  • CMAKE_Swift_MODULE_DIRECTORY
  • CMAKE_Swift_NUM_THREADS
  • CMAKE_SYSROOT
  • CMAKE_SYSROOT_COMPILE
  • CMAKE_SYSROOT_LINK
  • CMAKE_SYSTEM
  • CMAKE_SYSTEM_APPBUNDLE_PATH
  • CMAKE_SYSTEM_FRAMEWORK_PATH
  • CMAKE_SYSTEM_IGNORE_PATH
  • CMAKE_SYSTEM_INCLUDE_PATH
  • CMAKE_SYSTEM_LIBRARY_PATH
  • CMAKE_SYSTEM_NAME
  • CMAKE_SYSTEM_PREFIX_PATH
  • CMAKE_SYSTEM_PROCESSOR
  • CMAKE_SYSTEM_PROGRAM_PATH
  • CMAKE_SYSTEM_VERSION
  • CMAKE_TOOLCHAIN_FILE
  • CMAKE_TRY_COMPILE_CONFIGURATION
  • CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
  • CMAKE_TRY_COMPILE_TARGET_TYPE
  • CMAKE_TWEAK_VERSION
  • CMAKE_UNITY_BUILD
  • CMAKE_UNITY_BUILD_BATCH_SIZE
  • CMAKE_USE_RELATIVE_PATHS
  • CMAKE_USER_MAKE_RULES_OVERRIDE
  • CMAKE_USER_MAKE_RULES_OVERRIDE_LANG
  • CMAKE_VERBOSE_MAKEFILE
  • CMAKE_VERSION
  • CMAKE_VISIBILITY_INLINES_HIDDEN
  • CMAKE_VS_DEVENV_COMMAND
  • CMAKE_VS_GLOBALS
  • CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
  • CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
  • CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
  • CMAKE_VS_JUST_MY_CODE_DEBUGGING
  • CMAKE_VS_MSBUILD_COMMAND
  • CMAKE_VS_NsightTegra_VERSION
  • CMAKE_VS_PLATFORM_NAME
  • CMAKE_VS_PLATFORM_NAME_DEFAULT
  • CMAKE_VS_PLATFORM_TOOLSET
  • CMAKE_VS_PLATFORM_TOOLSET_CUDA
  • CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR
  • CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
  • CMAKE_VS_PLATFORM_TOOLSET_VERSION
  • CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
  • CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES
  • CMAKE_VS_SDK_INCLUDE_DIRECTORIES
  • CMAKE_VS_SDK_LIBRARY_DIRECTORIES
  • CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
  • CMAKE_VS_SDK_REFERENCE_DIRECTORIES
  • CMAKE_VS_SDK_SOURCE_DIRECTORIES
  • CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
  • CMAKE_VS_WINRT_BY_DEFAULT
  • CMAKE_WARN_DEPRECATED
  • CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
  • CMAKE_WIN32_EXECUTABLE
  • CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
  • CMAKE_XCODE_ATTRIBUTE_an-attribute
  • CMAKE_XCODE_GENERATE_SCHEME
  • CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
  • CMAKE_XCODE_PLATFORM_TOOLSET
  • CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
  • CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
  • CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
  • CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
  • CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
  • CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
  • CMAKE_XCODE_SCHEME_ENVIRONMENT
  • CMAKE_XCODE_SCHEME_GUARD_MALLOC
  • CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
  • CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
  • CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE
  • CMAKE_XCODE_SCHEME_MALLOC_STACK
  • CMAKE_XCODE_SCHEME_THREAD_SANITIZER
  • CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP
  • CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
  • CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
  • CMAKE_XCODE_SCHEME_WORKING_DIRECTORY
  • CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS
  • CPACK_ABSOLUTE_DESTINATION_FILES
  • CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
  • CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
  • CPACK_INCLUDE_TOPLEVEL_DIRECTORY
  • CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
  • CPACK_PACKAGING_INSTALL_PREFIX
  • CPACK_SET_DESTDIR
  • CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
  • CTEST_BINARY_DIRECTORY
  • CTEST_BUILD_COMMAND
  • CTEST_BUILD_NAME
  • CTEST_BZR_COMMAND
  • CTEST_BZR_UPDATE_OPTIONS
  • CTEST_CHANGE_ID
  • CTEST_CHECKOUT_COMMAND
  • CTEST_CONFIGURATION_TYPE
  • CTEST_CONFIGURE_COMMAND
  • CTEST_COVERAGE_COMMAND
  • CTEST_COVERAGE_EXTRA_FLAGS
  • CTEST_CURL_OPTIONS
  • CTEST_CUSTOM_COVERAGE_EXCLUDE
  • CTEST_CUSTOM_ERROR_EXCEPTION
  • CTEST_CUSTOM_ERROR_MATCH
  • CTEST_CUSTOM_ERROR_POST_CONTEXT
  • CTEST_CUSTOM_ERROR_PRE_CONTEXT
  • CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
  • CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
  • CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
  • CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
  • CTEST_CUSTOM_MEMCHECK_IGNORE
  • CTEST_CUSTOM_POST_MEMCHECK
  • CTEST_CUSTOM_POST_TEST
  • CTEST_CUSTOM_PRE_MEMCHECK
  • CTEST_CUSTOM_PRE_TEST
  • CTEST_CUSTOM_TESTS_IGNORE
  • CTEST_CUSTOM_WARNING_EXCEPTION
  • CTEST_CUSTOM_WARNING_MATCH
  • CTEST_CVS_CHECKOUT
  • CTEST_CVS_COMMAND
  • CTEST_CVS_UPDATE_OPTIONS
  • CTEST_DROP_LOCATION
  • CTEST_DROP_METHOD
  • CTEST_DROP_SITE
  • CTEST_DROP_SITE_CDASH
  • CTEST_DROP_SITE_PASSWORD
  • CTEST_DROP_SITE_USER
  • CTEST_EXTRA_COVERAGE_GLOB
  • CTEST_GIT_COMMAND
  • CTEST_GIT_INIT_SUBMODULES
  • CTEST_GIT_UPDATE_CUSTOM
  • CTEST_GIT_UPDATE_OPTIONS
  • CTEST_HG_COMMAND
  • CTEST_HG_UPDATE_OPTIONS
  • CTEST_LABELS_FOR_SUBPROJECTS
  • CTEST_MEMORYCHECK_COMMAND
  • CTEST_MEMORYCHECK_COMMAND_OPTIONS
  • CTEST_MEMORYCHECK_SANITIZER_OPTIONS
  • CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
  • CTEST_MEMORYCHECK_TYPE
  • CTEST_NIGHTLY_START_TIME
  • CTEST_P4_CLIENT
  • CTEST_P4_COMMAND
  • CTEST_P4_OPTIONS
  • CTEST_P4_UPDATE_OPTIONS
  • CTEST_RESOURCE_SPEC_FILE
  • CTEST_RUN_CURRENT_SCRIPT
  • CTEST_SCP_COMMAND
  • CTEST_SOURCE_DIRECTORY
  • CTEST_SUBMIT_URL
  • CTEST_SVN_COMMAND
  • CTEST_SVN_OPTIONS
  • CTEST_SVN_UPDATE_OPTIONS
  • CTEST_TEST_LOAD
  • CTEST_TEST_TIMEOUT
  • CTEST_TRIGGER_SITE
  • CTEST_UPDATE_COMMAND
  • CTEST_UPDATE_OPTIONS
  • CTEST_UPDATE_VERSION_ONLY
  • CTEST_UPDATE_VERSION_OVERRIDE
  • CTEST_USE_LAUNCHERS
  • EXECUTABLE_OUTPUT_PATH
  • LIBRARY_OUTPUT_PATH
  • MSVC_TOOLSET_VERSION
  • MSVC_VERSION
  • PROJECT-NAME_BINARY_DIR
  • PROJECT-NAME_DESCRIPTION
  • PROJECT-NAME_HOMEPAGE_URL
  • PROJECT-NAME_SOURCE_DIR
  • PROJECT-NAME_VERSION
  • PROJECT-NAME_VERSION_MAJOR
  • PROJECT-NAME_VERSION_MINOR
  • PROJECT-NAME_VERSION_PATCH
  • PROJECT-NAME_VERSION_TWEAK
  • PROJECT_BINARY_DIR
  • PROJECT_DESCRIPTION
  • PROJECT_HOMEPAGE_URL
  • PROJECT_NAME
  • PROJECT_SOURCE_DIR
  • PROJECT_VERSION
  • PROJECT_VERSION_MAJOR
  • PROJECT_VERSION_MINOR
  • PROJECT_VERSION_PATCH
  • PROJECT_VERSION_TWEAK
  • WINDOWS_PHONE
  • WINDOWS_STORE
  • XCODE_VERSION

set_property

Set a named property in a given scope.

Sets one property on zero or more objects of a scope.

The first argument determines the scope in which the property is set. It must be one of the following:

Scope is unique and does not accept a name.

Scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path. See also the set_directory_properties() command.

Scope may name zero or more existing targets. See also the set_target_properties() command.

Scope may name zero or more source files. By default, source file properties are only visible to targets added in the same directory ( CMakeLists.txt ). Visibility can be set in other directory scopes using one or both of the following sub-options:

The source file property will be set in each of the <dirs> directories’ scopes. CMake must already know about each of these source directories, either by having added them through a call to add_subdirectory() or it being the top level source directory. Relative paths are treated as relative to the current source directory.

The source file property will be set in each of the directory scopes where any of the specified <targets> were created (the <targets> must therefore already exist).

See also the set_source_files_properties() command.

Scope may name zero or more installed file paths. These are made available to CPack to influence deployment.

Both the property key and value may use generator expressions. Specific properties may apply to installed files and/or directories.

Path components have to be separated by forward slashes, must be normalized and are case sensitive.

To reference the installation prefix itself with a relative path use . .

Currently installed file properties are only defined for the WIX generator where the given paths are relative to the installation prefix.

Scope may name zero or more existing tests. See also the set_tests_properties() command.

Scope must name zero or more cache existing entries.

The required PROPERTY option is immediately followed by the name of the property to set. Remaining arguments are used to compose the property value in the form of a semicolon-separated list.

If the APPEND option is given the list is appended to any existing property value (except that empty values are ignored and not appended). If the APPEND_STRING option is given the string is appended to any existing property value as string, i.e. it results in a longer string and not a list of strings. When using APPEND or APPEND_STRING with a property defined to support INHERITED behavior (see define_property() ), no inheriting occurs when finding the initial value to append to. If the property is not already directly set in the nominated scope, the command will behave as though APPEND or APPEND_STRING had not been given.

See the cmake-properties(7) manual for a list of properties in each scope.

© 2000–2020 Kitware, Inc. and Contributors Licensed under the BSD 3-clause License. https://cmake.org/cmake/help/v3.18/command/set_property.html

set_property

Set a named property in a given scope.

Sets one property on zero or more objects of a scope.

The first argument determines the scope in which the property is set. It must be one of the following:

Scope is unique and does not accept a name.

Scope defaults to the current directory but other directories (already processed by CMake) may be named by full or relative path. Each path may reference either a source directory, or since CMake 3.19, a binary directory. Relative paths are treated as relative to the current source directory. See also the set_directory_properties() command.

Scope may name zero or more existing targets. See also the set_target_properties() command.

Scope may name zero or more source files. By default, source file properties are only visible to targets added in the same directory ( CMakeLists.txt ). Visibility can be set in other directory scopes using one or both of the following sub-options:

The source file property will be set in each of the <dirs> directories’ scopes. Each path may reference either a source directory, or since CMake 3.19, a binary directory. CMake must already know about each of these directories, either by having added them through a call to add_subdirectory() or it being the top level source directory. Relative paths are treated as relative to the current source directory.

The source file property will be set in each of the directory scopes where any of the specified <targets> were created (the <targets> must therefore already exist).

See also the set_source_files_properties() command.

Scope may name zero or more installed file paths. These are made available to CPack to influence deployment.

Both the property key and value may use generator expressions. Specific properties may apply to installed files and/or directories.

Path components have to be separated by forward slashes, must be normalized and are case sensitive.

To reference the installation prefix itself with a relative path use . .

Currently installed file properties are only defined for the WIX generator where the given paths are relative to the installation prefix.

Scope may name zero or more existing tests. See also the set_tests_properties() command.

Scope must name zero or more cache existing entries.

The required PROPERTY option is immediately followed by the name of the property to set. Remaining arguments are used to compose the property value in the form of a semicolon-separated list.

If the APPEND option is given the list is appended to any existing property value (except that empty values are ignored and not appended). If the APPEND_STRING option is given the string is appended to any existing property value as string, i.e. it results in a longer string and not a list of strings. When using APPEND or APPEND_STRING with a property defined to support INHERITED behavior (see define_property() ), no inheriting occurs when finding the initial value to append to. If the property is not already directly set in the nominated scope, the command will behave as though APPEND or APPEND_STRING had not been given.

See the cmake-properties(7) manual for a list of properties in each scope.

© 2000–2020 Kitware, Inc. and Contributors Licensed under the BSD 3-clause License. https://cmake.org/cmake/help/v3.19/command/set_property.html

Computers, Coding and Caffeine

CMake: Set Your C++ Standard With Cmake’s Global Variables

If you’re serious about your coding standards, you’re probably using the latest and greatest C++ features. For this reason, you need to set your compiler’s C++ standards to whatever new version you need. In this post, we will set the C++ standard with CMake.

Illustrations of a space station made of up cogs in the deep space. Representing how complex CMake is, yet very easy to set your C++ standard.

With CMake, this isn’t as difficult as many think. In fact, you only need to set three main variables: CMAKE_CXX_STANDARD , CMAKE_CXX_STANDARD_REQUIRED , and CMAKE_CXX_EXTENSIONS .

Let’s Talk About The C++ Standard CMake Variables

Firstly, let’s discuss how CMake sets the standard throughout your project.

Essentially, every executable or library you declared in your CMakeSettings.txt is a target. For example, creating executables in CMake will in turn generate a named target for it in CMake. Each target has properties set by CMake, and some of those properties relate to the C++ standard for the compilation:

  • CXX_STANDARD dictates which standard version the target will be compiled with. Specifically, at the time of writing the possible values are {98, 11, 14, 17, 20, 23, 26} . If you’re reading this from the far future, this list may have expanded.
  • CXX_STANDARD_REQUIRED is a boolean that makes the standard defined in CXX_STANDARD a requirement. Therefore, configuring the project will not succeed if the compiler used does not support the standard you specified if this flag is set to On .
  • CXX_EXTENSIONS is another boolean value. Briefly speaking, it tells CMake whether compiler extensions (such as inline assembly) are allowed or not. For more portable code, set this value to Off to ensure your code will compile in all compilers.

Setting these properties to targets can be done with the following snippets.

As you can see, we set the standard of target to 17, requiring that standard, and also turning extensions off.

The Recommended Approach To Set The C++ Standard In CMake

Although you can set the standard property on a “target” basis, essentially being able to have different standards for different parts of your codebase, it’s generally recommended not to.

Unless you have a very good reason, you probably want to set the same standard for every target in your project at once. Therefore, the CMAKE_* global variables are very handy here.

Long story short, the CMake documentation specifies that the properties CXX_STANDARD , CXX_STANDARD_REQUIRED , and CXX_EXTENSIONS have initial values. Specifically, they get initialised to the value of CMAKE_CXX_STANDARD , CMAKE_CXX_STANDARD_REQUIRED , and CMAKE_CXX_EXTENSIONS respectively.

In other words, if you don’t specify these properties on a target, the default values of these properties will be set as the global variables mentioned above. Therefore, you can fully specify the standard settings like the example below.

For this reason, stick to the code above when you can! In addition, make sure you call the CMake functions above straight after the project(...) call, or before you create any targets.

When Should You Have Different Versions For Different Targets?

Unfortunately, there aren’t many reasons for having different standard versions in different parts of your codebase.

The C++ standard has always been backwards compatible with previous standard versions. Therefore, if your code compiles in C++14, rest assured it will also compile in C++20. So you can always set the standard as the latest standard your compiler supports.

However, you may have different compilers being used in your project. Therefore, they may not support the same C++ standards. In this case, it’s plausible that you may want to have different versions for different targets.

What Happens If You Don’t Set The C++ Standard In CMake?

In simple terms, the compiler will dictate what standard to use by default. You can check out this compiler standard defaults gist to find out what version is used by default in your compiler.

For example, for gcc 10.2 , the default version is 201402L , and the first four digits indicate that it uses C++ 2014 standard (or 14 for CMAKE_CXX_STANDARD ).

Learning The CMake C++ Standards Settings By Video Example

If you’re still interested in seeing more action regarding setting the C++ compiler settings, the video below shows the usage, examples, and tips on using the CMake features for setting the C++ standard.

If you haven’t already done so, check out my Youtube channel, and if possible, subscribe as that helps out massively!

Further Reading & Notes

  • CXX_STANDARD documentation on CMake’s website .
  • CXX_STANDARD documentation on CMake’s website.
  • CXX_EXTENSIONS documentation on CMake’s website .

All the properties and settings mentioned in this post show work for both executables and libraries created with CMake. Check out how to create executables using CMake , and while you’re at it, also learn how to create libraries with CMake .

Thanks for reading this post!

More importantly: do you have any questions, feedback, or suggestions? Spotted a typo? Feel free to post a comment below!

  • build systems

Be First to Comment

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

Jeremi Mucha

CMake Fundamentals Part 3

by Jeremi | Jan 25, 2021 | CMake | 3 comments

Broadly speaking CMake projects are customized with two major facilities – cache variables (which we will return to at some point) and properties. Whereas variables, be it normal or cached, have for the most part, global scope, properties are attached to an entity – they specify some aspect of it within the project. Properties may be specified for a wide range of scopes – from GLOBAL, through DIRECTORY and TARGET down do individual files. Today we’ll focus on TARGET properties – as these are what will help us with using targets to structure our projects well.

Properies may be operated on directly using the most general commands – set_property and get_property . These commands can set or fetch the value of any property in any scope. However, as the result of the generality they’re the most complicated to use. Most often it’s more convenient to use the more specialized alternatives, like set_target_properties and get_target_property . In fact, even these commands are usually too big of a hammer for the task. Instead, the most used commands operate on a very limited set of properties – usually just one or two. In fact, we’ve already used a command that operates on properties – target_link_libraries ! If a command operates on a target, and does not create one, it most likely modifies its properties.

Project setup

In the previous part of the series we started working on a simple library that exposed a single add function. Expanding this example will help us illustrate the concept of properties. First of all, we will isolate the library code from the application code. For this purpose we create a subdirectory named add , move the library source files – calc_status.h , add.h , add.cpp into that directory, and create a CMakeLists.txt within it. We end up with the following directory structure:

All that needs to be done in the Add library CMakeLists.txt is to declare the library target:

We now need to incorporate this directory into our project so that we may use it. The top-level CMakeLists.txt now looks as follows:

add_subdirectory

To include a directory into a project we introduce a new command – add_subdirectory The add_subdirectory command does exactly what it says – it adds the specified directory to the project. The command expects that the directory contains a CMakeLists.txt file, and processes it immediately – all of the targets defined within the listing will be visible across the entire project. The add_subdirectory command allows us to keep the project-defining CMakeLists.txt files as close to the actual code as possible, this improves readability and maintainability, and actually helps with good design – a subdirectory in this case isolates the library as a separate component or a module . The Add target defined in the subdirectory is then linked into the application code. As a reminder, the main.cpp looks as follows.

To include the Add library headers we now need to go down into the add directory.

Inspecting properties

Let’s now inspect how the target_link_libraries command affects the properties of the Main target. For that purpose we will create our first CMake function.

CMake functions serve the same purpose as in any other language – they facilitate code reuse. Function definitions are enclosed in a function() block. For our needs we will define a function that fetches the value of some target properties we’re interested in, and echoes them to the screen.

The above listing defines a function named PrintTargetLibraries that accepts arguments target and msg . We see a new piece of syntax here – variables are dereferenced by enclosing them in ${} . The get_target_property command fetches the value of LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES properties and stores them in variables linkedLibs and interfaceLibs , respectively. The value is then printed to the screen using the message command. We will gloss over some of the details here as usual.

Our function can be called same as any other CMake command. We use it to print the value of the selected properties on the Main target, before, and after linking the Add library:

Let’s now configure the project to see the output:

We see that before linking the Add library, the variables are set to linkedLibs-NOTFOUND and interfaceLibs-NOTFOUND values respectively. This is a common pattern in CMake – when fetching something that doesn’t exist, the destination variable is set to <variableName>-NOTFOUND . Here – these properties have not been set yet, and that how this is signalled by get_target_property . After linking the library the LINK_LIBRARIES is set to Add – as expected. The INTERFACE_LINK_LIBRARIES however is still empty. To understand why, we will need to discuss the difference between the LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES properties. We will do so, while also discussing the PRIVATE , INTERFACE and PUBLIC keywords.

PRIVATE, INTERFACE, PUBLIC

The PRIVATE, INTERFACE and PUBLIC keywords may bring to mind access specifiers familiar to anyone aquainted with object-oriented languages. This may seem applicable here at first, however at closer inspection it isn’t precisely right. Instead, I’d suggest to think in terms of transitivness of dependencies of a particular target. For exapmle, given target Foo , the semantic meaning of these keywords is:

PRIVATE – fully encapsulated dependencies of Foo – they are required to build Foo , but using Foo does not expose the user to the private dependencies

INTERFACE – dependencies required to use Foo – but NOT required to build Foo itself, Users of Foo will need also these dependencies

PUBLIC – transitive dependencies of Foo – they are required to build Foo , and users of Foo will also depend on these targets indirectly

This has been difficult to grasp intuitively for me at first. What has helped me greatly is to learn, that these keywords are implemented in terms of properties – all they do is specify which properties are modified by a given command. Going back to our target_link_libraries example – it operates on the LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES properties. The LINK_LIBRARIES property specifies a list of libraries that need to be linked to the given target in order to build it. In this case the target Add is added to the list – CMake will handle dereferencing the target and linking the actual library at build time. This property can be thought of as a list of requirements necessary to build the given target. The INTERFACE_LINK_LIBRARIES property specifies a list of libraries that need to be linked to the targets which use (link) the given target. In other words, these are transitive dependencies – if the use of library A also requires linking of library B we could ensure that this is done properly by setting this property to B on library A . This may seem somewhat abstract at the moment – we will see an example later that puts this into perspective.

Thus all these keywords do, is specify if one, or both of these properties should be affected by the target_link_libraries call. The exact mapping is presented in the table below:

  Given our Add target library and Main target executable that uses it, let’s inspect how specifying different keywords would affect these properties. We’ve already seen the example of using PRIVATE . Let’s now try using INTERFACE :

Note that attempting to actually build the project (rather than just configure it) would fail:

This is because calling target_link_libraries with INTERFACE won’t actually link the library into the target – and since Main directly uses code from the Add library, it needs to be linked.

The last keyword we need to inspect is PUBLIC. As described – the Add library should be added to both properties:

And it is. Since the library is now actually linked into the Main target, the project can be built successfully now:

Note that in this case using PUBLIC does not actually make any sense – since this is an executable target, that isn’t, won’t and can’t be linked into any other targets, therefore appending dependencies to INTERFACE_LINK_LIBRARIES has no practical use.

General-purpose property commands

At the start of this post I had mentioned that there are multiple, general-purpose commands for operating on targets. As a small aside, and curiosity let’s see how these commands could be used instead of taret_link_libraries to achieve the same goal.

First we’ll look at the more specialized set_target_properties . With this command it is relatively easy to modify both LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES in a single call:

The above call is equivalent to calling target_link_libraries with the PUBLIC specifier. Configuring and building the project would result in the same output. Note however, that here we set these properties, instead of appending to them – had they contained any values already, we’d clobber them. That’s why using target_link_libraries is both more convenient and readable.

And for completeness let’s now see how we could achieve the same thing using set_property – the most general command for property manipulation.

With set_property we need to specify explicitly that we’d like to manipulate properties on a TARGET . As an improvement, compared to set_target_properties we get to specify APPEND mode – the existing values won’t be overriden, but rather appended to. The trade-off here is that we can modify only a single property at a time, so to imitate a call to target_link_libraries with the PUBLIC specifier, two calls are necessary.

This was just for demonstration purposes – in real code prefer the right tool for the job, in this case – target_link_libraries .

In this part of the series we introduced a few new commands, but most importantly we got the chance to understand exactly what the PRIVATE , INTERFACE and PUBLIC keywords do and how they’re implemented. We learned enough about properties to be able to reason about what to expect from commonly used target-commands, and we’re now ready to explore the concept further.

You may have noticed that even though the Add library was isolated into a separate directory it was not fully encapsulated – we still used relative imports in the main.cpp , which could be seen as a leaky abstraction. In the next part of the series we address this issue and discuss modular design. We will also see practical examples of using INTERFACE and PUBLIC keywords, and we extract some guidelines for when to use each specifier.

Did you learn anything new from what we discussed in this post? Do you expect that any of it will be directly applicable to your own code and daily work?

  • set_property command documentation
  • get_property command documentation
  • set_target_properties command documentation
  • get_target_property command documentation
  • LINK_LIBRARIES property documentation
  • INTERFACE_LINK_LIBRARIES property documentation

Alex

This is very useful article. It reveals some crucial concepts of cmake.

Dave Smith

Jeremi, this is an excellent guide. While “Professional CMake” by Craig Scott (@crascit on X) is the best CMake reference I’ve found, yours is the best CMake tutorial I’ve found. Thank you!

Jeremi

Tank you for the kind words!

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

Submit Comment

Recent Posts

  • Pythonic overload sets with singledispatch
  • CMake Fundamentals Part 9
  • CMake Managing Resources
  • CMake Fundamentals Part 8
  • CMake FetchContent
  • Metaprogramming (1)
  • Musings (1)

set_property

Set a named property in a given scope.

Sets one property on zero or more objects of a scope.

The first argument determines the scope in which the property is set. It must be one of the following:

Scope is unique and does not accept a name.

Scope defaults to the current directory but other directories (already processed by CMake) may be named by full or relative path. Relative paths are treated as relative to the current source directory. See also the set_directory_properties() command.

New in version 3.19: <dir> may reference a binary directory.

Scope may name zero or more existing targets. See also the set_target_properties() command.

Scope may name zero or more source files. By default, source file properties are only visible to targets added in the same directory ( CMakeLists.txt ).

New in version 3.18: Visibility can be set in other directory scopes using one or both of the following sub-options:

The source file property will be set in each of the <dirs> directories' scopes. CMake must already know about each of these directories, either by having added them through a call to add_subdirectory() or it being the top level source directory. Relative paths are treated as relative to the current source directory.

New in version 3.19: <dirs> may reference a binary directory.

The source file property will be set in each of the directory scopes where any of the specified <targets> were created (the <targets> must therefore already exist).

See also the set_source_files_properties() command.

New in version 3.1.

Scope may name zero or more installed file paths. These are made available to CPack to influence deployment.

Both the property key and value may use generator expressions. Specific properties may apply to installed files and/or directories.

Path components have to be separated by forward slashes, must be normalized and are case sensitive.

To reference the installation prefix itself with a relative path use . .

Currently installed file properties are only defined for the WIX generator where the given paths are relative to the installation prefix.

Scope may name zero or more existing tests. See also the set_tests_properties() command.

Scope must name zero or more cache existing entries.

The required PROPERTY option is immediately followed by the name of the property to set. Remaining arguments are used to compose the property value in the form of a semicolon-separated list.

If the APPEND option is given the list is appended to any existing property value (except that empty values are ignored and not appended). If the APPEND_STRING option is given the string is appended to any existing property value as string, i.e. it results in a longer string and not a list of strings. When using APPEND or APPEND_STRING with a property defined to support INHERITED behavior (see define_property() ), no inheriting occurs when finding the initial value to append to. If the property is not already directly set in the nominated scope, the command will behave as though APPEND or APPEND_STRING had not been given.

See the cmake-properties(7) manual for a list of properties in each scope.

The GENERATED source file property may be globally visible. See its documentation for details.

© 2000–2021 Kitware, Inc. and Contributors Licensed under the BSD 3-clause License. https://cmake.org/cmake/help/v3.21/command/set_property.html

set_property global cmake

  • CMake »
  • 3.29.2 Documentation »
  • cmake-commands(7) »
  • get_property

get_property ¶

Get a property.

Gets one property from one object in a scope.

The first argument specifies the variable in which to store the result. The second argument determines the scope from which to get the property. It must be one of the following:

Scope is unique and does not accept a name.

Scope defaults to the current directory but another directory (already processed by CMake) may be named by the full or relative path <dir> . Relative paths are treated as relative to the current source directory. See also the get_directory_property() command.

New in version 3.19: <dir> may reference a binary directory.

Scope must name one existing target. See also the get_target_property() command.

Scope must name one source file. By default, the source file's property will be read from the current source directory's scope.

New in version 3.18: Directory scope can be overridden with one of the following sub-options:

The source file property will be read from the <dir> directory's scope. CMake must already know about the directory, either by having added it through a call to add_subdirectory() or <dir> being the top level directory. Relative paths are treated as relative to the current source directory.

The source file property will be read from the directory scope in which <target> was created ( <target> must therefore already exist).

See also the get_source_file_property() command.

New in version 3.1.

Scope must name one installed file path.

Scope must name one existing test. See also the get_test_property() command.

New in version 3.28: Directory scope can be overridden with the following sub-option:

The test property will be read from the <dir> directory's scope. CMake must already know about the directory, either by having added it through a call to add_subdirectory() or <dir> being the top level directory. Relative paths are treated as relative to the current source directory. <dir> may reference a binary directory.

Scope must name one cache entry.

The required PROPERTY option is immediately followed by the name of the property to get. If the property is not set an empty value is returned, although some properties support inheriting from a parent scope if defined to behave that way (see define_property() ).

If the SET option is given the variable is set to a boolean value indicating whether the property has been set. If the DEFINED option is given the variable is set to a boolean value indicating whether the property has been defined such as with the define_property() command.

If BRIEF_DOCS or FULL_DOCS is given then the variable is set to a string containing documentation for the requested property. If documentation is requested for a property that has not been defined NOTFOUND is returned.

The GENERATED source file property may be globally visible. See its documentation for details.

define_property()

set_property()

Table of Contents

Previous topic.

get_filename_component

  • Show Source

Quick search

Supporting IDEs

In general, IDEs are already supported by a standard CMake project. There are just a few extra things that can help IDEs perform even better.

Folders for targets

Some IDEs, like Xcode, support folders. You have to manually enable the USE_FOLDERS global property to allow CMake to organize your files by folders:

Then, you can add targets to folders after you create them:

Folders can be nested with / .

You can control how files show up in each folder with regular expressions or explicit listings in source_group :

Folders for files

You can also control how the folders inside targets appear. There are two ways, both using the source_group command. The traditional way is

You can explicitly list files with FILES , or use a REGULAR_EXPRESSION . This way you have complete control over the folder structure. However, if your on-disk layout is well designed, you might just want to mimic that. In CMake 3.8+, you can do so very easily with a new version of the source_group command:

For the TREE option, you should usually give a full path starting with something like ${CMAKE_CURRENT_SOURCE_DIR}/ (because the command interprets paths relative to the build directory). The prefix tells you where it puts it into the IDE structure, and the FILES option takes a list of files. CMake will strip the TREE path from the FILE_LIST path, it will add PREFIX , and that will be the IDE folder structure.

Note: If you need to support CMake < 3.8, I would recommend just protecting the above command, and only supporting nice folder layout on CMake 3.8+. For older methods to do this folder layout, see this blog post .

Running with an IDE

To use an IDE, either pass -G"name of IDE" if CMake can produce that IDE's files (like Xcode, Visual Studio), or open the CMakeLists.txt file from your IDE if that IDE has built in support for CMake (CLion, QtCreator, many others).

results matching " "

No results matching " ".

bug

PROPERTIES OF GLOBAL SCOPE

Properties on directories, properties on targets, properties on tests, properties on source files, properties on cache entries, properties on installed files, deprecated properties on directories, deprecated properties on targets, deprecated properties on source files.

Powered by the Ubuntu Manpage Repository , file bugs in Launchpad

  • Blogs by Topic

The CLion Blog

A Cross-Platform IDE for C and C++

  • Twitter Twitter
  • Youtube Youtube

CLion 2024.1 Is Available! CMake Writing Assistance, Debugger Enhancements, and Improvements for Embedded Development

Maria Goldade

CLion 2024.1 is now available! This version of the powerful JetBrains IDE for C and C++ introduces:

  • New abilities in writing assistance for CMake files and integration with CMake presets.
  • Improvements to Meson and Bazel support. 
  • Debugger fixes and enhancements, including forked process debugging.
  • Assembly view enhancements.
  • Coding assistance in device tree files.
  • Several UI improvements.

2024.1

Build 241.14494.288 is ready and can be downloaded from our website , via the Toolbox App , or as a snap package if you are using Ubuntu. 

DOWNLOAD CLION 2024.1

Project models

The 2024.1 version of CLion is bundled with CMake 3.28 . Ninja support has also been updated to v1.11, which is required for C++20 modules to work with CMake.

Creating CMake scripts can sometimes be challenging. Fortunately, CLion’s coding assistance makes writing and updating them easier. Version 2024.1 brings you more coding assistance features particularly focused on working with targets. We’ve added live templates to help you generate add_executable (type exe ) and add_library (type lib ) CMake commands. Now instead of typing all of the necessary code in a CMake block, you can type “lib”, for example, and expand this live template into the CMake block. Here’s a glimpse of this feature in action.

CMake live templates

The Find Usages action allows you to search for references of a code element throughout your whole codebase. In CLion 2024.1, we’ve expanded it by adding more actions for target names, meaning you can use code completion for them. Additionally, you can now navigate to the corresponding add_library or add_executable commands from the target usage.

CMake Find Usages

To make it easier to configure and manage complex build systems effectively, CLion allows you to automatically import CMake presets into CMake profiles that will be available for future use. CLion now offers you more flexibility – in version 2024.1, you can configure more granular integration with CMake presets and choose which preset types to import to CLion. For example, you can choose Configure presets from the import list.

The latest version of CLion includes other CMake-related feature improvements and issue fixes. More details can be found here .

Bazel is becoming increasingly popular among C++ developers. Based on feedback from our users, we’ve come up with a variety of enhancements to the Bazel for CLion plugin :

  • We have fixed a couple issues preventing projects with MODULE.bazel from being opened ( #6155 , #6127 )
  • We improved handling for the strip_include_prefix attribute and introduced support for include_prefix in the cc_library rules.( #5969 , #6007 )
  • We fixed non-passed environment variables for debug runs. ( #5771 )
  • We updated the default project view template file to simplify the onboarding. ( #6175 )
  • We added an option to disable fission in debug builds to mitigate GCC issue ( #6041 )
  • We applied a workaround for the modal Processing … detected file changes dialog. It is not shown anymore after the initial project sync. ( #6094 )

As part of our continuing work to improve Meson support, CLion 2024.1 now comes with a Meson tool window, where you can find the list of builds and useful commands. 

Meson tool window

A New Project wizard is now available, streamlining the process of creating new projects. File templates for new Meson projects can also be configured according to your preferences.

The following fixes have been implemented:

  • When you open a Meson project for the first time, in addition to loading it, CLion creates all of the necessary run configurations.
  • The non-default compiler is correctly used for compiling Meson projects when selected in the toolchain.

Debugger enhancements

In CLion 2024.1 you can debug child processes created with the fork function. Use the context menu of the Threads & Variables pane to set up the follow and detach policies, global settings that change the debugger’s behavior.

Debug forked child processes

LLDB allows debugging only one process at a time, so the Detach Process on Fork setting is always selected for it. GDB allows multiple connections and switching between them.

Several additional debugger enhancements will help ensure you have the ultimate debugging experience when investigating and solving problems in your code:

  • CLion now bundles GDB 14.1. The presentation of the standard types that were initially broken with this version in CLion has now been fixed.
  • If you experience performance issues with GDB, try out a new setting that allows CLion to prepare indexes before the debug session starts. This works on Linux machines for executables launched from the IDE.

Improvements to the VCS

This release brings a variety of updates to VCS support in CLion, including:

  • In-editor code reviews for GitLab and GitHub repos .
  • CI status checks in the Git tool window.
  • Prevention of large file commits to repositories.
  • A new Stash tab in the Commit tool window.
  • The option to exclude folders and files from comparisons.

Code review in editor

Learn about all of the changes here .

UI updates and improvements

When you are working on a big project with huge files or a completely new database, navigation can be a bit tricky. To make this easier, CLion’s editor now has sticky lines. They keep key structural elements pinned to the top of the editor as you scroll so you can promptly navigate through the code. 

Sticky scroll

Starting with the 2024.1 release, a Beta version of the new terminal is available in CLion. To enable the new experience you need go to Settings/Preferences | Tools | Terminal | Enable New Terminal.

Terminal Beta setting

Along with its improved look and feel that bring it into alignment with the new UI , other major features include:

  • Separation of command output into distinct visual blocks.
  • Command completion, including completion for command names, arguments, flags, and paths. For each suggested value, the new terminal displays quick documentation.

New terminal

Currently, the new terminal supports PowerShell, Bash, and Zsh, but more integrations are coming! 

Give it a try and share your ideas on how to improve it, either here in the comments or in our issue tracker .

Additionally, CLion 2024.1 expands the range of scaling options, now allowing you to scale the IDE both up and down. 

Zoom in

There are more updates, enhancements, and changes. The full release notes are available here .

In progress

Work is still in progress for some features, and some updates were not included in this release or require additional action from you:

  • Full line code completion is not yet available in CLion. While we are polishing it, you can try using the Full Line Code Completion plugin to enrich your code completion with multi-token proposals for Python, JavaScript, and other languages. C and C++ support will be coming later. Stay tuned!
  • CLion Nova has been added to CLion Classic, but it’s switched off by default.To enable it, go to Settings / Preferences | Advanced Settings | CLion | Use the ReSharper C++ language engine (CLion Nova) . Give it a try and share your questions with us here in the comments or in our issue tracker .

We encourage you to give CLion 2024.1 a try. If you have an active subscription, you can update today. If you are new to CLion, start your 30-day free trial and experience all the features and improvements right away!

Your CLion team JetBrains The Drive to Develop

Subscribe to CLion Blog updates

By submitting this form, I agree that JetBrains s.r.o. ("JetBrains") may use my name, email address, and location data to send me newsletters, including commercial communications, and to process my personal data for this purpose. I agree that JetBrains may process said data using third-party services for this purpose in accordance with the JetBrains Privacy Policy . I understand that I can revoke this consent at any time in my profile . In addition, an unsubscribe link is included in each email.

Thanks, we've got you!

Discover more

set_property global cmake

CLion 2024.1 Release Candidate

The next major CLion release is on its way, and the release candidate for v2024.1 is already available! To install CLion 2024.1 RC (build 241.14494.229), download it from our website, update via the Toolbox App, or use this snap package (for Ubuntu). You need an active subscription or a trial lic…

Anastasia Kazakova

CLion 2024.1 Goes Beta

The Beta version of CLion 2024.1 is now available with key improvements and changes that are expected to be implemented in the upcoming release. Download build 241.14494.154 from our website, via the Toolbox App, or as a snap pack for Ubuntu. DOWNLOAD CLION 2024.1 BETA The Beta build addresses a…

set_property global cmake

CLion 2024.1 EAP 6: Fixes for the Debugger and CMake Quick Documentation

The CLion 2024.1 EAP 6 build (241.14494.102) is now out! It’s available from our website, via the Toolbox App, or as a snap package if you’re using Ubuntu. The highlights: Enhancements to the debugger: Pointers presentation fixed in the debugger (CPP-37903). Variables not present in the s…

CLion 2024.1 EAP 5: Improved STL Container Rendering in the Debugger and VCS Enhancements

The CLion 2024.1 EAP 5 build (241.14494.27) is now out! It’s available from our website, via the Toolbox App, or as a snap package if you’re using Ubuntu. DOWNLOAD CLION 2024.1 EAP The highlights: We’ve addressed an issue with CMake reloads stalling when working with the remote host toolchai…

We've detected unusual activity from your computer network

To continue, please click the box below to let us know you're not a robot.

Why did this happen?

Please make sure your browser supports JavaScript and cookies and that you are not blocking them from loading. For more information you can review our Terms of Service and Cookie Policy .

For inquiries related to this message please contact our support team and provide the reference ID below.

IMAGES

  1. cmake(04) : set_property()_set_property(global property use_folders on

    set_property global cmake

  2. CMake set_property GLOBAL简单测试

    set_property global cmake

  3. cmake how to set C# project property Auto-generate binding redirects

    set_property global cmake

  4. cmake在vs中创建文件夹组织目标工程_set_property(global property use_folders on)-CSDN博客

    set_property global cmake

  5. cmake命令之set_property和get_property-CSDN博客

    set_property global cmake

  6. CMake从入门到精通(二十)通过list 进行set_target_property操作

    set_property global cmake

VIDEO

  1. UE 5.2 Procedural Content Generation

  2. Housing Crash Will Happen In 2024

  3. today Sarathi studio set property transport

  4. #9 AMC Database Value Store, List and Paginate set

  5. set property... commutative property of union /intersection ...in hindi ,urdu

  6. #22 Send mail automatically while creating new vendor

COMMENTS

  1. set_property

    The source file property will be set in each of the directory scopes where any of the specified <targets> were created (the <targets> must therefore already exist). See also the set_source_files_properties() command. INSTALL. New in version 3.1. Scope may name zero or more installed file paths. These are made available to CPack to influence ...

  2. How to set the global variable in a function for cmake?

    27. Another approach is to use global properties. Once you set it: set_property(GLOBAL PROPERTY source_list_property "${source_list}") you can read it from everywhere: get_property(source_list GLOBAL PROPERTY source_list_property) I used in examples above the different names for property ( source_list_property) and for variable ( source_list ).

  3. Variables and the Cache · Modern CMake

    A global property can be a useful uncached global variable. Many target properties are initialized from a matching variable with CMAKE_ at the front. So setting CMAKE_CXX_STANDARD, for example, will mean that all new targets created will have CXX_STANDARD set to that when they are created. There are two ways to set properties:

  4. Unleashing CMake's Potential: The set_property() Command Explained

    CMake is a cross-platform, open-source build system that generates platform-specific makefiles, project files, and IDE code for building, testing, and packaging software. It provides a powerful way to manage the build process across different operating systems and compilers. set_property() is a versatile command in CMake that allows you to associate named properties with various entities ...

  5. set_property

    Sets one property on zero or more objects of a scope. The first argument determines the scope in which the property is set. It must be one of the following: GLOBAL. Scope is unique and does not accept a name. DIRECTORY. Scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.

  6. Set_property()

    The source file property will be set in each of the <dirs> directories' scopes. Each path may reference either a source directory, or since CMake 3.19, a binary directory. CMake must already know about each of these directories, either by having added them through a call to add_subdirectory () or it being the top level source directory.

  7. CMake: Set Your C++ Standard With Cmake's Global Variables

    Figure 1: A nice illustration of the infinite cogs that make up CMake's usefulness. Setting the C++ standard is just about turning some of these cogs. With CMake, this isn't as difficult as many think. In fact, you only need to set three main variables: CMAKE_CXX_STANDARD, CMAKE_CXX_STANDARD_REQUIRED, and CMAKE_CXX_EXTENSIONS.

  8. set_property()

    The first argument determines the scope in which the property is set. It must be one of the following: GLOBAL. Scope is unique and does not accept a name. DIRECTORY. Scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path. TARGET.

  9. What's the CMake syntax to set and use variables?

    You can use the command line to set entries in the Cache with the syntax cmake -D var:type=value, just cmake -D var=value or with cmake -C CMakeInitialCache.cmake. You can unset entries in the Cache with unset(... CACHE). The Cache is global and you can set them virtually anywhere in your CMake scripts.

  10. CMake Fundamentals Part 3

    In the previous part of the series we looked at the basics of defining and using libraries with CMake. In this part we explore the concepts of target properties and the PRIVATE, INTERFACE and PUBLIC keywords - a crucial pieces of knowledge to using CMake well. While we're at it, we will once again extend the project we have gotten started on in part 2.

  11. set_property()

    Sets one property on zero or more objects of a scope. The first argument determines the scope in which the property is set. It must be one of the following: GLOBAL Scope is unique and does not accept a name. DIRECTORY Scope defaults to the current directory but other directories (already processed by CMake)...

  12. Ubuntu Manpage: cmake-properties

    For instance: set_property(GLOBAL PROPERTY JOB_POOLS two_jobs=2 ten_jobs=10) ... When this property is set to true CMake will allow other targets to "link" to the executable with the target_link_libraries() command. On all platforms a target-level dependency on the executable is created for targets that link to it.

  13. get_property

    New in version 3.18: Directory scope can be overridden with one of the following sub-options: DIRECTORY <dir>. The source file property will be read from the <dir> directory's scope. CMake must already know about the directory, either by having added it through a call to add_subdirectory() or <dir> being the top level directory. Relative paths are treated as relative to the current source ...

  14. IDEs · Modern CMake

    set_property (GLOBAL PROPERTY USE_FOLDERS ON) Then, you can add targets to folders after you create them: set_property (TARGET MyFile PROPERTY FOLDER "Scripts") ... CMake will strip the TREE path from the FILE_LIST path, it will add PREFIX, and that will be the IDE folder structure. Note: If you need to support CMake < 3.8, I would recommend ...

  15. Ubuntu Manpage: cmake-properties

    For instance: set_property(TARGET myexe PROPERTY JOB_POOL_COMPILE ten_jobs) This property is initialized by the value of CMAKE_JOB_POOL_COMPILE. JOB_POOL_LINK Ninja only: Pool used for linking. The number of parallel link processes could be limited by defining pools with the global JOB_POOLS property and then specifing here the pool name.

  16. CMake: Is there a difference between set_property(TARGET ...) and set

    Note that you also have respective set_*_properties functions for some of the other types of properties: set_source_files_properties, set_directory_properties and set_tests_properties.Notably absent are setters for install and global properties. The reason for that is that these functions predate the general set_property call, which was only introduced with CMake 2.6, together with a general ...

  17. cmake(14):利用set_property命令设置全局属性

    在开发过程碰到需要在上级目录中构建,而源代码又分别写在下级目录的情况,同时又要根据不同的情况选择性地添加不同的源代码进行编译,所以考虑将需要编译的源代码放到一个 cmake 列表中。 但是set()对应生成的变量都是局部变量(即不同的目录下不共用),于是使用set_property()命令。

  18. CLion 2024.1 Is Available! CMake Writing Assistance, Debugger

    CLion 2024.1 introduces new abilities in writing assistance for CMake files, debugger fixes, and enhancements, improvements to Meson and Bazel support, and more! ... Use the context menu of the Threads & Variables pane to set up the follow and detach policies, global settings that change the debugger's ... New checks for invalid property ...

  19. scope

    All variables in CMake are local by default. While you can use the PARENT_SCOPE parameter to increase the scope of a local variable by one layer, that mostly makes sense for return values of functions.. For find scripts on the other hand you usually want the behavior of a global variable: Once the find script is called by anyone, you want the results to be available everywhere.

  20. China Economy to Grow 5.3% This Year as Property Stabilizes, Report

    China's economy is set to expand 5.3% this year as the property sector stabilizes and external demand improves, according to the ASEAN+3 Macroeconomic Research Office, helping to lift growth in ...

  21. Is there a way to set globally a cmake property?

    1. Let's say I build multiple cmake-based projects. I want to build them with a global property always defined. For example, let's say I want to build always with sccache. For that, for each project, I need to do: cmake <dir> -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache.