cmake_minimum_required(VERSION 3.20.0) project(PropagatedProperties CXX) add_library(source1 empty.cpp) set_property(TARGET source1 PROPERTY INTERFACE_LIB_VERSION 4) set_property(TARGET source1 APPEND PROPERTY COMPATIBLE_INTERFACE_STRING LIB_VERSION ) add_library(source2 empty.cpp) set_property(TARG...
ON, YES, TRUE, Y, or a non-zero number. False if the constant is 0, OFF, NO, FALSE, N, IGNORE, NOTFOUND, the empty string, or ends in the suffix -NOTFOUND. Named boolean constants are case-insensitive. If the argument is not one of these constants, it is treated as a variable...
# adding two custom build types to the cached value # variable CMAKE_CONFIGURATION_TYPES should be defined before other definitions: set(CMAKE_CONFIGURATION_TYPES "MyDebug;MyRelease" CACHE STRING "" FORCE) After reloading the project, custom types will be available from the CMake settings: Note...
STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) IF(processor MATCHES "86" OR processor MATCHES "amd64" OR processor MATCHES "x64") IF(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS") # The loader in some Solaris versions has a bug due to which it refuses to # start a binary that ...
#include <string> std::string say_hello() { #ifdef IS_WINDOWS return std::string("Hello from Windows!"); #elif IS_LINUX return std::string("Hello from Linux!"); #elif IS_MACOS return std::string("Hello from macOS!"); #else ...
string(CONCAT is-msvc $<OR: $<C_COMPILER_ID:MSVC>, $<STREQUAL:${CMAKE_C_COMPILER_FRONTEND_VARIANT},MSVC> >) check_c_compiler_flag(/W4 UV_LINT_W4) check_c_compiler_flag(/wd4100 UV_LINT_NO_UNUSED_PARAMETER_MSVC) check_c_compiler_flag(/wd4127 UV_LINT_NO_CONDITIONAL_CONSTANT...
set(GLFW_LIBRARY_TYPE"${GLFW_LIBRARY_TYPE}"CACHESTRING "Library type override for GLFW (SHARED, STATIC, OBJECT, or empty to follow BUILD_SHARED_LIBS)") if(GLFW_LIBRARY_TYPE) if(GLFW_LIBRARY_TYPESTREQUAL"SHARED") set(GLFW_BUILD_SHARED_LIBRARY TRUE) ...
build_command(<variable> [CONFIGURATION <config>] [PROJECT_NAME <projname>] [TARGET <target>]) Sets the given <variable> to a string containing the command line for building one configuration of a target in a project using the build tool appropriate for the current CMAKE_GENERATOR. If ...
--check-lines[=<string>] - If specified, limits the range of tokens in -check file on which various features are tested. Example --check-lines=3-7 restricts testing to lines 3 to 7 (inclusive) or --check-lines=5 to restrict to one line. Default is testing entire file. --enable-...
2.Each process gets its own copy of the code and data. Where as in case of dynamic libraries it is only code shared, data is specific to each process.For static libraries memory footprints are larger.For example, if all the window system tools were statically linked, several tens of megab...