Update upstream source from tag 'upstream/3.10.2'
Update to upstream version '3.10.2' with Debian dir 01aa2d0bf48e4c9b444c6374de59c4cbf15893a7
This commit is contained in:
commit
b920e2bbe3
@ -5,5 +5,4 @@ AlignOperands: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
ColumnLimit: 79
|
||||
Standard: Cpp03
|
||||
...
|
||||
|
23
.clang-tidy
23
.clang-tidy
@ -1,16 +1,24 @@
|
||||
---
|
||||
Checks: "-*,\
|
||||
google-readability-casting,\
|
||||
misc-*,\
|
||||
-misc-incorrect-roundings,\
|
||||
-misc-macro-parentheses,\
|
||||
-misc-misplaced-widening-cast,\
|
||||
-misc-static-assert,\
|
||||
modernize-make-shared,\
|
||||
modernize-make-unique,\
|
||||
modernize-redundant-void-arg,\
|
||||
modernize-use-bool-literals,\
|
||||
modernize-use-nullptr,\
|
||||
modernize-use-override,\
|
||||
modernize-*,\
|
||||
-modernize-deprecated-headers,\
|
||||
-modernize-pass-by-value,\
|
||||
-modernize-raw-string-literal,\
|
||||
-modernize-return-braced-init-list,\
|
||||
-modernize-use-auto,\
|
||||
-modernize-use-default-member-init,\
|
||||
-modernize-use-emplace,\
|
||||
-modernize-use-equals-default,\
|
||||
-modernize-use-equals-delete,\
|
||||
-modernize-use-noexcept,\
|
||||
-modernize-use-transparent-functors,\
|
||||
-modernize-use-using,\
|
||||
performance-*,\
|
||||
-performance-inefficient-string-concatenation,\
|
||||
readability-*,\
|
||||
@ -24,7 +32,4 @@ readability-*,\
|
||||
-readability-simplify-boolean-expr,\
|
||||
"
|
||||
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
|
||||
CheckOptions:
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'CM_NULLPTR'
|
||||
...
|
||||
|
39
.gitattributes
vendored
39
.gitattributes
vendored
@ -1,39 +0,0 @@
|
||||
.gitattributes export-ignore
|
||||
.hooks* export-ignore
|
||||
|
||||
# Custom attribute to mark sources as using our C code style.
|
||||
[attr]our-c-style whitespace=tab-in-indent format.clang-format
|
||||
|
||||
# Custom attribute to mark sources as generated.
|
||||
# Do not perform whitespace checks. Do not format.
|
||||
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab -format.clang-format
|
||||
|
||||
bootstrap crlf=input
|
||||
configure crlf=input
|
||||
*.[1-9] crlf=input
|
||||
*.sh crlf=input
|
||||
*.sh.in crlf=input
|
||||
|
||||
*.bat -crlf
|
||||
*.bat.in -crlf
|
||||
*.dsp -crlf
|
||||
*.dsw -crlf
|
||||
*.pfx -crlf
|
||||
*.png -crlf
|
||||
*.sln -crlf
|
||||
*.vcproj -crlf
|
||||
|
||||
*.c our-c-style
|
||||
*.cc our-c-style
|
||||
*.cpp our-c-style
|
||||
*.cu our-c-style
|
||||
*.cxx our-c-style
|
||||
*.h our-c-style
|
||||
*.hh our-c-style
|
||||
*.hpp our-c-style
|
||||
*.hxx our-c-style
|
||||
*.notcu our-c-style
|
||||
|
||||
*.cmake whitespace=tab-in-indent
|
||||
*.rst whitespace=tab-in-indent conflict-marker-size=79
|
||||
*.txt whitespace=tab-in-indent
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,7 +0,0 @@
|
||||
# Exclude MacOS Finder files.
|
||||
.DS_Store
|
||||
|
||||
*.user*
|
||||
|
||||
*.pyc
|
||||
Testing
|
@ -1,10 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Loaded by .git/hooks/(pre-commit|commit-msg|prepare-commit-msg)
|
||||
# during git commit after local hooks have been installed.
|
||||
|
||||
[hooks "chain"]
|
||||
pre-commit = Utilities/Git/pre-commit
|
||||
commit-msg = Utilities/Git/commit-msg
|
||||
prepare-commit-msg = Utilities/Git/prepare-commit-msg
|
File diff suppressed because one or more lines are too long
@ -29,8 +29,8 @@ push @modules, "ExternalProject";
|
||||
# variables
|
||||
open(CMAKE, "$cmake --help-variable-list|") or die "could not run cmake";
|
||||
while (<CMAKE>) {
|
||||
next if /\</; # skip if containing < or >
|
||||
chomp;
|
||||
next if /\</; # skip VARIABLES which contained <>-"templates"
|
||||
push @variables, $_;
|
||||
}
|
||||
close(CMAKE);
|
||||
@ -70,11 +70,24 @@ my @generator_expr = extract_upper("$cmake --help-manual cmake-generator-express
|
||||
# properties
|
||||
open(CMAKE, "$cmake --help-property-list|");
|
||||
while (<CMAKE>) {
|
||||
next if /\</; # skip if containing < or >
|
||||
chomp;
|
||||
push @properties, $_;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
||||
# transform all properties in a hash
|
||||
my %properties = map { $_ => 1 } @properties;
|
||||
|
||||
# version
|
||||
open(CMAKE, "$cmake --version|");
|
||||
my $version = 'unknown';
|
||||
while (<CMAKE>) {
|
||||
chomp;
|
||||
$version = $_ if /cmake version/;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
||||
# generate cmake.vim
|
||||
open(IN, "<cmake.vim.in") or die "could not read cmake.vim.in";
|
||||
open(OUT, ">syntax/cmake.vim") or die "could not write to syntax/cmake.vim";
|
||||
@ -102,6 +115,8 @@ while(<IN>)
|
||||
print OUT " " x 12 , "\\ ", join(" ", sort keys %loop), "\n";
|
||||
} elsif ($1 eq "DEPRECATED") {
|
||||
print OUT " " x 12 , "\\ ", join(" ", sort keys %deprecated), "\n";
|
||||
} elsif ($1 eq "PROPERTIES") {
|
||||
print OUT " " x 12 , "\\ ", join(" ", sort keys %properties), "\n";
|
||||
} elsif ($1 eq "KEYWORDS") {
|
||||
foreach my $k (sort keys %keywords) {
|
||||
print OUT "syn keyword cmakeKW$k contained\n";
|
||||
@ -111,6 +126,9 @@ while(<IN>)
|
||||
}
|
||||
} elsif ($1 eq "KEYWORDS_HIGHLIGHT") {
|
||||
print OUT join("\n", @keyword_hi), "\n";
|
||||
} elsif ($1 eq "VERSION") {
|
||||
$_ =~ s/\@VERSION\@/$version/;
|
||||
print OUT $_;
|
||||
} else {
|
||||
print "ERROR do not know how to replace $1\n";
|
||||
}
|
||||
@ -128,7 +146,6 @@ sub extract_upper
|
||||
|
||||
open(KW, $input);
|
||||
while (<KW>) {
|
||||
|
||||
foreach my $w (m/\b([A-Z_]{2,})\b/g) {
|
||||
next
|
||||
if exists $variables{$w} or # skip if it is a variable
|
||||
|
File diff suppressed because one or more lines are too long
@ -245,5 +245,23 @@ configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
|
||||
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
|
||||
set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
|
||||
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
# Files specific to version control.
|
||||
"/\\\\.git/"
|
||||
"/\\\\.gitattributes$"
|
||||
"/\\\\.github/"
|
||||
"/\\\\.gitignore$"
|
||||
"/\\\\.hooks-config$"
|
||||
|
||||
# Cygwin package build.
|
||||
"/\\\\.build/"
|
||||
|
||||
# Temporary files.
|
||||
"\\\\.swp$"
|
||||
"\\\\.#"
|
||||
"/#"
|
||||
"~$"
|
||||
)
|
||||
|
||||
# include CPack model once all variables are set
|
||||
include(CPack)
|
||||
|
@ -208,12 +208,6 @@ if(CPACK_GENERATOR MATCHES "IFW")
|
||||
|
||||
endif()
|
||||
|
||||
if(CPACK_GENERATOR MATCHES "CygwinSource")
|
||||
# when packaging source make sure the .build directory is not included
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
|
||||
endif()
|
||||
|
||||
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
|
||||
if(CMAKE_PACKAGE_QTGUI)
|
||||
set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
|
||||
|
112
CMakeLists.txt
112
CMakeLists.txt
@ -1,13 +1,7 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
|
||||
if(POLICY CMP0025)
|
||||
cmake_policy(SET CMP0025 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0053)
|
||||
cmake_policy(SET CMP0053 NEW)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||
project(CMake)
|
||||
|
||||
# Make sure we can find internal find_package modules only used for
|
||||
@ -21,6 +15,14 @@ if(CMAKE_BOOTSTRAP)
|
||||
endif()
|
||||
|
||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
|
||||
message(FATAL_ERROR
|
||||
"CMake no longer compiles on HP-UX. See\n"
|
||||
" https://gitlab.kitware.com/cmake/cmake/issues/17137\n"
|
||||
"Use CMake 3.9 or lower instead."
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
|
||||
endif()
|
||||
|
||||
@ -72,6 +74,10 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||
|
||||
# check for available C++ features
|
||||
include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake)
|
||||
|
||||
if(NOT CMake_HAVE_CXX_UNIQUE_PTR)
|
||||
message(FATAL_ERROR "The C++ compiler does not support C++11 (e.g. std::unique_ptr).")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set the internal encoding of CMake to UTF-8
|
||||
@ -244,6 +250,12 @@ if(CMake_RUN_CLANG_TIDY)
|
||||
message(FATAL_ERROR "CMake_RUN_CLANG_TIDY is ON but clang-tidy is not found!")
|
||||
endif()
|
||||
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
|
||||
|
||||
# provide definitions for targets that require a rebuild once .clang-tidy changes
|
||||
file(SHA1 ${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy clang_tidy_sha1)
|
||||
set(CLANG_TIDY_DEFINITIONS "CLANG_TIDY_SHA1=${clang_tidy_sha1}")
|
||||
unset(clang_tidy_sha1)
|
||||
|
||||
endif()
|
||||
configure_file(.clang-tidy .clang-tidy COPYONLY)
|
||||
|
||||
@ -333,11 +345,7 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_SYSTEM_LIBRHASH)
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
find_package(LibRHash)
|
||||
else()
|
||||
message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBRHASH requires CMake >= 3.0")
|
||||
endif()
|
||||
find_package(LibRHash)
|
||||
if(NOT LibRHash_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"CMAKE_USE_SYSTEM_LIBRHASH is ON but LibRHash is not found!")
|
||||
@ -503,11 +511,7 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
#---------------------------------------------------------------------
|
||||
# Build jsoncpp library.
|
||||
if(CMAKE_USE_SYSTEM_JSONCPP)
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
find_package(JsonCpp)
|
||||
else()
|
||||
message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0")
|
||||
endif()
|
||||
find_package(JsonCpp)
|
||||
if(NOT JsonCpp_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
|
||||
@ -521,45 +525,17 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Build libuv library.
|
||||
if(NOT DEFINED CMAKE_USE_LIBUV)
|
||||
set(CMAKE_USE_LIBUV 1)
|
||||
if(APPLE)
|
||||
include(CheckCSourceCompiles)
|
||||
check_c_source_compiles("
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
#ifndef MAC_OS_X_VERSION_10_5
|
||||
#error \"MAC_OS_X_VERSION_10_5 is not defined\"
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
" HAVE_CoreServices_OS_X_10_5)
|
||||
if(NOT HAVE_CoreServices_OS_X_10_5)
|
||||
set(CMAKE_USE_LIBUV 0)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
|
||||
# Disable until it can be ported.
|
||||
set(CMAKE_USE_LIBUV 0)
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_USE_LIBUV)
|
||||
if(CMAKE_USE_SYSTEM_LIBUV)
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
find_package(LibUV 1.0.0)
|
||||
else()
|
||||
message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV requires CMake >= 3.0")
|
||||
endif()
|
||||
if(NOT LIBUV_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
|
||||
endif()
|
||||
set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
|
||||
else()
|
||||
set(CMAKE_LIBUV_LIBRARIES cmlibuv)
|
||||
add_subdirectory(Utilities/cmlibuv)
|
||||
CMAKE_SET_TARGET_FOLDER(cmlibuv "Utilities/3rdParty")
|
||||
if(CMAKE_USE_SYSTEM_LIBUV)
|
||||
find_package(LibUV 1.0.0)
|
||||
if(NOT LIBUV_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
|
||||
endif()
|
||||
set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
|
||||
else()
|
||||
set(CMAKE_LIBUV_LIBRARIES)
|
||||
set(CMAKE_LIBUV_LIBRARIES cmlibuv)
|
||||
add_subdirectory(Utilities/cmlibuv)
|
||||
CMAKE_SET_TARGET_FOLDER(cmlibuv "Utilities/3rdParty")
|
||||
endif()
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
@ -748,31 +724,6 @@ endif()
|
||||
# setup some Testing support (a macro defined in this file)
|
||||
CMAKE_SETUP_TESTING()
|
||||
|
||||
# Check whether to build server mode or not:
|
||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||
if(NOT DEFINED CMake_ENABLE_SERVER_MODE)
|
||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_auto_type CMake_HAVE_CXX_AUTO_TYPE)
|
||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_range_for CMake_HAVE_CXX_RANGE_FOR)
|
||||
if(CMAKE_USE_LIBUV
|
||||
AND CMake_HAVE_CXX_AUTO_TYPE
|
||||
AND CMake_HAVE_CXX_MAKE_UNIQUE
|
||||
AND CMake_HAVE_CXX_RANGE_FOR
|
||||
)
|
||||
set(CMake_ENABLE_SERVER_MODE 1)
|
||||
else()
|
||||
set(CMake_ENABLE_SERVER_MODE 0)
|
||||
endif()
|
||||
endif()
|
||||
if(CMake_ENABLE_SERVER_MODE AND NOT CMAKE_USE_LIBUV)
|
||||
message(FATAL_ERROR "The server mode requires libuv!")
|
||||
endif()
|
||||
else()
|
||||
set(CMake_ENABLE_SERVER_MODE 0)
|
||||
endif()
|
||||
if(NOT DEFINED CMake_TEST_SERVER_MODE)
|
||||
set(CMake_TEST_SERVER_MODE ${CMake_ENABLE_SERVER_MODE})
|
||||
endif()
|
||||
|
||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||
if(NOT CMake_VERSION_IS_RELEASE)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
|
||||
@ -808,6 +759,9 @@ add_subdirectory(Tests)
|
||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||
if(BUILD_TESTING)
|
||||
CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests")
|
||||
IF(TARGET CMakeServerLibTests)
|
||||
CMAKE_SET_TARGET_FOLDER(CMakeServerLibTests "Tests")
|
||||
ENDIF()
|
||||
endif()
|
||||
if(TARGET documentation)
|
||||
CMAKE_SET_TARGET_FOLDER(documentation "Documentation")
|
||||
|
@ -27,9 +27,13 @@ To contribute patches:
|
||||
#. Run `Utilities/SetupForDevelopment.sh`_ for local configuration.
|
||||
#. See the `CMake Source Code Guide`_ for coding guidelines.
|
||||
#. Base all new work on the upstream ``master`` branch.
|
||||
#. Create commits making incremental, distinct, logically complete changes.
|
||||
Base work on the upstream ``release`` branch only if it fixes a
|
||||
regression or bug in a feature new to that release.
|
||||
#. Create commits making incremental, distinct, logically complete changes
|
||||
with appropriate `commit messages`_.
|
||||
#. Push a topic branch to a personal repository fork on GitLab.
|
||||
#. Create a GitLab Merge Request targeting the upstream ``master`` branch.
|
||||
#. Create a GitLab Merge Request targeting the upstream ``master`` branch
|
||||
(even if the change is intended for merge to the ``release`` branch).
|
||||
|
||||
The merge request will enter the `CMake Review Process`_ for consideration.
|
||||
|
||||
@ -37,6 +41,7 @@ The merge request will enter the `CMake Review Process`_ for consideration.
|
||||
.. _`CMake Repository`: https://gitlab.kitware.com/cmake/cmake
|
||||
.. _`Utilities/SetupForDevelopment.sh`: Utilities/SetupForDevelopment.sh
|
||||
.. _`CMake Source Code Guide`: Help/dev/source.rst
|
||||
.. _`commit messages`: Help/dev/review.rst#commit-messages
|
||||
.. _`CMake Review Process`: Help/dev/review.rst
|
||||
|
||||
License
|
||||
|
@ -44,6 +44,8 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"Warning: LINN32: Last line.*is less.*"
|
||||
"Warning: Olimit was exceeded on function.*"
|
||||
"Warning: To override Olimit for all functions in file.*"
|
||||
"Warning: Function .* can throw only the exceptions thrown by the function .* it overrides\\."
|
||||
"WarningMessagesDialog\\.cxx"
|
||||
"warning.*directory name.*CMake-Xcode.*/bin/.*does not exist.*"
|
||||
"stl_deque.h:1051"
|
||||
"(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)"
|
||||
@ -68,11 +70,11 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto
|
||||
"IPA warning: function.*multiply defined in"
|
||||
|
||||
# Ignore clang's summary warning, assuming prior text has matched some
|
||||
# Ignore compiler summary warning, assuming prior text has matched some
|
||||
# other warning expression:
|
||||
"[0-9,]+ warnings? generated."
|
||||
# similarly for PGI
|
||||
"compilation completed with warnings"
|
||||
"[0-9,]+ warnings? generated." # Clang
|
||||
"compilation completed with warnings" # PGI
|
||||
"[0-9]+ Warning\\(s\\) detected" # SunPro
|
||||
|
||||
# scanbuild exceptions
|
||||
"char_traits.h:.*: warning: Null pointer argument in call to string length function"
|
||||
|
@ -37,18 +37,6 @@ if(CMAKE_SYSTEM MATCHES "OSF1-V")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "HP-UX" AND CMAKE_CXX_COMPILER_ID MATCHES "HP")
|
||||
# HP aCC since version 3.80 supports the flag +hpxstd98 to get ANSI C++98
|
||||
# template support. It is known that version 6.25 doesn't need that flag.
|
||||
# Versions prior to 3.80 will not be able to build CMake. Current assumption:
|
||||
# it is needed for every version from 3.80 to 4 to get it working.
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4 AND
|
||||
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.80)
|
||||
# use new C++ library and improved template support
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Workaround for short jump tables on PA-RISC
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
@ -34,6 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
The following individuals and institutions are among the Contributors:
|
||||
|
||||
* Aaron C. Meadows <cmake@shadowguarddev.com>
|
||||
* Adriaan de Groot <groot@kde.org>
|
||||
* Aleksey Avdeev <solo@altlinux.ru>
|
||||
* Alexander Neundorf <neundorf@kde.org>
|
||||
* Alexander Smorkalov <alexander.smorkalov@itseez.com>
|
||||
@ -75,6 +76,7 @@ The following individuals and institutions are among the Contributors:
|
||||
* Nicolas Bock <nicolasbock@gmail.com>
|
||||
* Nicolas Despres <nicolas.despres@gmail.com>
|
||||
* Nikita Krupen'ko <krnekit@gmail.com>
|
||||
* NVIDIA Corporation <www.nvidia.com>
|
||||
* OpenGamma Ltd. <opengamma.com>
|
||||
* Per Øyvind Karlsen <peroyvind@mandriva.org>
|
||||
* Peter Collingbourne <peter@pcc.me.uk>
|
||||
|
@ -225,3 +225,13 @@ of the following is specified:
|
||||
:command:`add_custom_target` command.
|
||||
``POST_BUILD``
|
||||
Run after all other rules within the target have been executed.
|
||||
|
||||
.. note::
|
||||
Because generator expressions can be used in custom commands,
|
||||
it is possible to define ``COMMAND`` lines or whole custom commands
|
||||
which evaluate to empty strings for certain configurations.
|
||||
For **Visual Studio 2010 (and newer)** generators these command
|
||||
lines or custom commands will be omitted for the specific
|
||||
configuration and no "empty-string-command" will be added.
|
||||
|
||||
This allows to add individual build events for every configuration.
|
||||
|
@ -13,13 +13,34 @@ queried. The list of queried values is stored in ``<variable>``.
|
||||
|
||||
``<key>`` can be one of the following values:
|
||||
|
||||
::
|
||||
|
||||
NUMBER_OF_LOGICAL_CORES = Number of logical cores.
|
||||
NUMBER_OF_PHYSICAL_CORES = Number of physical cores.
|
||||
HOSTNAME = Hostname.
|
||||
FQDN = Fully qualified domain name.
|
||||
TOTAL_VIRTUAL_MEMORY = Total virtual memory in megabytes.
|
||||
AVAILABLE_VIRTUAL_MEMORY = Available virtual memory in megabytes.
|
||||
TOTAL_PHYSICAL_MEMORY = Total physical memory in megabytes.
|
||||
AVAILABLE_PHYSICAL_MEMORY = Available physical memory in megabytes.
|
||||
============================= ================================================
|
||||
Key Description
|
||||
============================= ================================================
|
||||
``NUMBER_OF_LOGICAL_CORES`` Number of logical cores
|
||||
``NUMBER_OF_PHYSICAL_CORES`` Number of physical cores
|
||||
``HOSTNAME`` Hostname
|
||||
``FQDN`` Fully qualified domain name
|
||||
``TOTAL_VIRTUAL_MEMORY`` Total virtual memory in megabytes
|
||||
``AVAILABLE_VIRTUAL_MEMORY`` Available virtual memory in megabytes
|
||||
``TOTAL_PHYSICAL_MEMORY`` Total physical memory in megabytes
|
||||
``AVAILABLE_PHYSICAL_MEMORY`` Available physical memory in megabytes
|
||||
``IS_64BIT`` One if processor is 64Bit
|
||||
``HAS_FPU`` One if processor has floating point unit
|
||||
``HAS_MMX`` One if processor supports MMX instructions
|
||||
``HAS_MMX_PLUS`` One if porcessor supports Ext. MMX instructions
|
||||
``HAS_SSE`` One if porcessor supports SSE instructions
|
||||
``HAS_SSE2`` One if porcessor supports SSE2 instructions
|
||||
``HAS_SSE_FP`` One if porcessor supports SSE FP instructions
|
||||
``HAS_SSE_MMX`` One if porcessor supports SSE MMX instructions
|
||||
``HAS_AMD_3DNOW`` One if porcessor supports 3DNow instructions
|
||||
``HAS_AMD_3DNOW_PLUS`` One if porcessor supports 3DNow+ instructions
|
||||
``HAS_IA64`` One if IA64 processor emulating x86
|
||||
``HAS_SERIAL_NUMBER`` One if processor has serial number
|
||||
``PROCESSOR_SERIAL_NUMBER`` Processor serial number
|
||||
``PROCESSOR_NAME`` Human readable processor name
|
||||
``PROCESSOR_DESCRIPTION`` Human readable full processor description
|
||||
``OS_NAME`` See :variable:`CMAKE_HOST_SYSTEM_NAME`
|
||||
``OS_RELEASE`` The OS sub-type e.g. on Windows ``Professional``
|
||||
``OS_VERSION`` The OS build ID
|
||||
``OS_PLATFORM`` See :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`
|
||||
============================= ================================================
|
||||
|
@ -43,15 +43,18 @@ macro which can be followed by more than one value, like e.g. the
|
||||
``<multi_value_keywords>``. A warning will be emitted if uniqueness is
|
||||
violated.
|
||||
|
||||
When done, ``cmake_parse_arguments`` will have defined for each of the
|
||||
When done, ``cmake_parse_arguments`` will consider for each of the
|
||||
keywords listed in ``<options>``, ``<one_value_keywords>`` and
|
||||
``<multi_value_keywords>`` a variable composed of the given ``<prefix>``
|
||||
followed by ``"_"`` and the name of the respective keyword. These
|
||||
variables will then hold the respective value from the argument list.
|
||||
For the ``<options>`` keywords this will be ``TRUE`` or ``FALSE``.
|
||||
variables will then hold the respective value from the argument list
|
||||
or be undefined if the associated option could not be found.
|
||||
For the ``<options>`` keywords, these will always be defined,
|
||||
to ``TRUE`` or ``FALSE``, whether the option is in the argument list or not.
|
||||
|
||||
All remaining arguments are collected in a variable
|
||||
``<prefix>_UNPARSED_ARGUMENTS``, this can be checked afterwards to see
|
||||
``<prefix>_UNPARSED_ARGUMENTS`` that will be undefined if all argument
|
||||
where recognized. This can be checked afterwards to see
|
||||
whether your macro was called with unrecognized parameters.
|
||||
|
||||
As an example here a ``my_install()`` macro, which takes similar arguments
|
||||
@ -74,16 +77,16 @@ Assume ``my_install()`` has been called like this:
|
||||
|
||||
my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
|
||||
|
||||
After the ``cmake_parse_arguments`` call the macro will have set the
|
||||
following variables::
|
||||
After the ``cmake_parse_arguments`` call the macro will have set or undefined
|
||||
the following variables::
|
||||
|
||||
MY_INSTALL_OPTIONAL = TRUE
|
||||
MY_INSTALL_FAST = FALSE (was not used in call to my_install)
|
||||
MY_INSTALL_FAST = FALSE # was not used in call to my_install
|
||||
MY_INSTALL_DESTINATION = "bin"
|
||||
MY_INSTALL_RENAME = "" (was not used)
|
||||
MY_INSTALL_RENAME <UNDEFINED> # was not used
|
||||
MY_INSTALL_TARGETS = "foo;bar"
|
||||
MY_INSTALL_CONFIGURATIONS = "" (was not used)
|
||||
MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (nothing expected after "OPTIONAL")
|
||||
MY_INSTALL_CONFIGURATIONS <UNDEFINED> # was not used
|
||||
MY_INSTALL_UNPARSED_ARGUMENTS = "blub" # nothing expected after "OPTIONAL"
|
||||
|
||||
You can then continue and process these variables.
|
||||
|
||||
|
@ -30,9 +30,23 @@ a false constant by the :command:`if` command. The "..." content on the
|
||||
line after the variable name, if any, is processed as above.
|
||||
Input file lines of the form ``#cmakedefine01 VAR`` will be replaced with
|
||||
either ``#define VAR 1`` or ``#define VAR 0`` similarly.
|
||||
The result lines (with the exception of the ``#undef`` comments) can be
|
||||
indented using spaces and/or tabs between the ``#`` character
|
||||
and the ``cmakedefine`` or ``cmakedefine01`` words. This whitespace
|
||||
indentation will be preserved in the output lines::
|
||||
|
||||
# cmakedefine VAR
|
||||
# cmakedefine01 VAR
|
||||
|
||||
will be replaced, if ``VAR`` is defined, with::
|
||||
|
||||
# define VAR
|
||||
# define VAR 1
|
||||
|
||||
If the input file is modified the build system will re-run CMake to
|
||||
re-configure the file and generate the build system again.
|
||||
The generated file is modified and its timestamp updated on subsequent
|
||||
cmake runs only if its content is changed.
|
||||
|
||||
The arguments are:
|
||||
|
||||
|
@ -10,6 +10,7 @@ Execute one or more child processes.
|
||||
[WORKING_DIRECTORY <directory>]
|
||||
[TIMEOUT <seconds>]
|
||||
[RESULT_VARIABLE <variable>]
|
||||
[RESULTS_VARIABLE <variable>]
|
||||
[OUTPUT_VARIABLE <variable>]
|
||||
[ERROR_VARIABLE <variable>]
|
||||
[INPUT_FILE <file>]
|
||||
@ -49,10 +50,16 @@ Options:
|
||||
specified number of seconds (fractions are allowed).
|
||||
|
||||
``RESULT_VARIABLE``
|
||||
The variable will be set to contain the result of running the processes.
|
||||
The variable will be set to contain the result of last child process.
|
||||
This will be an integer return code from the last child or a string
|
||||
describing an error condition.
|
||||
|
||||
``RESULTS_VARIABLE <variable>``
|
||||
The variable will be set to contain the result of all processes as a
|
||||
:ref:`;-list <CMake Language Lists>`, in order of the given ``COMMAND``
|
||||
arguments. Each entry will be an integer return code from the
|
||||
corresponding child or a string describing an error condition.
|
||||
|
||||
``OUTPUT_VARIABLE``, ``ERROR_VARIABLE``
|
||||
The variable named will be set with the contents of the standard output
|
||||
and standard error pipes, respectively. If the same variable is named
|
||||
|
@ -13,8 +13,11 @@ File manipulation command.
|
||||
Write ``<content>`` into a file called ``<filename>``. If the file does
|
||||
not exist, it will be created. If the file already exists, ``WRITE``
|
||||
mode will overwrite it and ``APPEND`` mode will append to the end.
|
||||
(If the file is a build input, use the :command:`configure_file` command
|
||||
to update the file only when its content changes.)
|
||||
Any directories in the path specified by ``<filename>`` that do not
|
||||
exist will be created.
|
||||
|
||||
If the file is a build input, use the :command:`configure_file` command
|
||||
to update the file only when its content changes.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@ -105,9 +108,7 @@ Generate a list of files that match the ``<globbing-expressions>`` and
|
||||
store it into the ``<variable>``. Globbing expressions are similar to
|
||||
regular expressions, but much simpler. If ``RELATIVE`` flag is
|
||||
specified, the results will be returned as relative paths to the given
|
||||
path. No specific order of results is defined other than that it is
|
||||
deterministic. If order is important then sort the list explicitly
|
||||
(e.g. using the :command:`list(SORT)` command).
|
||||
path. The results will be ordered lexicographically.
|
||||
|
||||
By default ``GLOB`` lists directories - directories are omited in result if
|
||||
``LIST_DIRECTORIES`` is set to false.
|
||||
@ -291,6 +292,8 @@ from the input content to produce the output content. The options are:
|
||||
|
||||
``INPUT <input-file>``
|
||||
Use the content from a given file as input.
|
||||
A relative path is treated with respect to the value of
|
||||
:variable:`CMAKE_CURRENT_SOURCE_DIR`. See policy :policy:`CMP0070`.
|
||||
|
||||
``OUTPUT <output-file>``
|
||||
Specify the output file name to generate. Use generator expressions
|
||||
@ -298,11 +301,14 @@ from the input content to produce the output content. The options are:
|
||||
name. Multiple configurations may generate the same output file only
|
||||
if the generated content is identical. Otherwise, the ``<output-file>``
|
||||
must evaluate to an unique name for each configuration.
|
||||
A relative path (after evaluating generator expressions) is treated
|
||||
with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
|
||||
See policy :policy:`CMP0070`.
|
||||
|
||||
Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific
|
||||
``OUTPUT`` file may be named by at most one invocation of ``file(GENERATE)``.
|
||||
Generated files are modified on subsequent cmake runs only if their content
|
||||
is changed.
|
||||
Generated files are modified and their timestamp updated on subsequent cmake
|
||||
runs only if their content is changed.
|
||||
|
||||
Note also that ``file(GENERATE)`` does not create the output file until the
|
||||
generation phase. The output file will not yet have been written when the
|
||||
|
@ -30,7 +30,7 @@ else and endif clause is optional. Long expressions can be used and
|
||||
there is a traditional order of precedence. Parenthetical expressions
|
||||
are evaluated first followed by unary tests such as ``EXISTS``,
|
||||
``COMMAND``, and ``DEFINED``. Then any binary tests such as
|
||||
``EQUAL``, ``LESS``, ``LESS_EQUAL, ``GREATER``, ``GREATER_EQUAL``,
|
||||
``EQUAL``, ``LESS``, ``LESS_EQUAL``, ``GREATER``, ``GREATER_EQUAL``,
|
||||
``STREQUAL``, ``STRLESS``, ``STRLESS_EQUAL``, ``STRGREATER``,
|
||||
``STRGREATER_EQUAL``, ``VERSION_EQUAL``, ``VERSION_LESS``,
|
||||
``VERSION_LESS_EQUAL``, ``VERSION_GREATER``, ``VERSION_GREATER_EQUAL``,
|
||||
|
46
Help/command/include_guard.rst
Normal file
46
Help/command/include_guard.rst
Normal file
@ -0,0 +1,46 @@
|
||||
include_guard
|
||||
-------------
|
||||
|
||||
Provides an include guard for the file currently being processed by CMake.
|
||||
|
||||
::
|
||||
|
||||
include_guard([DIRECTORY|GLOBAL])
|
||||
|
||||
Sets up an include guard for the current CMake file (see the
|
||||
:variable:`CMAKE_CURRENT_LIST_FILE` variable documentation).
|
||||
|
||||
CMake will end its processing of the current file at the location of the
|
||||
:command:`include_guard` command if the current file has already been
|
||||
processed for the applicable scope (see below). This provides functionality
|
||||
similar to the include guards commonly used in source headers or to the
|
||||
``#pragma once`` directive. If the current file has been processed previously
|
||||
for the applicable scope, the effect is as though :command:`return` had been
|
||||
called. Do not call this command from inside a function being defined within
|
||||
the current file.
|
||||
|
||||
An optional argument specifying the scope of the guard may be provided.
|
||||
Possible values for the option are:
|
||||
|
||||
``DIRECTORY``
|
||||
The include guard applies within the current directory and below. The file
|
||||
will only be included once within this directory scope, but may be included
|
||||
again by other files outside of this directory (i.e. a parent directory or
|
||||
another directory not pulled in by :command:`add_subdirectory` or
|
||||
:command:`include` from the current file or its children).
|
||||
|
||||
``GLOBAL``
|
||||
The include guard applies globally to the whole build. The current file
|
||||
will only be included once regardless of the scope.
|
||||
|
||||
If no arguments given, ``include_guard`` has the same scope as a variable,
|
||||
meaning that the include guard effect is isolated by the most recent
|
||||
function scope or current directory if no inner function scopes exist.
|
||||
In this case the command behavior is the same as:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
if(__CURRENT_FILE_VAR__)
|
||||
return()
|
||||
endif()
|
||||
set(__CURRENT_FILE_VAR__ TRUE)
|
@ -132,6 +132,15 @@ APPEND
|
||||
|
||||
Append all the input arguments to the string.
|
||||
|
||||
PREPEND
|
||||
"""""""
|
||||
|
||||
::
|
||||
|
||||
string(PREPEND <string variable> [<input>...])
|
||||
|
||||
Prepend all the input arguments to the string.
|
||||
|
||||
CONCAT
|
||||
""""""
|
||||
|
||||
@ -315,6 +324,7 @@ specifiers:
|
||||
%j The day of the current year (001-366).
|
||||
%m The month of the current year (01-12).
|
||||
%b Abbreviated month name (e.g. Oct).
|
||||
%B Full month name (e.g. October).
|
||||
%M The minute of the current hour (00-59).
|
||||
%s Seconds since midnight (UTC) 1-Jan-1970 (UNIX time).
|
||||
%S The second of the current minute.
|
||||
@ -322,6 +332,7 @@ specifiers:
|
||||
%U The week number of the current year (00-53).
|
||||
%w The day of the current week. 0 is Sunday. (0-6)
|
||||
%a Abbreviated weekday name (e.g. Fri).
|
||||
%A Full weekday name (e.g. Friday).
|
||||
%y The last two digits of the current year (00-99)
|
||||
%Y The current year.
|
||||
|
||||
|
@ -8,6 +8,80 @@ See documentation on `CMake Development`_ for more information.
|
||||
|
||||
.. contents:: Maintainer Processes:
|
||||
|
||||
Review a Merge Request
|
||||
======================
|
||||
|
||||
The `CMake Review Process`_ requires a maintainer to issue the ``Do: merge``
|
||||
command to integrate a merge request. Please check at least the following:
|
||||
|
||||
* If the MR source branch is not named well for the change it makes
|
||||
(e.g. it is just ``master`` or the patch changed during review),
|
||||
add a ``Topic-rename: <topic>`` trailing line to the MR description
|
||||
to provide a better topic name.
|
||||
|
||||
* If the MR introduces a new feature or a user-facing behavior change,
|
||||
such as a policy, ensure that a ``Help/release/dev/$topic.rst`` file
|
||||
is added with a release note.
|
||||
|
||||
* If a commit changes a specific area, such as a module, its commit
|
||||
message should have an ``area:`` prefix on its first line.
|
||||
|
||||
* If a commit fixes a tracked issue, its commit message should have
|
||||
a trailing line such as ``Fixes: #00000``.
|
||||
|
||||
* Ensure that the MR adds sufficient documentation and test cases.
|
||||
|
||||
* Ensure that the MR has been tested sufficiently. Typically it should
|
||||
be staged for nightly testing with ``Do: stage``. Then manually
|
||||
review the `CMake CDash Page`_ to verify that no regressions were
|
||||
introduced. (Learn to tolerate spurious failures due to idiosyncrasies
|
||||
of various nightly builders.)
|
||||
|
||||
* Ensure that the MR targets the ``master`` branch. A MR intended for
|
||||
the ``release`` branch should be based on ``release`` but still merged
|
||||
to ``master`` first (via ``Do: merge``). A maintainer may then merge
|
||||
the MR topic to ``release`` manually.
|
||||
|
||||
Maintain Current Release
|
||||
========================
|
||||
|
||||
The ``release`` branch is used to maintain the current release or release
|
||||
candidate. The branch is published with no version number but maintained
|
||||
using a local branch named ``release-$ver``, where ``$ver`` is the version
|
||||
number of the current release in the form ``$major.$minor``. It is always
|
||||
merged into ``master`` before publishing.
|
||||
|
||||
To merge some ``$topic`` branch into ``release``, first create the local
|
||||
branch:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git fetch origin
|
||||
git checkout -b release-$ver origin/release
|
||||
|
||||
Merge the ``$topic`` branch into the local ``release-$ver`` branch:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git merge --no-ff $topic
|
||||
|
||||
Merge the ``release-$ver`` branch to ``master``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git checkout master
|
||||
git pull
|
||||
git merge --no-ff release-$ver
|
||||
|
||||
Publish both ``master`` and ``release`` simultaneously:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git push --atomic origin master release-$ver:release
|
||||
|
||||
.. _`CMake Review Process`: review.rst
|
||||
.. _`CMake CDash Page`: https://open.cdash.org/index.php?project=CMake
|
||||
|
||||
Branch a New Release
|
||||
====================
|
||||
|
||||
|
@ -185,6 +185,83 @@ commands to ``@kwrobot`` using the form ``Do: ...``:
|
||||
See the corresponding sections for details on permissions and options
|
||||
for each command.
|
||||
|
||||
Commit Messages
|
||||
---------------
|
||||
|
||||
Part of the human review is to check that each commit message is appropriate.
|
||||
The first line of the message should begin with one or two words indicating the
|
||||
area the commit applies to, followed by a colon and then a brief summary.
|
||||
Committers should aim to keep this first line short. Any subsequent lines
|
||||
should be separated from the first by a blank line and provide relevant, useful
|
||||
information.
|
||||
|
||||
Area Prefix on Commit Messages
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The appropriateness of the initial word describing the area the commit applies
|
||||
to is not something the automatic robot review can judge, so it is up to the
|
||||
human reviewer to confirm that the area is specified and that it is
|
||||
appropriate. Good area words include the module name the commit is primarily
|
||||
fixing, the main C++ source file being edited, ``Help`` for generic
|
||||
documentation changes or a feature or functionality theme the changes apply to
|
||||
(e.g. ``server`` or ``Autogen``). Examples of suitable first lines of a commit
|
||||
message include:
|
||||
|
||||
* ``Help: Fix example in cmake-buildsystem(7) manual``
|
||||
* ``FindBoost: Add support for 1.64``
|
||||
* ``Autogen: Extended mocInclude tests``
|
||||
* ``cmLocalGenerator: Explain standard flag selection logic in comments``
|
||||
|
||||
Referencing Issues in Commit Messages
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If the commit fixes a particular reported issue, this information should
|
||||
ideally also be part of the commit message. The recommended way to do this is
|
||||
to place a line at the end of the message in the form ``Fixes: #xxxxx`` where
|
||||
``xxxxx`` is the GitLab issue number and to separate it from the rest of the
|
||||
text by a blank line. For example::
|
||||
|
||||
Help: Fix FooBar example robustness issue
|
||||
|
||||
FooBar supports option X, but the example provided
|
||||
would not work if Y was also specified.
|
||||
|
||||
Fixes: #12345
|
||||
|
||||
GitLab will automatically create relevant links to the merge request and will
|
||||
close the issue when the commit is merged into master. GitLab understands a few
|
||||
other synonyms for ``Fixes`` and allows much more flexible forms than the
|
||||
above, but committers should aim for this format for consistency. Note that
|
||||
such details can alternatively be specified in the merge request description.
|
||||
|
||||
Referencing Commits in Commit Messages
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The preferred form for references to other commits is
|
||||
``commit <commit> (<subject>, <date>)``, where:
|
||||
|
||||
* ``<commit>``:
|
||||
If available, a tag-relative name of the commit produced by
|
||||
``git describe --contains <commit-ish>``. Otherwise, the first
|
||||
8-10 characters of the commit ``<hash>``.
|
||||
|
||||
* ``<subject>``:
|
||||
The first line of the commit message.
|
||||
|
||||
* ``<date>``:
|
||||
The author date of the commit, in its original time zone, formatted as
|
||||
``CCYY-MM-DD``. ``git-log(1)`` shows the original time zone by default.
|
||||
|
||||
Alternatively, the full commit ``<hash>`` may be used.
|
||||
|
||||
Revising Commit Messages
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Reviewers are encouraged to ask the committer to amend commit messages to
|
||||
follow these guidelines, but prefer to focus on the changes themselves as a
|
||||
first priority. Maintainers will also make a check of commit messages before
|
||||
merging.
|
||||
|
||||
Topic Testing
|
||||
=============
|
||||
|
||||
|
@ -23,24 +23,12 @@ format only a subset of files, such as those that are locally modified.
|
||||
C++ Subset Permitted
|
||||
====================
|
||||
|
||||
CMake supports compiling as C++98 in addition to C++11 and C++14.
|
||||
In order to support building on older toolchains some constructs
|
||||
need to be handled with care:
|
||||
CMake requires compiling as C++11 or above. However, in order to support
|
||||
building on older toolchains some constructs need to be handled with care:
|
||||
|
||||
* Use ``CM_AUTO_PTR`` instead of ``std::auto_ptr``.
|
||||
* Do not use ``std::auto_ptr``.
|
||||
|
||||
The ``std::auto_ptr`` template is deprecated in C++11. We want to use it
|
||||
so we can build on C++98 compilers but we do not want to turn off compiler
|
||||
warnings about deprecated interfaces in general. Use the ``CM_AUTO_PTR``
|
||||
macro instead.
|
||||
|
||||
* Use ``CM_EQ_DELETE;`` instead of ``= delete;``.
|
||||
|
||||
Defining functions as *deleted* is not supported in C++98. Using
|
||||
``CM_EQ_DELETE`` will delete the functions if the compiler supports it and
|
||||
give them no implementation otherwise. Calling such a function will lead
|
||||
to compiler errors if the compiler supports *deleted* functions and linker
|
||||
errors otherwise.
|
||||
The ``std::auto_ptr`` template is deprecated in C++11. Use ``std::unique_ptr``.
|
||||
|
||||
* Use ``CM_DISABLE_COPY(Class)`` to mark classes as non-copyable.
|
||||
|
||||
@ -58,3 +46,50 @@ need to be handled with care:
|
||||
When assigning the result of ``.size()`` on a container for example,
|
||||
the result should be assigned to ``size_t`` not to ``std::size_t``,
|
||||
``unsigned int`` or similar types.
|
||||
|
||||
Source Tree Layout
|
||||
==================
|
||||
|
||||
The CMake source tree is organized as follows.
|
||||
|
||||
* ``Auxiliary/``:
|
||||
Shell and editor integration files.
|
||||
|
||||
* ``Help/``:
|
||||
Documentation.
|
||||
|
||||
* ``Help/dev/``:
|
||||
Developer documentation.
|
||||
|
||||
* ``Help/release/dev/``:
|
||||
Release note snippets for development since last release.
|
||||
|
||||
* ``Licenses/``:
|
||||
License files for third-party libraries in binary distributions.
|
||||
|
||||
* ``Modules/``:
|
||||
CMake language modules installed with CMake.
|
||||
|
||||
* ``Packaging/``:
|
||||
Files used for packaging CMake itself for distribution.
|
||||
|
||||
* ``Source/``:
|
||||
Source code of CMake itself.
|
||||
|
||||
* ``Templates/``:
|
||||
Files distributed with CMake as implementation details for generators,
|
||||
packagers, etc.
|
||||
|
||||
* ``Tests/``:
|
||||
The test suite. See `Tests/README.rst`_.
|
||||
|
||||
* ``Utilities/``:
|
||||
Scripts, third-party source code.
|
||||
|
||||
* ``Utilities/Sphinx/``:
|
||||
Sphinx configuration to build CMake user documentation.
|
||||
|
||||
* ``Utilities/Release/``:
|
||||
Scripts used to package CMake itself for distribution on ``cmake.org``.
|
||||
|
||||
.. _`Tests/README.rst`: ../../Tests/README.rst
|
||||
|
11
Help/envvar/ASM_DIALECT.rst
Normal file
11
Help/envvar/ASM_DIALECT.rst
Normal file
@ -0,0 +1,11 @@
|
||||
ASM<DIALECT>
|
||||
------------
|
||||
|
||||
Preferred executable for compiling a specific dialect of assembly language
|
||||
files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM``, ``ASM_MASM`` or
|
||||
``ASM-ATT``. Will only be used by CMake on the first configuration to determine
|
||||
``ASM<DIALECT>`` compiler, after which the value for ``ASM<DIALECT>`` is stored
|
||||
in the cache as
|
||||
:variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`. For subsequent
|
||||
configuration runs, the environment variable will be ignored in favor of
|
||||
:variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`.
|
11
Help/envvar/ASM_DIALECTFLAGS.rst
Normal file
11
Help/envvar/ASM_DIALECTFLAGS.rst
Normal file
@ -0,0 +1,11 @@
|
||||
ASM<DIALECT>FLAGS
|
||||
-----------------
|
||||
|
||||
Default compilation flags to be used when compiling a specific dialect of an
|
||||
assembly language. ``ASM<DIALECT>FLAGS`` can be ``ASMFLAGS``, ``ASM_NASMFLAGS``,
|
||||
``ASM_MASMFLAGS`` or ``ASM-ATTFLAGS``. Will only be used by CMake on the
|
||||
first configuration to determine ``ASM<DIALECT>`` default compilation flags, after
|
||||
which the value for ``ASM<DIALECT>FLAGS`` is stored in the cache as
|
||||
:variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||
run (including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
9
Help/envvar/CC.rst
Normal file
9
Help/envvar/CC.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CC
|
||||
--
|
||||
|
||||
Preferred executable for compiling ``C`` language files. Will only be used by
|
||||
CMake on the first configuration to determine ``C`` compiler, after which the
|
||||
value for ``CC`` is stored in the cache as
|
||||
:variable:`CMAKE_C_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration run
|
||||
(including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_C_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/CFLAGS.rst
Normal file
9
Help/envvar/CFLAGS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CFLAGS
|
||||
------
|
||||
|
||||
Default compilation flags to be used when compiling ``C`` files. Will only be
|
||||
used by CMake on the first configuration to determine ``CC`` default compilation
|
||||
flags, after which the value for ``CFLAGS`` is stored in the cache
|
||||
as :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration run
|
||||
(including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
5
Help/envvar/CMAKE_CONFIG_TYPE.rst
Normal file
5
Help/envvar/CMAKE_CONFIG_TYPE.rst
Normal file
@ -0,0 +1,5 @@
|
||||
CMAKE_CONFIG_TYPE
|
||||
-----------------
|
||||
|
||||
The default build configuration for :ref:`Build Tool Mode` and
|
||||
``ctest`` build handler when there is no explicit configuration given.
|
8
Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
Normal file
8
Help/envvar/CMAKE_MSVCIDE_RUN_PATH.rst
Normal file
@ -0,0 +1,8 @@
|
||||
CMAKE_MSVCIDE_RUN_PATH
|
||||
----------------------
|
||||
|
||||
Extra PATH locations for custom commands when using
|
||||
:generator:`Visual Studio 9 2008` (or above) generators.
|
||||
|
||||
The ``CMAKE_MSVCIDE_RUN_PATH`` environment variable sets the default value for
|
||||
the :variable:`CMAKE_MSVCIDE_RUN_PATH` variable if not already explicitly set.
|
8
Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
Normal file
8
Help/envvar/CMAKE_OSX_ARCHITECTURES.rst
Normal file
@ -0,0 +1,8 @@
|
||||
CMAKE_OSX_ARCHITECTURES
|
||||
-----------------------
|
||||
|
||||
Target specific architectures for OS X.
|
||||
|
||||
The ``CMAKE_OSX_ARCHITECTURES`` environment variable sets the default value for
|
||||
the :variable:`CMAKE_OSX_ARCHITECTURES` variable. See
|
||||
:prop_tgt:`OSX_ARCHITECTURES` for more information.
|
9
Help/envvar/CSFLAGS.rst
Normal file
9
Help/envvar/CSFLAGS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CSFLAGS
|
||||
-------
|
||||
|
||||
Preferred executable for compiling ``CSharp`` language files. Will only be
|
||||
used by CMake on the first configuration to determine ``CSharp`` default
|
||||
compilation flags, after which the value for ``CSFLAGS`` is stored in the cache
|
||||
as :variable:`CMAKE_CSharp_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||
run (including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_CSharp_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
5
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
Normal file
5
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
Normal file
@ -0,0 +1,5 @@
|
||||
CTEST_INTERACTIVE_DEBUG_MODE
|
||||
----------------------------
|
||||
|
||||
Environment variable that will exist and be set to ``1`` when a test executed
|
||||
by CTest is run in interactive mode.
|
7
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
Normal file
7
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
Normal file
@ -0,0 +1,7 @@
|
||||
CTEST_OUTPUT_ON_FAILURE
|
||||
-----------------------
|
||||
|
||||
Boolean environment variable that controls if the output should be logged for
|
||||
failed tests. Set the value to 1, True, or ON to enable output on failure.
|
||||
See :manual:`ctest(1)` for more information on controlling output of failed
|
||||
tests.
|
5
Help/envvar/CTEST_PARALLEL_LEVEL.rst
Normal file
5
Help/envvar/CTEST_PARALLEL_LEVEL.rst
Normal file
@ -0,0 +1,5 @@
|
||||
CTEST_PARALLEL_LEVEL
|
||||
--------------------
|
||||
|
||||
Specify the number of tests for CTest to run in parallel. See :manual:`ctest(1)`
|
||||
for more information on parallel test execution.
|
4
Help/envvar/CTEST_USE_LAUNCHERS_DEFAULT.rst
Normal file
4
Help/envvar/CTEST_USE_LAUNCHERS_DEFAULT.rst
Normal file
@ -0,0 +1,4 @@
|
||||
CTEST_USE_LAUNCHERS_DEFAULT
|
||||
---------------------------
|
||||
|
||||
Initializes the :variable:`CTEST_USE_LAUNCHERS` variable if not already defined.
|
9
Help/envvar/CUDACXX.rst
Normal file
9
Help/envvar/CUDACXX.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CUDACXX
|
||||
-------
|
||||
|
||||
Preferred executable for compiling ``CUDA`` language files. Will only be used by
|
||||
CMake on the first configuration to determine ``CUDA`` compiler, after which the
|
||||
value for ``CUDA`` is stored in the cache as
|
||||
:variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration
|
||||
run (including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/CUDAFLAGS.rst
Normal file
9
Help/envvar/CUDAFLAGS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CUDAFLAGS
|
||||
---------
|
||||
|
||||
Default compilation flags to be used when compiling ``CUDA`` files. Will only be
|
||||
used by CMake on the first configuration to determine ``CUDA`` default
|
||||
compilation flags, after which the value for ``CUDAFLAGS`` is stored in the
|
||||
cache as :variable:`CMAKE_CUDA_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||
run (including the first), the environment variable will be ignored if
|
||||
the :variable:`CMAKE_CUDA_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
9
Help/envvar/CUDAHOSTCXX.rst
Normal file
9
Help/envvar/CUDAHOSTCXX.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CUDAHOSTCXX
|
||||
-----------
|
||||
|
||||
Preferred executable for compiling host code when compiling ``CUDA``
|
||||
language files. Will only be used by CMake on the first configuration to
|
||||
determine ``CUDA`` host compiler, after which the value for ``CUDAHOSTCXX`` is
|
||||
stored in the cache as :variable:`CMAKE_CUDA_HOST_COMPILER`. For any
|
||||
configuration run (including the first), the environment variable will be
|
||||
ignored if the :variable:`CMAKE_CUDA_HOST_COMPILER` variable is defined.
|
9
Help/envvar/CXX.rst
Normal file
9
Help/envvar/CXX.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CXX
|
||||
---
|
||||
|
||||
Preferred executable for compiling ``CXX`` language files. Will only be used by
|
||||
CMake on the first configuration to determine ``CXX`` compiler, after which the
|
||||
value for ``CXX`` is stored in the cache as
|
||||
:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration
|
||||
run (including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/CXXFLAGS.rst
Normal file
9
Help/envvar/CXXFLAGS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
CXXFLAGS
|
||||
--------
|
||||
|
||||
Default compilation flags to be used when compiling ``CXX`` (C++) files. Will
|
||||
only be used by CMake on the first configuration to determine ``CXX`` default
|
||||
compilation flags, after which the value for ``CXXFLAGS`` is stored in the cache
|
||||
as :variable:`CMAKE_CXX_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration run (
|
||||
including the first), the environment variable will be ignored if
|
||||
the :variable:`CMAKE_CXX_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
5
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
Normal file
5
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
Normal file
@ -0,0 +1,5 @@
|
||||
DASHBOARD_TEST_FROM_CTEST
|
||||
-------------------------
|
||||
|
||||
Environment variable that will exist when a test executed by CTest is run
|
||||
in non-interactive mode. The value will be equal to :variable:`CMAKE_VERSION`.
|
10
Help/envvar/FC.rst
Normal file
10
Help/envvar/FC.rst
Normal file
@ -0,0 +1,10 @@
|
||||
FC
|
||||
--
|
||||
|
||||
Preferred executable for compiling ``Fortran`` language files. Will only be used
|
||||
by CMake on the first configuration to determine ``Fortran`` compiler, after
|
||||
which the value for ``Fortran`` is stored in the cache as
|
||||
:variable:`CMAKE_Fortran_COMPILER <CMAKE_<LANG>_COMPILER>`. For any
|
||||
configuration run (including the first), the environment variable will be
|
||||
ignored if the :variable:`CMAKE_Fortran_COMPILER <CMAKE_<LANG>_COMPILER>`
|
||||
variable is defined.
|
9
Help/envvar/FFLAGS.rst
Normal file
9
Help/envvar/FFLAGS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
FFLAGS
|
||||
------
|
||||
|
||||
Default compilation flags to be used when compiling ``Fortran`` files. Will only
|
||||
be used by CMake on the first configuration to determine ``Fortran`` default
|
||||
compilation flags, after which the value for ``FFLAGS`` is stored in the cache
|
||||
as :variable:`CMAKE_Fortran_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration
|
||||
run (including the first), the environment variable will be ignored if
|
||||
the :variable:`CMAKE_Fortran_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
10
Help/envvar/LDFLAGS.rst
Normal file
10
Help/envvar/LDFLAGS.rst
Normal file
@ -0,0 +1,10 @@
|
||||
LDFLAGS
|
||||
-------
|
||||
|
||||
Will only be used by CMake on the first configuration to determine the default
|
||||
linker flags, after which the value for ``LDFLAGS`` is stored in the cache
|
||||
as :variable:`CMAKE_EXE_LINKER_FLAGS_INIT`,
|
||||
:variable:`CMAKE_SHARED_LINKER_FLAGS_INIT`, and
|
||||
:variable:`CMAKE_MODULE_LINKER_FLAGS_INIT`. For any configuration run
|
||||
(including the first), the environment variable will be ignored if the
|
||||
equivalent ``CMAKE_<TYPE>_LINKER_FLAGS_INIT`` variable is defined.
|
8
Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
Normal file
8
Help/envvar/MACOSX_DEPLOYMENT_TARGET.rst
Normal file
@ -0,0 +1,8 @@
|
||||
MACOSX_DEPLOYMENT_TARGET
|
||||
------------------------
|
||||
|
||||
Specify the minimum version of OS X on which the target binaries are
|
||||
to be deployed.
|
||||
|
||||
The ``MACOSX_DEPLOYMENT_TARGET`` environment variable sets the default value for
|
||||
the :variable:`CMAKE_OSX_DEPLOYMENT_TARGET` variable.
|
9
Help/envvar/RC.rst
Normal file
9
Help/envvar/RC.rst
Normal file
@ -0,0 +1,9 @@
|
||||
RC
|
||||
--
|
||||
|
||||
Preferred executable for compiling ``resource`` files. Will only be used by CMake
|
||||
on the first configuration to determine ``resource`` compiler, after which the
|
||||
value for ``RC`` is stored in the cache as
|
||||
:variable:`CMAKE_RC_COMPILER <CMAKE_<LANG>_COMPILER>`. For any configuration run
|
||||
(including the first), the environment variable will be ignored if the
|
||||
:variable:`CMAKE_RC_COMPILER <CMAKE_<LANG>_COMPILER>` variable is defined.
|
9
Help/envvar/RCFLAGS.rst
Normal file
9
Help/envvar/RCFLAGS.rst
Normal file
@ -0,0 +1,9 @@
|
||||
RCFLAGS
|
||||
-------
|
||||
|
||||
Default compilation flags to be used when compiling ``resource`` files. Will
|
||||
only be used by CMake on the first configuration to determine ``resource``
|
||||
default compilation flags, after which the value for ``RCFLAGS`` is stored in
|
||||
the cache as :variable:`CMAKE_RC_FLAGS <CMAKE_<LANG>_FLAGS>`. For any
|
||||
configuration run (including the first), the environment variable will be ignored
|
||||
if the :variable:`CMAKE_RC_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined.
|
@ -6,7 +6,11 @@ Generates CodeBlocks project files.
|
||||
Project files for CodeBlocks will be created in the top directory and
|
||||
in every subdirectory which features a CMakeLists.txt file containing
|
||||
a PROJECT() call. Additionally a hierarchy of makefiles is generated
|
||||
into the build tree. The appropriate make program can build the
|
||||
into the build tree.
|
||||
The :variable:`CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` variable may
|
||||
be set to ``ON`` to exclude any files which are located outside of
|
||||
the project root directory.
|
||||
The appropriate make program can build the
|
||||
project through the default make target. A "make install" target is
|
||||
also provided.
|
||||
|
||||
|
@ -40,6 +40,7 @@ Reference Manuals
|
||||
/manual/cmake-qt.7
|
||||
/manual/cmake-toolchains.7
|
||||
/manual/cmake-variables.7
|
||||
/manual/cmake-env-variables.7
|
||||
|
||||
.. only:: html or text
|
||||
|
||||
|
@ -266,7 +266,7 @@ The :command:`target_link_libraries` command has ``PRIVATE``,
|
||||
|
||||
Because ``archive`` is a ``PUBLIC`` dependency of ``archiveExtras``, the
|
||||
usage requirements of it are propagated to ``consumer`` too. Because
|
||||
``serialization`` is a ``PRIVATE`` dependency of ``archive``, the usage
|
||||
``serialization`` is a ``PRIVATE`` dependency of ``archiveExtras``, the usage
|
||||
requirements of it are not propagated to ``consumer``.
|
||||
|
||||
Generally, a dependency should be specified in a use of
|
||||
@ -687,7 +687,8 @@ property are treated as ``SYSTEM`` include directories, as if they were
|
||||
listed in the :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` of the
|
||||
dependency. This can result in omission of compiler warnings for headers
|
||||
found in those directories. This behavior for :ref:`imported targets` may
|
||||
be controlled with the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target property.
|
||||
be controlled by setting the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target
|
||||
property on the *consumers* of imported targets.
|
||||
|
||||
If a binary target is linked transitively to a Mac OX framework, the
|
||||
``Headers`` directory of the framework is also treated as a usage requirement.
|
||||
@ -970,7 +971,6 @@ are:
|
||||
* ``EXPORT_NAME``
|
||||
* ``IMPORTED``
|
||||
* ``NAME``
|
||||
* ``NO_SYSTEM_FROM_IMPORTED``
|
||||
* Properties matching ``IMPORTED_LIBNAME_*``
|
||||
* Properties matching ``MAP_IMPORTED_CONFIG_*``
|
||||
|
||||
|
@ -44,6 +44,7 @@ These commands are always available.
|
||||
/command/get_property
|
||||
/command/if
|
||||
/command/include
|
||||
/command/include_guard
|
||||
/command/list
|
||||
/command/macro
|
||||
/command/mark_as_advanced
|
||||
|
54
Help/manual/cmake-env-variables.7.rst
Normal file
54
Help/manual/cmake-env-variables.7.rst
Normal file
@ -0,0 +1,54 @@
|
||||
.. cmake-manual-description: CMake Environment Variables Reference
|
||||
|
||||
cmake-env-variables(7)
|
||||
**********************
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
|
||||
Environment Variables that Control the Build
|
||||
============================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/envvar/CMAKE_CONFIG_TYPE
|
||||
/envvar/CMAKE_MSVCIDE_RUN_PATH
|
||||
/envvar/CMAKE_OSX_ARCHITECTURES
|
||||
/envvar/LDFLAGS
|
||||
/envvar/MACOSX_DEPLOYMENT_TARGET
|
||||
|
||||
Environment Variables for Languages
|
||||
===================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/envvar/ASM_DIALECT
|
||||
/envvar/ASM_DIALECTFLAGS
|
||||
/envvar/CC
|
||||
/envvar/CFLAGS
|
||||
/envvar/CSFLAGS
|
||||
/envvar/CUDACXX
|
||||
/envvar/CUDAFLAGS
|
||||
/envvar/CUDAHOSTCXX
|
||||
/envvar/CXX
|
||||
/envvar/CXXFLAGS
|
||||
/envvar/FC
|
||||
/envvar/FFLAGS
|
||||
/envvar/RC
|
||||
/envvar/RCFLAGS
|
||||
|
||||
Environment Variables for CTest
|
||||
===============================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/envvar/CMAKE_CONFIG_TYPE
|
||||
/envvar/CTEST_INTERACTIVE_DEBUG_MODE
|
||||
/envvar/CTEST_OUTPUT_ON_FAILURE
|
||||
/envvar/CTEST_PARALLEL_LEVEL
|
||||
/envvar/CTEST_USE_LAUNCHERS_DEFAULT
|
||||
/envvar/DASHBOARD_TEST_FROM_CTEST
|
@ -183,18 +183,18 @@ same length:
|
||||
|
||||
.. productionlist::
|
||||
bracket_argument: `bracket_open` `bracket_content` `bracket_close`
|
||||
bracket_open: '[' '='{len} '['
|
||||
bracket_content: <any text not containing a `bracket_close`
|
||||
: of the same {len} as the `bracket_open`>
|
||||
bracket_close: ']' '='{len} ']'
|
||||
bracket_open: '[' '='* '['
|
||||
bracket_content: <any text not containing a `bracket_close` with
|
||||
: the same number of '=' as the `bracket_open`>
|
||||
bracket_close: ']' '='* ']'
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\end{small}
|
||||
|
||||
An opening bracket of length *len >= 0* is written ``[`` followed
|
||||
by *len* ``=`` followed by ``[`` and the corresponding closing
|
||||
bracket is written ``]`` followed by *len* ``=`` followed by ``]``.
|
||||
An opening bracket is written ``[`` followed by zero or more ``=`` followed
|
||||
by ``[``. The corresponding closing bracket is written ``]`` followed
|
||||
by the same number of ``=`` followed by ``]``.
|
||||
Brackets do not nest. A unique length may always be chosen
|
||||
for the opening and closing brackets to contain closing brackets
|
||||
of other lengths.
|
||||
@ -334,6 +334,8 @@ For example:
|
||||
beginning of an unquoted argument, and are treated as part of the
|
||||
content. For example, the unquoted arguments ``-Da="b c"``,
|
||||
``-Da=$(v)``, and ``a" "b"c"d`` are each interpreted literally.
|
||||
They may instead be written as quoted arguments ``"-Da=\"b c\""``,
|
||||
``"-Da=$(v)"``, and ``"a\" \"b\"c\"d"``, respectively.
|
||||
|
||||
Make-style references are treated literally as part of the content
|
||||
and do not undergo variable expansion. They are treated as part
|
||||
@ -514,7 +516,7 @@ Function Scope
|
||||
create commands that, when invoked, process the recorded commands
|
||||
in a new variable binding scope. A variable "set" or "unset"
|
||||
binds in this scope and is visible for the current function and
|
||||
any nested calls, but not after the function returns.
|
||||
any nested calls within it, but not after the function returns.
|
||||
|
||||
Directory Scope
|
||||
Each of the `Directories`_ in a source tree has its own variable
|
||||
|
@ -60,6 +60,7 @@ All Modules
|
||||
/module/CPackCygwin
|
||||
/module/CPackDeb
|
||||
/module/CPackDMG
|
||||
/module/CPackFreeBSD
|
||||
/module/CPackIFW
|
||||
/module/CPackIFWConfigureFile
|
||||
/module/CPackNSIS
|
||||
@ -152,6 +153,7 @@ All Modules
|
||||
/module/FindMPEG2
|
||||
/module/FindMPEG
|
||||
/module/FindMPI
|
||||
/module/FindOpenACC
|
||||
/module/FindOpenAL
|
||||
/module/FindOpenCL
|
||||
/module/FindOpenGL
|
||||
@ -181,6 +183,7 @@ All Modules
|
||||
/module/FindosgWidget
|
||||
/module/FindPackageHandleStandardArgs
|
||||
/module/FindPackageMessage
|
||||
/module/FindPatch
|
||||
/module/FindPerlLibs
|
||||
/module/FindPerl
|
||||
/module/FindPHP4
|
||||
|
@ -51,6 +51,15 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
|
||||
to determine whether to report an error on use of deprecated macros or
|
||||
functions.
|
||||
|
||||
Policies Introduced by CMake 3.10
|
||||
=================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
CMP0071: Let AUTOMOC and AUTOUIC process GENERATED files. </policy/CMP0071>
|
||||
CMP0070: Define file(GENERATE) behavior for relative paths. </policy/CMP0070>
|
||||
|
||||
Policies Introduced by CMake 3.9
|
||||
================================
|
||||
|
||||
|
@ -74,6 +74,7 @@ Properties on Directories
|
||||
/prop_dir/INCLUDE_REGULAR_EXPRESSION
|
||||
/prop_dir/INTERPROCEDURAL_OPTIMIZATION_CONFIG
|
||||
/prop_dir/INTERPROCEDURAL_OPTIMIZATION
|
||||
/prop_dir/LABELS
|
||||
/prop_dir/LINK_DIRECTORIES
|
||||
/prop_dir/LISTFILE_STACK
|
||||
/prop_dir/MACROS
|
||||
@ -83,7 +84,7 @@ Properties on Directories
|
||||
/prop_dir/RULE_LAUNCH_LINK
|
||||
/prop_dir/SOURCE_DIR
|
||||
/prop_dir/SUBDIRECTORIES
|
||||
/prop_dir/TEST_INCLUDE_FILE
|
||||
/prop_dir/TEST_INCLUDE_FILES
|
||||
/prop_dir/VARIABLES
|
||||
/prop_dir/VS_GLOBAL_SECTION_POST_section
|
||||
/prop_dir/VS_GLOBAL_SECTION_PRE_section
|
||||
@ -121,7 +122,9 @@ Properties on Targets
|
||||
/prop_tgt/ARCHIVE_OUTPUT_NAME
|
||||
/prop_tgt/AUTOGEN_BUILD_DIR
|
||||
/prop_tgt/AUTOGEN_TARGET_DEPENDS
|
||||
/prop_tgt/AUTOMOC_COMPILER_PREDEFINES
|
||||
/prop_tgt/AUTOMOC_DEPEND_FILTERS
|
||||
/prop_tgt/AUTOMOC_MACRO_NAMES
|
||||
/prop_tgt/AUTOMOC_MOC_OPTIONS
|
||||
/prop_tgt/AUTOMOC
|
||||
/prop_tgt/AUTOUIC
|
||||
@ -225,6 +228,7 @@ Properties on Targets
|
||||
/prop_tgt/LABELS
|
||||
/prop_tgt/LANG_CLANG_TIDY
|
||||
/prop_tgt/LANG_COMPILER_LAUNCHER
|
||||
/prop_tgt/LANG_CPPCHECK
|
||||
/prop_tgt/LANG_CPPLINT
|
||||
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
|
||||
/prop_tgt/LANG_VISIBILITY_PRESET
|
||||
@ -291,6 +295,7 @@ Properties on Targets
|
||||
/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY
|
||||
/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION
|
||||
/prop_tgt/VS_DOTNET_REFERENCE_refname
|
||||
/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname
|
||||
/prop_tgt/VS_DOTNET_REFERENCES
|
||||
/prop_tgt/VS_DOTNET_REFERENCES_COPY_LOCAL
|
||||
/prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||
@ -388,7 +393,9 @@ Properties on Source Files
|
||||
/prop_sf/VS_SHADER_ENTRYPOINT
|
||||
/prop_sf/VS_SHADER_FLAGS
|
||||
/prop_sf/VS_SHADER_MODEL
|
||||
/prop_sf/VS_SHADER_OUTPUT_HEADER_FILE
|
||||
/prop_sf/VS_SHADER_TYPE
|
||||
/prop_sf/VS_SHADER_VARIABLE_NAME
|
||||
/prop_sf/VS_TOOL_OVERRIDE.rst
|
||||
/prop_sf/VS_XAML_TYPE
|
||||
/prop_sf/WRAP_EXCLUDE
|
||||
@ -434,6 +441,7 @@ Deprecated Properties on Directories
|
||||
:maxdepth: 1
|
||||
|
||||
/prop_dir/COMPILE_DEFINITIONS_CONFIG
|
||||
/prop_dir/TEST_INCLUDE_FILE
|
||||
|
||||
|
||||
Deprecated Properties on Targets
|
||||
|
@ -59,9 +59,10 @@ The :prop_tgt:`AUTOMOC` target property controls whether :manual:`cmake(1)`
|
||||
inspects the C++ files in the target to determine if they require ``moc`` to
|
||||
be run, and to create rules to execute ``moc`` at the appropriate time.
|
||||
|
||||
If a ``Q_OBJECT`` or ``Q_GADGET`` macro is found in a header file, ``moc``
|
||||
will be run on the file. The result will be put into a file named according
|
||||
to ``moc_<basename>.cpp``. If the macro is found in a C++ implementation
|
||||
If a macro from :prop_tgt:`AUTOMOC_MACRO_NAMES` is found in a header file,
|
||||
``moc`` will be run on the file. The result will be put into a file named
|
||||
according to ``moc_<basename>.cpp``.
|
||||
If the macro is found in a C++ implementation
|
||||
file, the moc output will be put into a file named according to
|
||||
``<basename>.moc``, following the Qt conventions. The ``<basename>.moc`` must
|
||||
be included by the user in the C++ implementation file with a preprocessor
|
||||
@ -72,6 +73,10 @@ Included ``moc_*.cpp`` and ``*.moc`` files will be generated in the
|
||||
automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
|
||||
|
||||
* This differs from CMake 3.7 and below; see their documentation for details.
|
||||
|
||||
* For :prop_gbl:`multi configuration generators <GENERATOR_IS_MULTI_CONFIG>`,
|
||||
the include directory is ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.
|
||||
|
||||
* See :prop_tgt:`AUTOGEN_BUILD_DIR`.
|
||||
|
||||
Not included ``moc_<basename>.cpp`` files will be generated in custom
|
||||
@ -91,6 +96,8 @@ following targets by setting the :variable:`CMAKE_AUTOMOC` variable. The
|
||||
options to pass to ``moc``. The :variable:`CMAKE_AUTOMOC_MOC_OPTIONS`
|
||||
variable may be populated to pre-set the options for all following targets.
|
||||
|
||||
Additional macro names to search for can be added to :prop_tgt:`AUTOMOC_MACRO_NAMES`.
|
||||
|
||||
Additional ``moc`` dependency file names can be extracted from source code
|
||||
by using :prop_tgt:`AUTOMOC_DEPEND_FILTERS`.
|
||||
|
||||
@ -124,6 +131,10 @@ The generated generated ``ui_*.h`` files are placed in the
|
||||
automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
|
||||
|
||||
* This differs from CMake 3.7 and below; see their documentation for details.
|
||||
|
||||
* For :prop_gbl:`multi configuration generators <GENERATOR_IS_MULTI_CONFIG>`,
|
||||
the include directory is ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.
|
||||
|
||||
* See :prop_tgt:`AUTOGEN_BUILD_DIR`.
|
||||
|
||||
The :prop_tgt:`AUTOUIC` target property may be pre-set for all following
|
||||
@ -202,6 +213,24 @@ overrides options from the :prop_tgt:`AUTORCC_OPTIONS` target property.
|
||||
Source files can be excluded from :prop_tgt:`AUTORCC` processing by
|
||||
enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`.
|
||||
|
||||
Visual Studio Generators
|
||||
========================
|
||||
|
||||
When using the :manual:`Visual Studio generators <cmake-generators(7)>`
|
||||
CMake tries to use a ``PRE_BUILD``
|
||||
:command:`custom command <add_custom_command>` instead
|
||||
of a :command:`custom target <add_custom_target>` for autogen.
|
||||
``PRE_BUILD`` can't be used when the autogen target depends on files.
|
||||
This happens when
|
||||
|
||||
- :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` is enabled and the origin target
|
||||
depends on :prop_sf:`GENERATED` files which aren't excluded from autogen by
|
||||
:prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTOGEN`
|
||||
or :policy:`CMP0071`
|
||||
- :prop_tgt:`AUTORCC` is enabled and a ``.qrc`` file is listed in
|
||||
the origin target sources
|
||||
- :prop_tgt:`AUTOGEN_TARGET_DEPENDS` lists a source file
|
||||
|
||||
qtmain.lib on Windows
|
||||
=====================
|
||||
|
||||
|
@ -254,6 +254,11 @@ versions supported by the cmake server. These are JSON objects with "major" and
|
||||
as experimental. These will contain the "isExperimental" key set to true. Enabling
|
||||
these requires a special command line argument when starting the cmake server mode.
|
||||
|
||||
Within a "major" version all "minor" versions are fully backwards compatible.
|
||||
New "minor" versions may introduce functionality in such a way that existing
|
||||
clients of the same "major" version will continue to work, provided they
|
||||
ignore keys in the output that they do not know about.
|
||||
|
||||
Example::
|
||||
|
||||
[== "CMake Server" ==[
|
||||
@ -268,8 +273,13 @@ The first request that the client may send to the server is of type "handshake".
|
||||
|
||||
This request needs to pass one of the "supportedProtocolVersions" of the "hello"
|
||||
type response received earlier back to the server in the "protocolVersion" field.
|
||||
Giving the "major" version of the requested protocol version will make the server
|
||||
use the latest minor version of that protocol. Use this if you do not explicitly
|
||||
need to depend on a specific minor version.
|
||||
|
||||
Each protocol version may request additional attributes to be present.
|
||||
If the build directory already contains a CMake cache, it is sufficient to set
|
||||
the "buildDirectory" attribute. To create a fresh build directory, additional
|
||||
attributes are required depending on the protocol version.
|
||||
|
||||
Protocol version 1.0 requires the following attributes to be set:
|
||||
|
||||
@ -616,8 +626,7 @@ and will not survive the build directory getting cleaned out.
|
||||
Type "cache"
|
||||
^^^^^^^^^^^^
|
||||
|
||||
The "cache" request can be used once a project is configured and will
|
||||
list the cached configuration values.
|
||||
The "cache" request will list the cached configuration values.
|
||||
|
||||
Example::
|
||||
|
||||
|
@ -32,6 +32,7 @@ Variables that Provide Information
|
||||
/variable/CMAKE_CURRENT_LIST_FILE
|
||||
/variable/CMAKE_CURRENT_LIST_LINE
|
||||
/variable/CMAKE_CURRENT_SOURCE_DIR
|
||||
/variable/CMAKE_DIRECTORY_LABELS
|
||||
/variable/CMAKE_DL_LIBS
|
||||
/variable/CMAKE_EDIT_COMMAND
|
||||
/variable/CMAKE_EXECUTABLE_SUFFIX
|
||||
@ -120,6 +121,7 @@ Variables that Change Behavior
|
||||
/variable/CMAKE_AUTOMOC_RELAXED_MODE
|
||||
/variable/CMAKE_BACKWARDS_COMPATIBILITY
|
||||
/variable/CMAKE_BUILD_TYPE
|
||||
/variable/CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
|
||||
/variable/CMAKE_CODELITE_USE_TARGETS
|
||||
/variable/CMAKE_COLOR_MAKEFILE
|
||||
/variable/CMAKE_CONFIGURATION_TYPES
|
||||
@ -268,7 +270,9 @@ Variables that Control the Build
|
||||
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
||||
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
||||
/variable/CMAKE_AUTOMOC
|
||||
/variable/CMAKE_AUTOMOC_COMPILER_PREDEFINES
|
||||
/variable/CMAKE_AUTOMOC_DEPEND_FILTERS
|
||||
/variable/CMAKE_AUTOMOC_MACRO_NAMES
|
||||
/variable/CMAKE_AUTOMOC_MOC_OPTIONS
|
||||
/variable/CMAKE_AUTORCC
|
||||
/variable/CMAKE_AUTORCC_OPTIONS
|
||||
@ -300,6 +304,7 @@ Variables that Control the Build
|
||||
/variable/CMAKE_IOS_INSTALL_COMBINED
|
||||
/variable/CMAKE_LANG_CLANG_TIDY
|
||||
/variable/CMAKE_LANG_COMPILER_LAUNCHER
|
||||
/variable/CMAKE_LANG_CPPCHECK
|
||||
/variable/CMAKE_LANG_CPPLINT
|
||||
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
|
||||
/variable/CMAKE_LANG_VISIBILITY_PRESET
|
||||
@ -319,6 +324,7 @@ Variables that Control the Build
|
||||
/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG
|
||||
/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG_INIT
|
||||
/variable/CMAKE_MODULE_LINKER_FLAGS_INIT
|
||||
/variable/CMAKE_MSVCIDE_RUN_PATH
|
||||
/variable/CMAKE_NINJA_OUTPUT_PATH_PREFIX
|
||||
/variable/CMAKE_NO_BUILTIN_CHRPATH
|
||||
/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED
|
||||
@ -362,6 +368,7 @@ Variables for Languages
|
||||
/variable/CMAKE_COMPILER_IS_GNUCC
|
||||
/variable/CMAKE_COMPILER_IS_GNUCXX
|
||||
/variable/CMAKE_COMPILER_IS_GNUG77
|
||||
/variable/CMAKE_CUDA_HOST_COMPILER
|
||||
/variable/CMAKE_CUDA_EXTENSIONS
|
||||
/variable/CMAKE_CUDA_STANDARD
|
||||
/variable/CMAKE_CUDA_STANDARD_REQUIRED
|
||||
@ -386,11 +393,14 @@ Variables for Languages
|
||||
/variable/CMAKE_LANG_ARCHIVE_FINISH
|
||||
/variable/CMAKE_LANG_COMPILER
|
||||
/variable/CMAKE_LANG_COMPILER_ABI
|
||||
/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID
|
||||
/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN
|
||||
/variable/CMAKE_LANG_COMPILER_ID
|
||||
/variable/CMAKE_LANG_COMPILER_LOADED
|
||||
/variable/CMAKE_LANG_COMPILER_PREDEFINES_COMMAND
|
||||
/variable/CMAKE_LANG_COMPILER_TARGET
|
||||
/variable/CMAKE_LANG_COMPILER_VERSION
|
||||
/variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL
|
||||
/variable/CMAKE_LANG_COMPILE_OBJECT
|
||||
/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY
|
||||
/variable/CMAKE_LANG_CREATE_SHARED_MODULE
|
||||
@ -480,6 +490,7 @@ Variables for CTest
|
||||
/variable/CTEST_GIT_UPDATE_OPTIONS
|
||||
/variable/CTEST_HG_COMMAND
|
||||
/variable/CTEST_HG_UPDATE_OPTIONS
|
||||
/variable/CTEST_LABELS_FOR_SUBPROJECTS
|
||||
/variable/CTEST_MEMORYCHECK_COMMAND
|
||||
/variable/CTEST_MEMORYCHECK_COMMAND_OPTIONS
|
||||
/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS
|
||||
|
@ -69,11 +69,11 @@ Options
|
||||
See `Find-Package Tool Mode`_.
|
||||
|
||||
``--graphviz=[file]``
|
||||
Generate graphviz of dependencies, see CMakeGraphVizOptions.cmake for more.
|
||||
Generate graphviz of dependencies, see :module:`CMakeGraphVizOptions` for more.
|
||||
|
||||
Generate a graphviz input file that will contain all the library and
|
||||
executable dependencies in the project. See the documentation for
|
||||
CMakeGraphVizOptions.cmake for more details.
|
||||
:module:`CMakeGraphVizOptions` for more details.
|
||||
|
||||
``--system-information [file]``
|
||||
Dump information about this system.
|
||||
@ -138,6 +138,8 @@ Options
|
||||
|
||||
.. include:: OPTIONS_HELP.txt
|
||||
|
||||
.. _`Build Tool Mode`:
|
||||
|
||||
Build Tool Mode
|
||||
===============
|
||||
|
||||
@ -262,6 +264,36 @@ Available commands are:
|
||||
351abe79cd3800b38cdfb25d45015a15 file1.txt
|
||||
052f86c15bbde68af55c7f7b340ab639 file2.txt
|
||||
|
||||
``sha1sum <file>...``
|
||||
Create SHA1 checksum of files in ``sha1sum`` compatible format::
|
||||
|
||||
4bb7932a29e6f73c97bb9272f2bdc393122f86e0 file1.txt
|
||||
1df4c8f318665f9a5f2ed38f55adadb7ef9f559c file2.txt
|
||||
|
||||
``sha224sum <file>...``
|
||||
Create SHA224 checksum of files in ``sha224sum`` compatible format::
|
||||
|
||||
b9b9346bc8437bbda630b0b7ddfc5ea9ca157546dbbf4c613192f930 file1.txt
|
||||
6dfbe55f4d2edc5fe5c9197bca51ceaaf824e48eba0cc453088aee24 file2.txt
|
||||
|
||||
``sha256sum <file>...``
|
||||
Create SHA256 checksum of files in ``sha256sum`` compatible format::
|
||||
|
||||
76713b23615d31680afeb0e9efe94d47d3d4229191198bb46d7485f9cb191acc file1.txt
|
||||
15b682ead6c12dedb1baf91231e1e89cfc7974b3787c1e2e01b986bffadae0ea file2.txt
|
||||
|
||||
``sha384sum <file>...``
|
||||
Create SHA384 checksum of files in ``sha384sum`` compatible format::
|
||||
|
||||
acc049fedc091a22f5f2ce39a43b9057fd93c910e9afd76a6411a28a8f2b8a12c73d7129e292f94fc0329c309df49434 file1.txt
|
||||
668ddeb108710d271ee21c0f3acbd6a7517e2b78f9181c6a2ff3b8943af92b0195dcb7cce48aa3e17893173c0a39e23d file2.txt
|
||||
|
||||
``sha512sum <file>...``
|
||||
Create SHA512 checksum of files in ``sha512sum`` compatible format::
|
||||
|
||||
2a78d7a6c5328cfb1467c63beac8ff21794213901eaadafd48e7800289afbc08e5fb3e86aa31116c945ee3d7bf2a6194489ec6101051083d1108defc8e1dba89 file1.txt
|
||||
7a0b54896fe5e70cca6dd643ad6f672614b189bf26f8153061c4d219474b05dad08c4e729af9f4b009f1a1a280cb625454bf587c690f4617c27e3aebdf3b7a2d file2.txt
|
||||
|
||||
``remove [-f] <file>...``
|
||||
Remove the file(s). If any of the listed files already do not
|
||||
exist, the command returns a non-zero exit code, but no message
|
||||
|
@ -250,6 +250,13 @@ Options
|
||||
label associated with the tests run. If there are no labels on the
|
||||
tests, nothing extra is printed.
|
||||
|
||||
``--no-subproject-summary``
|
||||
Disable timing summary information for subprojects.
|
||||
|
||||
This option tells ctest not to print summary information for each
|
||||
subproject associated with the tests run. If there are no subprojects on the
|
||||
tests, nothing extra is printed.
|
||||
|
||||
``--build-and-test <path-to-source> <path-to-build>``
|
||||
Configure, build and run a test.
|
||||
|
||||
@ -758,6 +765,15 @@ Configuration settings include:
|
||||
* :module:`CTest` module variable: :variable:`CMAKE_COMMAND`
|
||||
followed by :variable:`PROJECT_SOURCE_DIR`
|
||||
|
||||
``LabelsForSubprojects``
|
||||
Specify a semicolon-separated list of labels that will be treated as
|
||||
subprojects. This mapping will be passed on to CDash when configure, test or
|
||||
build results are submitted.
|
||||
|
||||
* `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS`
|
||||
* :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS``
|
||||
|
||||
|
||||
.. _`CTest Build Step`:
|
||||
|
||||
CTest Build Step
|
||||
@ -780,6 +796,14 @@ Configuration settings include:
|
||||
* :module:`CTest` module variable: ``DEFAULT_CTEST_CONFIGURATION_TYPE``,
|
||||
initialized by the ``CMAKE_CONFIG_TYPE`` environment variable
|
||||
|
||||
``LabelsForSubprojects``
|
||||
Specify a semicolon-separated list of labels that will be treated as
|
||||
subprojects. This mapping will be passed on to CDash when configure, test or
|
||||
build results are submitted.
|
||||
|
||||
* `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS`
|
||||
* :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS``
|
||||
|
||||
``MakeCommand``
|
||||
Command-line to launch the software build process.
|
||||
It will be executed in the location specified by the
|
||||
@ -815,6 +839,15 @@ Arguments to the command may specify some of the step settings.
|
||||
|
||||
Configuration settings include:
|
||||
|
||||
``LabelsForSubprojects``
|
||||
Specify a semicolon-separated list of labels that will be treated as
|
||||
subprojects. This mapping will be passed on to CDash when configure, test or
|
||||
build results are submitted.
|
||||
|
||||
* `CTest Script`_ variable: :variable:`CTEST_LABELS_FOR_SUBPROJECTS`
|
||||
* :module:`CTest` module variable: ``CTEST_LABELS_FOR_SUBPROJECTS``
|
||||
|
||||
|
||||
``TestLoad``
|
||||
While running tests in parallel (e.g. with ``-j``), try not to start
|
||||
tests when they may cause the CPU load to pass above a given threshold.
|
||||
@ -853,6 +886,8 @@ Configuration settings include:
|
||||
* `CTest Script`_ variable: :variable:`CTEST_COVERAGE_EXTRA_FLAGS`
|
||||
* :module:`CTest` module variable: ``COVERAGE_EXTRA_FLAGS``
|
||||
|
||||
These options are the first arguments passed to ``CoverageCommand``.
|
||||
|
||||
.. _`CTest MemCheck Step`:
|
||||
|
||||
CTest MemCheck Step
|
||||
|
1
Help/module/CPackFreeBSD.rst
Normal file
1
Help/module/CPackFreeBSD.rst
Normal file
@ -0,0 +1 @@
|
||||
.. cmake-module:: ../../Modules/CPackFreeBSD.cmake
|
1
Help/module/FindOpenACC.rst
Normal file
1
Help/module/FindOpenACC.rst
Normal file
@ -0,0 +1 @@
|
||||
.. cmake-module:: ../../Modules/FindOpenACC.cmake
|
1
Help/module/FindPatch.rst
Normal file
1
Help/module/FindPatch.rst
Normal file
@ -0,0 +1 @@
|
||||
.. cmake-module:: ../../Modules/FindPatch.cmake
|
@ -2,7 +2,7 @@ CMP0040
|
||||
-------
|
||||
|
||||
The target in the ``TARGET`` signature of :command:`add_custom_command`
|
||||
must exist and must be defined in current directory.
|
||||
must exist and must be defined in the current directory.
|
||||
|
||||
CMake 2.8.12 and lower silently ignored a custom command created with
|
||||
the ``TARGET`` signature of :command:`add_custom_command`
|
||||
|
25
Help/policy/CMP0070.rst
Normal file
25
Help/policy/CMP0070.rst
Normal file
@ -0,0 +1,25 @@
|
||||
CMP0070
|
||||
-------
|
||||
|
||||
Define :command:`file(GENERATE)` behavior for relative paths.
|
||||
|
||||
CMake 3.10 and newer define that relative paths given to ``INPUT`` and
|
||||
``OUTPUT`` arguments of ``file(GENERATE)`` are interpreted relative to the
|
||||
current source and binary directories, respectively. CMake 3.9 and lower did
|
||||
not define any behavior for relative paths but did not diagnose them either
|
||||
and accidentally treated them relative to the process working directory.
|
||||
Policy ``CMP0070`` provides compatibility with projects that used the old
|
||||
undefined behavior.
|
||||
|
||||
This policy affects behavior of relative paths given to ``file(GENERATE)``.
|
||||
The ``OLD`` behavior for this policy is to treat the paths relative to the
|
||||
working directory of CMake. The ``NEW`` behavior for this policy is to
|
||||
interpret relative paths with respect to the current source or binary
|
||||
directory of the caller.
|
||||
|
||||
This policy was introduced in CMake version 3.10. CMake version
|
||||
|release| warns when the policy is not set and uses ``OLD`` behavior.
|
||||
Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
|
||||
explicitly.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
42
Help/policy/CMP0071.rst
Normal file
42
Help/policy/CMP0071.rst
Normal file
@ -0,0 +1,42 @@
|
||||
CMP0071
|
||||
-------
|
||||
|
||||
Let :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` process
|
||||
:prop_sf:`GENERATED` files.
|
||||
|
||||
Since version 3.10, CMake processes **regular** and :prop_sf:`GENERATED`
|
||||
source files in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
|
||||
In earlier CMake versions, only **regular** source files were processed.
|
||||
:prop_sf:`GENERATED` source files were ignored silently.
|
||||
|
||||
This policy affects how source files that are :prop_sf:`GENERATED`
|
||||
get treated in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
|
||||
|
||||
The ``OLD`` behavior for this policy is to ignore :prop_sf:`GENERATED`
|
||||
source files in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC`.
|
||||
|
||||
The ``NEW`` behavior for this policy is to process :prop_sf:`GENERATED`
|
||||
source files in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` just like regular
|
||||
source files.
|
||||
|
||||
.. note::
|
||||
|
||||
To silence the CMP0071 warning source files can be excluded from
|
||||
:prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` processing by setting the
|
||||
source file properties :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC` or
|
||||
:prop_sf:`SKIP_AUTOGEN`.
|
||||
|
||||
Source skip example::
|
||||
|
||||
# ...
|
||||
set_property(SOURCE /path/to/file1.h PROPERTY SKIP_AUTOMOC ON)
|
||||
set_property(SOURCE /path/to/file2.h PROPERTY SKIP_AUTOUIC ON)
|
||||
set_property(SOURCE /path/to/file3.h PROPERTY SKIP_AUTOGEN ON)
|
||||
# ...
|
||||
|
||||
This policy was introduced in CMake version 3.10. CMake version
|
||||
|release| warns when the policy is not set and uses ``OLD`` behavior.
|
||||
Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
|
||||
explicitly.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
13
Help/prop_dir/LABELS.rst
Normal file
13
Help/prop_dir/LABELS.rst
Normal file
@ -0,0 +1,13 @@
|
||||
LABELS
|
||||
------
|
||||
|
||||
Specify a list of text labels associated with a directory and all of its
|
||||
subdirectories. This is equivalent to setting the :prop_tgt:`LABELS` target
|
||||
property and the :prop_test:`LABELS` test property on all targets and tests in
|
||||
the current directory and subdirectories. Note: Launchers must enabled to
|
||||
propagate labels to targets.
|
||||
|
||||
The :variable:`CMAKE_DIRECTORY_LABELS` variable can be used to initialize this
|
||||
property.
|
||||
|
||||
The list is reported in dashboard submissions.
|
@ -1,7 +1,9 @@
|
||||
TEST_INCLUDE_FILE
|
||||
-----------------
|
||||
|
||||
Deprecated. Use :prop_dir:`TEST_INCLUDE_FILES` instead.
|
||||
|
||||
A cmake file that will be included when ctest is run.
|
||||
|
||||
If you specify TEST_INCLUDE_FILE, that file will be included and
|
||||
If you specify ``TEST_INCLUDE_FILE``, that file will be included and
|
||||
processed when ctest is run on the directory.
|
||||
|
7
Help/prop_dir/TEST_INCLUDE_FILES.rst
Normal file
7
Help/prop_dir/TEST_INCLUDE_FILES.rst
Normal file
@ -0,0 +1,7 @@
|
||||
TEST_INCLUDE_FILES
|
||||
------------------
|
||||
|
||||
A list of cmake files that will be included when ctest is run.
|
||||
|
||||
If you specify ``TEST_INCLUDE_FILES``, those files will be included and
|
||||
processed when ctest is run on the directory.
|
@ -9,5 +9,14 @@ optional ``OPTIONS`` argument of the :module:`qt4_add_resources() <FindQt4>` mac
|
||||
|
||||
By default it is empty.
|
||||
|
||||
The options set on the ``.qrc`` source file may override :prop_tgt:`AUTORCC_OPTIONS` set
|
||||
on the target.
|
||||
The options set on the ``.qrc`` source file may override
|
||||
:prop_tgt:`AUTORCC_OPTIONS` set on the target.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(SOURCE resources.qrc PROPERTY AUTORCC_OPTIONS "--compress;9")
|
||||
# ...
|
||||
|
@ -4,11 +4,20 @@ AUTOUIC_OPTIONS
|
||||
Additional options for ``uic`` when using :prop_tgt:`AUTOUIC`
|
||||
|
||||
This property holds additional command line options
|
||||
which will be used when ``uic`` is executed during the build via :prop_tgt:`AUTOUIC`,
|
||||
i.e. it is equivalent to the optional ``OPTIONS`` argument of the
|
||||
:module:`qt4_wrap_ui() <FindQt4>` macro.
|
||||
which will be used when ``uic`` is executed during the build via
|
||||
:prop_tgt:`AUTOUIC`, i.e. it is equivalent to the optional ``OPTIONS``
|
||||
argument of the :module:`qt4_wrap_ui() <FindQt4>` macro.
|
||||
|
||||
By default it is empty.
|
||||
|
||||
The options set on the ``.ui`` source file may override :prop_tgt:`AUTOUIC_OPTIONS` set
|
||||
on the target.
|
||||
The options set on the ``.ui`` source file may override
|
||||
:prop_tgt:`AUTOUIC_OPTIONS` set on the target.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(SOURCE widget.ui PROPERTY AUTOUIC_OPTIONS "--no-protection")
|
||||
# ...
|
||||
|
@ -4,5 +4,14 @@ SKIP_AUTOGEN
|
||||
Exclude the source file from :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC` and
|
||||
:prop_tgt:`AUTORCC` processing (for Qt projects).
|
||||
|
||||
For finer control see :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC` and
|
||||
:prop_sf:`SKIP_AUTORCC`.
|
||||
For finer exclusion control see :prop_sf:`SKIP_AUTOMOC`,
|
||||
:prop_sf:`SKIP_AUTOUIC` and :prop_sf:`SKIP_AUTORCC`.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(SOURCE file.h PROPERTY SKIP_AUTOGEN ON)
|
||||
# ...
|
||||
|
@ -3,4 +3,13 @@ SKIP_AUTOMOC
|
||||
|
||||
Exclude the source file from :prop_tgt:`AUTOMOC` processing (for Qt projects).
|
||||
|
||||
For broader control see :prop_sf:`SKIP_AUTOGEN`
|
||||
For broader exclusion control see :prop_sf:`SKIP_AUTOGEN`.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)
|
||||
# ...
|
||||
|
@ -3,4 +3,13 @@ SKIP_AUTORCC
|
||||
|
||||
Exclude the source file from :prop_tgt:`AUTORCC` processing (for Qt projects).
|
||||
|
||||
For broader control see :prop_sf:`SKIP_AUTOGEN`
|
||||
For broader exclusion control see :prop_sf:`SKIP_AUTOGEN`.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(SOURCE file.qrc PROPERTY SKIP_AUTORCC ON)
|
||||
# ...
|
||||
|
@ -3,4 +3,18 @@ SKIP_AUTOUIC
|
||||
|
||||
Exclude the source file from :prop_tgt:`AUTOUIC` processing (for Qt projects).
|
||||
|
||||
For broader control see :prop_sf:`SKIP_AUTOGEN`
|
||||
:prop_sf:`SKIP_AUTOUIC` can be set on C++ header and source files and on
|
||||
``.ui`` files.
|
||||
|
||||
For broader exclusion control see :prop_sf:`SKIP_AUTOGEN`.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(SOURCE file.h PROPERTY SKIP_AUTOUIC ON)
|
||||
set_property(SOURCE file.cpp PROPERTY SKIP_AUTOUIC ON)
|
||||
set_property(SOURCE widget.ui PROPERTY SKIP_AUTOUIC ON)
|
||||
# ...
|
||||
|
5
Help/prop_sf/VS_SHADER_OUTPUT_HEADER_FILE.rst
Normal file
5
Help/prop_sf/VS_SHADER_OUTPUT_HEADER_FILE.rst
Normal file
@ -0,0 +1,5 @@
|
||||
VS_SHADER_OUTPUT_HEADER_FILE
|
||||
----------------------------
|
||||
|
||||
Set filename for output header file containing object code of a ``.hlsl``
|
||||
source file.
|
5
Help/prop_sf/VS_SHADER_VARIABLE_NAME.rst
Normal file
5
Help/prop_sf/VS_SHADER_VARIABLE_NAME.rst
Normal file
@ -0,0 +1,5 @@
|
||||
VS_SHADER_VARIABLE_NAME
|
||||
-----------------------
|
||||
|
||||
Set name of variable in header file containing object code of a ``.hlsl``
|
||||
source file.
|
@ -2,7 +2,8 @@ FIXTURES_CLEANUP
|
||||
----------------
|
||||
|
||||
Specifies a list of fixtures for which the test is to be treated as a cleanup
|
||||
test.
|
||||
test. These fixture names are distinct from test case names and are not
|
||||
required to have any similarity to the names of tests associated with them.
|
||||
|
||||
Fixture cleanup tests are ordinary tests with all of the usual test
|
||||
functionality. Setting the ``FIXTURES_CLEANUP`` property for a test has two
|
||||
|
@ -2,7 +2,7 @@ FIXTURES_REQUIRED
|
||||
-----------------
|
||||
|
||||
Specifies a list of fixtures the test requires. Fixture names are case
|
||||
sensitive.
|
||||
sensitive and they are not required to have any similarity to test names.
|
||||
|
||||
Fixtures are a way to attach setup and cleanup tasks to a set of tests. If a
|
||||
test requires a given fixture, then all tests marked as setup tasks for that
|
||||
@ -19,7 +19,9 @@ some setup tests fail.
|
||||
When CTest is asked to execute only a subset of tests (e.g. by the use of
|
||||
regular expressions or when run with the ``--rerun-failed`` command line
|
||||
option), it will automatically add any setup or cleanup tests for fixtures
|
||||
required by any of the tests that are in the execution set.
|
||||
required by any of the tests that are in the execution set. This behavior can
|
||||
be overridden with the ``-FS``, ``-FC`` and ``-FA`` command line options to
|
||||
:manual:`ctest(1)` if desired.
|
||||
|
||||
Since setup and cleanup tasks are also tests, they can have an ordering
|
||||
specified by the :prop_test:`DEPENDS` test property just like any other tests.
|
||||
|
@ -2,14 +2,15 @@ FIXTURES_SETUP
|
||||
--------------
|
||||
|
||||
Specifies a list of fixtures for which the test is to be treated as a setup
|
||||
test.
|
||||
test. These fixture names are distinct from test case names and are not
|
||||
required to have any similarity to the names of tests associated with them.
|
||||
|
||||
Fixture setup tests are ordinary tests with all of the usual test
|
||||
functionality. Setting the ``FIXTURES_SETUP`` property for a test has two
|
||||
primary effects:
|
||||
|
||||
- CTest will ensure the test executes before any other test which lists the
|
||||
fixture(s) in its :prop_test:`FIXTURES_REQUIRED` property.
|
||||
fixture name(s) in its :prop_test:`FIXTURES_REQUIRED` property.
|
||||
|
||||
- If CTest is asked to run only a subset of tests (e.g. using regular
|
||||
expressions or the ``--rerun-failed`` option) and the setup test is not in
|
||||
|
@ -1,8 +1,13 @@
|
||||
PROCESSORS
|
||||
----------
|
||||
|
||||
How many process slots this test requires
|
||||
Set to specify how many process slots this test requires.
|
||||
|
||||
Denotes the number of processors that this test will require. This is
|
||||
typically used for MPI tests, and should be used in conjunction with
|
||||
the ctest_test PARALLEL_LEVEL option.
|
||||
the :command:`ctest_test` ``PARALLEL_LEVEL`` option.
|
||||
|
||||
This will also be used to display a weighted test timing result in label and
|
||||
subproject summaries in the command line output of :manual:`ctest(1)`. The wall
|
||||
clock time for the test run will be multiplied by this property to give a
|
||||
better idea of how much cpu resource CTest allocated for the test.
|
||||
|
@ -5,44 +5,49 @@ Should the target be processed with automoc (for Qt projects).
|
||||
|
||||
AUTOMOC is a boolean specifying whether CMake will handle the Qt ``moc``
|
||||
preprocessor automatically, i.e. without having to use the
|
||||
:module:`QT4_WRAP_CPP() <FindQt4>` or QT5_WRAP_CPP() macro. Currently Qt4 and Qt5 are
|
||||
supported.
|
||||
:module:`QT4_WRAP_CPP() <FindQt4>` or QT5_WRAP_CPP() macro.
|
||||
Currently Qt4 and Qt5 are supported.
|
||||
|
||||
When this property is set ``ON``, CMake will scan the header and
|
||||
source files at build time and invoke moc accordingly.
|
||||
|
||||
* If an ``#include`` statement like ``#include "moc_<basename>.cpp"`` is found,
|
||||
the ``Q_OBJECT`` or ``Q_GADGET`` macros are expected in an otherwise empty
|
||||
line of the ``<basename>.h(xx)`` header file. ``moc`` is run on the header
|
||||
a macro from :prop_tgt:`AUTOMOC_MACRO_NAMES` is expected to appear in the
|
||||
``<basename>.h(xx)`` header file. ``moc`` is run on the header
|
||||
file to generate ``moc_<basename>.cpp`` in the
|
||||
``<AUTOGEN_BUILD_DIR>/include`` directory which is automatically added
|
||||
to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
|
||||
This allows the compiler to find the included ``moc_<basename>.cpp`` file
|
||||
regardless of the location the original source.
|
||||
|
||||
* For :prop_gbl:`multi configuration generators <GENERATOR_IS_MULTI_CONFIG>`,
|
||||
the include directory is ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.
|
||||
|
||||
* See :prop_tgt:`AUTOGEN_BUILD_DIR`.
|
||||
|
||||
* If an ``#include`` statement like ``#include "<basename>.moc"`` is found,
|
||||
then ``Q_OBJECT`` or ``Q_GADGET`` macros are expected in the current source
|
||||
file and ``moc`` is run on the source file itself.
|
||||
a macro from :prop_tgt:`AUTOMOC_MACRO_NAMES` is expected to appear in the
|
||||
source file and ``moc`` is run on the source file itself.
|
||||
|
||||
* Header files that are not included by an ``#include "moc_<basename>.cpp"``
|
||||
statement are nonetheless scanned for ``Q_OBJECT`` or ``Q_GADGET`` macros.
|
||||
statement are nonetheless scanned for a macro out of
|
||||
:prop_tgt:`AUTOMOC_MACRO_NAMES`.
|
||||
The resulting ``moc_<basename>.cpp`` files are generated in custom
|
||||
directories and automatically included in a generated
|
||||
``<AUTOGEN_BUILD_DIR>/mocs_compilation.cpp`` file,
|
||||
which is compiled as part of the target.
|
||||
|
||||
* The custom directories with checksum
|
||||
based names help to avoid name collisions for moc files with the same
|
||||
based names help to avoid name collisions for ``moc`` files with the same
|
||||
``<basename>``.
|
||||
|
||||
* See :prop_tgt:`AUTOGEN_BUILD_DIR`.
|
||||
|
||||
* Additionally, header files with the same base name as a source file,
|
||||
(like ``<basename>.h``) or ``_p`` appended to the base name (like
|
||||
``<basename>_p.h``), are parsed for ``Q_OBJECT`` or ``Q_GADGET`` macros,
|
||||
and if found, ``moc`` is also executed on those files.
|
||||
``<basename>_p.h``), are scanned for a macro out of
|
||||
:prop_tgt:`AUTOMOC_MACRO_NAMES`, and if found, ``moc``
|
||||
is also executed on those files.
|
||||
|
||||
* ``AUTOMOC`` always checks multiple header alternative extensions,
|
||||
such as ``hpp``, ``hxx``, etc. when searching for headers.
|
||||
@ -53,11 +58,11 @@ source files at build time and invoke moc accordingly.
|
||||
This property is initialized by the value of the :variable:`CMAKE_AUTOMOC`
|
||||
variable if it is set when a target is created.
|
||||
|
||||
Additional command line options for moc can be set via the
|
||||
Additional command line options for ``moc`` can be set via the
|
||||
:prop_tgt:`AUTOMOC_MOC_OPTIONS` property.
|
||||
|
||||
By enabling the :variable:`CMAKE_AUTOMOC_RELAXED_MODE` variable the
|
||||
rules for searching the files which will be processed by moc can be relaxed.
|
||||
rules for searching the files which will be processed by ``moc`` can be relaxed.
|
||||
See the documentation for this variable for more details.
|
||||
|
||||
The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the
|
||||
@ -66,9 +71,14 @@ automoc targets together in an IDE, e.g. in MSVS.
|
||||
The global property :prop_gbl:`AUTOGEN_SOURCE_GROUP` can be used to group
|
||||
files generated by :prop_tgt:`AUTOMOC` together in an IDE, e.g. in MSVS.
|
||||
|
||||
Additional macro names to search for can be added to :prop_tgt:`AUTOMOC_MACRO_NAMES`.
|
||||
|
||||
Additional ``moc`` dependency file names can be extracted from source code
|
||||
by using :prop_tgt:`AUTOMOC_DEPEND_FILTERS`.
|
||||
|
||||
Compiler pre definitions for ``moc`` are written to a ``moc_predefs.h`` file
|
||||
which is controlled by :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES`.
|
||||
|
||||
Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by
|
||||
enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`.
|
||||
|
||||
|
24
Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst
Normal file
24
Help/prop_tgt/AUTOMOC_COMPILER_PREDEFINES.rst
Normal file
@ -0,0 +1,24 @@
|
||||
AUTOMOC_COMPILER_PREDEFINES
|
||||
---------------------------
|
||||
|
||||
Boolean value used by :prop_tgt:`AUTOMOC` to determine if the
|
||||
compiler pre definitions file ``moc_predefs.h`` should be generated.
|
||||
|
||||
CMake generates a ``moc_predefs.h`` file with compiler pre definitions
|
||||
from the output of the command defined in
|
||||
:variable:`CMAKE_CXX_COMPILER_PREDEFINES_COMMAND <CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND>`
|
||||
when
|
||||
|
||||
- :prop_tgt:`AUTOMOC` is enabled,
|
||||
- :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES` is enabled,
|
||||
- :variable:`CMAKE_CXX_COMPILER_PREDEFINES_COMMAND <CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND>` isn't empty and
|
||||
- the Qt version is greater or equal 5.8.
|
||||
|
||||
The ``moc_predefs.h`` file, which is generated in :prop_tgt:`AUTOGEN_BUILD_DIR`,
|
||||
is passed to ``moc`` as the argument to the ``--include`` option.
|
||||
|
||||
By default :prop_tgt:`AUTOMOC_COMPILER_PREDEFINES` is initialized from
|
||||
:variable:`CMAKE_AUTOMOC_COMPILER_PREDEFINES`, which is ON by default.
|
||||
|
||||
See the :manual:`cmake-qt(7)` manual for more information on using CMake
|
||||
with Qt.
|
@ -25,7 +25,7 @@ with Qt.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
^^^^^^^
|
||||
|
||||
Consider a file ``FOO.hpp`` holds a custom macro ``OBJ_JSON_FILE`` and we
|
||||
want the ``moc`` file to depend on the macro`s file name argument::
|
||||
|
32
Help/prop_tgt/AUTOMOC_MACRO_NAMES.rst
Normal file
32
Help/prop_tgt/AUTOMOC_MACRO_NAMES.rst
Normal file
@ -0,0 +1,32 @@
|
||||
AUTOMOC_MACRO_NAMES
|
||||
-------------------
|
||||
|
||||
A :ref:`;-list <CMake Language Lists>` list of macro names used by
|
||||
:prop_tgt:`AUTOMOC` to determine if a C++ file needs to be processed by ``moc``.
|
||||
|
||||
This property is only used if the :prop_tgt:`AUTOMOC` property is ``ON``
|
||||
for this target.
|
||||
|
||||
When running :prop_tgt:`AUTOMOC`, CMake searches for the strings listed in
|
||||
:prop_tgt:`AUTOMOC_MACRO_NAMES` in C++ source and header files.
|
||||
If any of the strings is found
|
||||
|
||||
- as the first non space string on a new line or
|
||||
- as the first non space string after a ``{`` on a new line,
|
||||
|
||||
then the file will be processed by ``moc``.
|
||||
|
||||
By default :prop_tgt:`AUTOMOC_MACRO_NAMES` is initialized from
|
||||
:variable:`CMAKE_AUTOMOC_MACRO_NAMES`.
|
||||
|
||||
See the :manual:`cmake-qt(7)` manual for more information on using CMake
|
||||
with Qt.
|
||||
|
||||
Example
|
||||
^^^^^^^
|
||||
|
||||
In this case the the ``Q_OBJECT`` macro is hidden inside an other macro
|
||||
called ``CUSTOM_MACRO``. To let CMake know that source files, that contain
|
||||
``CUSTOM_MACRO``, need to be ``moc`` processed, we call::
|
||||
|
||||
set_property(TARGET tgt APPEND PROPERTY AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")
|
@ -19,3 +19,12 @@ set on the ``.qrc`` source file.
|
||||
|
||||
See the :manual:`cmake-qt(7)` manual for more information on using CMake
|
||||
with Qt.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(TARGET tgt PROPERTY AUTORCC_OPTIONS "--compress;9")
|
||||
# ...
|
||||
|
@ -17,6 +17,9 @@ optional :prop_tgt:`AUTOUIC_SEARCH_PATHS` of the target.
|
||||
``<AUTOGEN_BUILD_DIR>/include``,
|
||||
which is automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
|
||||
|
||||
* For :prop_gbl:`multi configuration generators <GENERATOR_IS_MULTI_CONFIG>`,
|
||||
the include directory is ``<AUTOGEN_BUILD_DIR>/include_<CONFIG>``.
|
||||
|
||||
* See :prop_tgt:`AUTOGEN_BUILD_DIR`.
|
||||
|
||||
This property is initialized by the value of the :variable:`CMAKE_AUTOUIC`
|
||||
|
@ -23,3 +23,12 @@ expressions.
|
||||
|
||||
See the :manual:`cmake-qt(7)` manual for more information on using CMake
|
||||
with Qt.
|
||||
|
||||
EXAMPLE
|
||||
^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
# ...
|
||||
set_property(TARGET tgt PROPERTY AUTOUIC_OPTIONS "--no-protection")
|
||||
# ...
|
||||
|
@ -7,7 +7,7 @@ This property specifies the CUDA/C++ standard whose features are requested
|
||||
to build this target. For some compilers, this results in adding a
|
||||
flag such as ``-std=gnu++11`` to the compile line.
|
||||
|
||||
Supported values are ``98``, ``11``.
|
||||
Supported values are ``98``, ``11``, ``14``.
|
||||
|
||||
If the value requested does not result in a compile flag being added for
|
||||
the compiler in use, a previous standard flag will be added instead. This
|
||||
|
@ -6,7 +6,8 @@ The C++ standard whose features are requested to build this target.
|
||||
This property specifies the C++ standard whose features are requested
|
||||
to build this target. For some compilers, this results in adding a
|
||||
flag such as ``-std=gnu++11`` to the compile line. For compilers that
|
||||
have no notion of a standard level, such as MSVC, this has no effect.
|
||||
have no notion of a standard level, such as Microsoft Visual C++ before
|
||||
2015 Update 3, this has no effect.
|
||||
|
||||
Supported values are ``98``, ``11``, ``14``, and ``17``.
|
||||
|
||||
|
@ -6,7 +6,8 @@ The C standard whose features are requested to build this target.
|
||||
This property specifies the C standard whose features are requested
|
||||
to build this target. For some compilers, this results in adding a
|
||||
flag such as ``-std=gnu11`` to the compile line. For compilers that
|
||||
have no notion of a standard level, such as MSVC, this has no effect.
|
||||
have no notion of a standard level, such as Microsoft Visual C++ before
|
||||
2015 Update 3, this has no effect.
|
||||
|
||||
Supported values are ``90``, ``99`` and ``11``.
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
<LANG>_COMPILER_LAUNCHER
|
||||
------------------------
|
||||
|
||||
This property is implemented only when ``<LANG>`` is ``C`` or ``CXX``.
|
||||
This property is implemented only when ``<LANG>`` is ``C``, ``CXX``,
|
||||
or ``CUDA``.
|
||||
|
||||
Specify a :ref:`;-list <CMake Language Lists>` containing a command line
|
||||
for a compiler launching tool. The :ref:`Makefile Generators` and the
|
||||
|
13
Help/prop_tgt/LANG_CPPCHECK.rst
Normal file
13
Help/prop_tgt/LANG_CPPCHECK.rst
Normal file
@ -0,0 +1,13 @@
|
||||
<LANG>_CPPCHECK
|
||||
---------------
|
||||
|
||||
This property is supported only when ``<LANG>`` is ``C`` or ``CXX``.
|
||||
|
||||
Specify a :ref:`;-list <CMake Language Lists>` containing a command line
|
||||
for the ``cppcheck`` static analysis tool. The :ref:`Makefile Generators`
|
||||
and the :generator:`Ninja` generator will run ``cppcheck`` along with the
|
||||
compiler and report any problems.
|
||||
|
||||
This property is initialized by the value of the
|
||||
:variable:`CMAKE_<LANG>_CPPCHECK` variable if it is set when a target is
|
||||
created.
|
@ -6,7 +6,7 @@ Build an executable as an Application Bundle on OS X or iOS.
|
||||
When this property is set to ``TRUE`` the executable when built on OS X
|
||||
or iOS will be created as an application bundle. This makes it
|
||||
a GUI executable that can be launched from the Finder. See the
|
||||
:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property for information about
|
||||
:prop_tgt:`MACOSX_BUNDLE_INFO_PLIST` target property for information about
|
||||
creation of the ``Info.plist`` file for the application bundle.
|
||||
This property is initialized by the value of the variable
|
||||
:variable:`CMAKE_MACOSX_BUNDLE` if it is set when a target is created.
|
||||
|
@ -1,11 +1,15 @@
|
||||
NO_SYSTEM_FROM_IMPORTED
|
||||
-----------------------
|
||||
|
||||
Do not treat includes from IMPORTED target interfaces as SYSTEM.
|
||||
Do not treat include directories from the interfaces of consumed
|
||||
:ref:`imported targets` as ``SYSTEM``.
|
||||
|
||||
The contents of the INTERFACE_INCLUDE_DIRECTORIES of IMPORTED targets
|
||||
are treated as SYSTEM includes by default. If this property is
|
||||
enabled, the contents of the INTERFACE_INCLUDE_DIRECTORIES of IMPORTED
|
||||
targets are not treated as system includes. This property is
|
||||
initialized by the value of the variable CMAKE_NO_SYSTEM_FROM_IMPORTED
|
||||
if it is set when a target is created.
|
||||
The contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property
|
||||
of imported targets are treated as ``SYSTEM`` includes by default. If this
|
||||
property is enabled on a target, compilation of sources in that target will
|
||||
not treat the contents of the ``INTERFACE_INCLUDE_DIRECTORIES`` of consumed
|
||||
imported targets as system includes.
|
||||
|
||||
This property is initialized by the value of the
|
||||
:variable:`CMAKE_NO_SYSTEM_FROM_IMPORTED` variable if it is set when a target
|
||||
is created.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user