From 845cb217a7d70b32aa26969bc829a846dcab9130 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 2 May 2016 14:27:24 -0400 Subject: CMP0059: Fix typo in policy description --- Help/policy/CMP0059.rst | 2 +- Source/cmPolicies.h | 2 +- Tests/RunCMake/CMP0059/CMP0059-WARN-stderr.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Help/policy/CMP0059.rst b/Help/policy/CMP0059.rst index 5da479a..bce982e 100644 --- a/Help/policy/CMP0059.rst +++ b/Help/policy/CMP0059.rst @@ -1,7 +1,7 @@ CMP0059 ------- -Don't treat ``DEFINITIONS`` as a built-in directory property. +Do not treat ``DEFINITIONS`` as a built-in directory property. CMake 3.3 and above no longer make a list of definitions available through the :prop_dir:`DEFINITIONS` directory property. The diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 5023055..dbea895 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -204,7 +204,7 @@ class cmPolicy; "Ninja requires custom command byproducts to be explicit.", \ 3, 3, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0059, \ - "Do no treat DEFINITIONS as a built-in directory property.", \ + "Do not treat DEFINITIONS as a built-in directory property.", \ 3, 3, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0060, \ "Link libraries by full path even in implicit directories.", \ diff --git a/Tests/RunCMake/CMP0059/CMP0059-WARN-stderr.txt b/Tests/RunCMake/CMP0059/CMP0059-WARN-stderr.txt index 4e04d15..06c7be3 100644 --- a/Tests/RunCMake/CMP0059/CMP0059-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0059/CMP0059-WARN-stderr.txt @@ -1,5 +1,5 @@ CMake Warning \(dev\) at CMP0059-WARN.cmake:6 \(get_property\): - Policy CMP0059 is not set: Do no treat DEFINITIONS as a built-in directory + Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory property. Run "cmake --help-policy CMP0059" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack \(most recent call first\): @@ -8,7 +8,7 @@ This warning is for project developers. Use -Wno-dev to suppress it. DEFS: -DSOME_DEF CMake Warning \(dev\) at CMP0059-WARN.cmake:14 \(get_property\): - Policy CMP0059 is not set: Do no treat DEFINITIONS as a built-in directory + Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory property. Run "cmake --help-policy CMP0059" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack \(most recent call first\): -- cgit v0.12 From de370656612be4b0f1e25a68be2c5f7d44645b29 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 2 May 2016 13:51:26 -0400 Subject: cmRST: Parse toctree lines with Sphinx cross-reference syntax --- Source/cmRST.cxx | 16 +++++++++++++--- Source/cmRST.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 67667ea..44d4289 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -46,7 +46,8 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot): "):`(<*([^`<]|[^` \t]<)*)([ \t]+<[^`]*>)?`"), Substitution("(^|[^A-Za-z0-9_])" "((\\|[^| \t\r\n]([^|\r\n]*[^| \t\r\n])?\\|)(__|_|))" - "([^A-Za-z0-9_]|$)") + "([^A-Za-z0-9_]|$)"), + TocTreeLink("^.*[ \t]+<([^>]+)>$") { this->Replace["|release|"] = cmVersion::GetCMakeVersion(); } @@ -429,9 +430,18 @@ void cmRST::ProcessDirectiveTocTree() for(std::vector::iterator i = this->MarkupLines.begin(); i != this->MarkupLines.end(); ++i) { - if(!i->empty() && i->find_first_of(":") == i->npos) + std::string const& line = *i; + if (!line.empty() && line[0] != ':') { - this->ProcessInclude(*i + ".rst", IncludeTocTree); + if (this->TocTreeLink.find(line)) + { + std::string const& link = this->TocTreeLink.match(1); + this->ProcessInclude(link + ".rst", IncludeTocTree); + } + else + { + this->ProcessInclude(line + ".rst", IncludeTocTree); + } } } } diff --git a/Source/cmRST.h b/Source/cmRST.h index b9b2366..098afab 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -89,6 +89,7 @@ private: cmsys::RegularExpression ModuleRST; cmsys::RegularExpression CMakeRole; cmsys::RegularExpression Substitution; + cmsys::RegularExpression TocTreeLink; std::vector MarkupLines; std::string DocDir; -- cgit v0.12 From b74d73e50755cf4a96e0323aaa2bb166f394d030 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 2 May 2016 13:53:01 -0400 Subject: Help: Organize cmake-policies(7) manual by version of introduction --- Help/manual/cmake-policies.7.rst | 176 ++++++++++++++++++++++++--------------- 1 file changed, 109 insertions(+), 67 deletions(-) diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index ae5354f..ff71e6e 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -51,75 +51,117 @@ 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. -All Policies -============ +Policies Introduced by CMake 3.4 +================================ .. toctree:: :maxdepth: 1 - /policy/CMP0000 - /policy/CMP0001 - /policy/CMP0002 - /policy/CMP0003 - /policy/CMP0004 - /policy/CMP0005 - /policy/CMP0006 - /policy/CMP0007 - /policy/CMP0008 - /policy/CMP0009 - /policy/CMP0010 - /policy/CMP0011 - /policy/CMP0012 - /policy/CMP0013 - /policy/CMP0014 - /policy/CMP0015 - /policy/CMP0016 - /policy/CMP0017 - /policy/CMP0018 - /policy/CMP0019 - /policy/CMP0020 - /policy/CMP0021 - /policy/CMP0022 - /policy/CMP0023 - /policy/CMP0024 - /policy/CMP0025 - /policy/CMP0026 - /policy/CMP0027 - /policy/CMP0028 - /policy/CMP0029 - /policy/CMP0030 - /policy/CMP0031 - /policy/CMP0032 - /policy/CMP0033 - /policy/CMP0034 - /policy/CMP0035 - /policy/CMP0036 - /policy/CMP0037 - /policy/CMP0038 - /policy/CMP0039 - /policy/CMP0040 - /policy/CMP0041 - /policy/CMP0042 - /policy/CMP0043 - /policy/CMP0044 - /policy/CMP0045 - /policy/CMP0046 - /policy/CMP0047 - /policy/CMP0048 - /policy/CMP0049 - /policy/CMP0050 - /policy/CMP0051 - /policy/CMP0052 - /policy/CMP0053 - /policy/CMP0054 - /policy/CMP0055 - /policy/CMP0056 - /policy/CMP0057 - /policy/CMP0058 - /policy/CMP0059 - /policy/CMP0060 - /policy/CMP0061 - /policy/CMP0062 - /policy/CMP0063 - /policy/CMP0064 /policy/CMP0065 + /policy/CMP0064 + +Policies Introduced by CMake 3.3 +================================ + +.. toctree:: + :maxdepth: 1 + + /policy/CMP0063 + /policy/CMP0062 + /policy/CMP0061 + /policy/CMP0060 + /policy/CMP0059 + /policy/CMP0058 + /policy/CMP0057 + +Policies Introduced by CMake 3.2 +================================ + +.. toctree:: + :maxdepth: 1 + + /policy/CMP0056 + /policy/CMP0055 + +Policies Introduced by CMake 3.1 +================================ + +.. toctree:: + :maxdepth: 1 + + /policy/CMP0054 + /policy/CMP0053 + /policy/CMP0052 + /policy/CMP0051 + +Policies Introduced by CMake 3.0 +================================ + +.. toctree:: + :maxdepth: 1 + + /policy/CMP0050 + /policy/CMP0049 + /policy/CMP0048 + /policy/CMP0047 + /policy/CMP0046 + /policy/CMP0045 + /policy/CMP0044 + /policy/CMP0043 + /policy/CMP0042 + /policy/CMP0041 + /policy/CMP0040 + /policy/CMP0039 + /policy/CMP0038 + /policy/CMP0037 + /policy/CMP0036 + /policy/CMP0035 + /policy/CMP0034 + /policy/CMP0033 + /policy/CMP0032 + /policy/CMP0031 + /policy/CMP0030 + /policy/CMP0029 + /policy/CMP0028 + /policy/CMP0027 + /policy/CMP0026 + /policy/CMP0025 + /policy/CMP0024 + +Policies Introduced by CMake 2.8 +================================ + +.. toctree:: + :maxdepth: 1 + + /policy/CMP0023 + /policy/CMP0022 + /policy/CMP0021 + /policy/CMP0020 + /policy/CMP0019 + /policy/CMP0018 + /policy/CMP0017 + /policy/CMP0016 + /policy/CMP0015 + /policy/CMP0014 + /policy/CMP0013 + /policy/CMP0012 + +Policies Introduced by CMake 2.6 +================================ + +.. toctree:: + :maxdepth: 1 + + /policy/CMP0011 + /policy/CMP0010 + /policy/CMP0009 + /policy/CMP0008 + /policy/CMP0007 + /policy/CMP0006 + /policy/CMP0005 + /policy/CMP0004 + /policy/CMP0003 + /policy/CMP0002 + /policy/CMP0001 + /policy/CMP0000 -- cgit v0.12 From 5f948d2aa41cc83da989ea058a4e5f008edd12f6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 2 May 2016 13:56:25 -0400 Subject: Help: Add policy summaries to cmake-policies(7) In Sphinx output formats that print the toctree the policy numbers in links from the cmake-policies(7) manual are not descriptive. Convert the toctree entries to cross-reference syntax and add the summary of each policy. For now simply duplicate the policy summary line. We already maintain copies in `cmPolicies.h` and `Help/policy/*.rst` docs. --- Help/manual/cmake-policies.7.rst | 132 +++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index ff71e6e..43f4637 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,8 +57,8 @@ Policies Introduced by CMake 3.4 .. toctree:: :maxdepth: 1 - /policy/CMP0065 - /policy/CMP0064 + CMP0065: Do not add flags to export symbols from executables without the ENABLE_EXPORTS target property. + CMP0064: Support new TEST if() operator. Policies Introduced by CMake 3.3 ================================ @@ -66,13 +66,13 @@ Policies Introduced by CMake 3.3 .. toctree:: :maxdepth: 1 - /policy/CMP0063 - /policy/CMP0062 - /policy/CMP0061 - /policy/CMP0060 - /policy/CMP0059 - /policy/CMP0058 - /policy/CMP0057 + CMP0063: Honor visibility properties for all target types. + CMP0062: Disallow install() of export() result. + CMP0061: CTest does not by default tell make to ignore errors (-i). + CMP0060: Link libraries by full path even in implicit directories. + CMP0059: Do not treat DEFINITIONS as a built-in directory property. + CMP0058: Ninja requires custom command byproducts to be explicit. + CMP0057: Support new IN_LIST if() operator. Policies Introduced by CMake 3.2 ================================ @@ -80,8 +80,8 @@ Policies Introduced by CMake 3.2 .. toctree:: :maxdepth: 1 - /policy/CMP0056 - /policy/CMP0055 + CMP0056: Honor link flags in try_compile() source-file signature. + CMP0055: Strict checking for break() command. Policies Introduced by CMake 3.1 ================================ @@ -89,10 +89,10 @@ Policies Introduced by CMake 3.1 .. toctree:: :maxdepth: 1 - /policy/CMP0054 - /policy/CMP0053 - /policy/CMP0052 - /policy/CMP0051 + CMP0054: Only interpret if() arguments as variables or keywords when unquoted. + CMP0053: Simplify variable reference and escape sequence evaluation. + CMP0052: Reject source and build dirs in installed INTERFACE_INCLUDE_DIRECTORIES. + CMP0051: List TARGET_OBJECTS in SOURCES target property. Policies Introduced by CMake 3.0 ================================ @@ -100,33 +100,33 @@ Policies Introduced by CMake 3.0 .. toctree:: :maxdepth: 1 - /policy/CMP0050 - /policy/CMP0049 - /policy/CMP0048 - /policy/CMP0047 - /policy/CMP0046 - /policy/CMP0045 - /policy/CMP0044 - /policy/CMP0043 - /policy/CMP0042 - /policy/CMP0041 - /policy/CMP0040 - /policy/CMP0039 - /policy/CMP0038 - /policy/CMP0037 - /policy/CMP0036 - /policy/CMP0035 - /policy/CMP0034 - /policy/CMP0033 - /policy/CMP0032 - /policy/CMP0031 - /policy/CMP0030 - /policy/CMP0029 - /policy/CMP0028 - /policy/CMP0027 - /policy/CMP0026 - /policy/CMP0025 - /policy/CMP0024 + CMP0050: Disallow add_custom_command SOURCE signatures. + CMP0049: Do not expand variables in target source entries. + CMP0048: project() command manages VERSION variables. + CMP0047: Use QCC compiler id for the qcc drivers on QNX. + CMP0046: Error on non-existent dependency in add_dependencies. + CMP0045: Error on non-existent target in get_target_property. + CMP0044: Case sensitive Lang_COMPILER_ID generator expressions. + CMP0043: Ignore COMPILE_DEFINITIONS_Config properties. + CMP0042: MACOSX_RPATH is enabled by default. + CMP0041: Error on relative include with generator expression. + CMP0040: The target in the TARGET signature of add_custom_command() must exist. + CMP0039: Utility targets may not have link dependencies. + CMP0038: Targets may not link directly to themselves. + CMP0037: Target names should not be reserved and should match a validity pattern. + CMP0036: The build_name command should not be called. + CMP0035: The variable_requires command should not be called. + CMP0034: The utility_source command should not be called. + CMP0033: The export_library_dependencies command should not be called. + CMP0032: The output_required_files command should not be called. + CMP0031: The load_command command should not be called. + CMP0030: The use_mangled_mesa command should not be called. + CMP0029: The subdir_depends command should not be called. + CMP0028: Double colon in target name means ALIAS or IMPORTED target. + CMP0027: Conditionally linked imported targets with missing include directories. + CMP0026: Disallow use of the LOCATION target property. + CMP0025: Compiler id for Apple Clang is now AppleClang. + CMP0024: Disallow include export result. Policies Introduced by CMake 2.8 ================================ @@ -134,18 +134,18 @@ Policies Introduced by CMake 2.8 .. toctree:: :maxdepth: 1 - /policy/CMP0023 - /policy/CMP0022 - /policy/CMP0021 - /policy/CMP0020 - /policy/CMP0019 - /policy/CMP0018 - /policy/CMP0017 - /policy/CMP0016 - /policy/CMP0015 - /policy/CMP0014 - /policy/CMP0013 - /policy/CMP0012 + CMP0023: Plain and keyword target_link_libraries signatures cannot be mixed. + CMP0022: INTERFACE_LINK_LIBRARIES defines the link interface. + CMP0021: Fatal error on relative paths in INCLUDE_DIRECTORIES target property. + CMP0020: Automatically link Qt executables to qtmain target on Windows. + CMP0019: Do not re-expand variables in include and link information. + CMP0018: Ignore CMAKE_SHARED_LIBRARY_Lang_FLAGS variable. + CMP0017: Prefer files from the CMake module directory when including from there. + CMP0016: target_link_libraries() reports error if its only argument is not a target. + CMP0015: link_directories() treats paths relative to the source dir. + CMP0014: Input directories must have CMakeLists.txt. + CMP0013: Duplicate binary directories are not allowed. + CMP0012: if() recognizes numbers and boolean constants. Policies Introduced by CMake 2.6 ================================ @@ -153,15 +153,15 @@ Policies Introduced by CMake 2.6 .. toctree:: :maxdepth: 1 - /policy/CMP0011 - /policy/CMP0010 - /policy/CMP0009 - /policy/CMP0008 - /policy/CMP0007 - /policy/CMP0006 - /policy/CMP0005 - /policy/CMP0004 - /policy/CMP0003 - /policy/CMP0002 - /policy/CMP0001 - /policy/CMP0000 + CMP0011: Included scripts do automatic cmake_policy PUSH and POP. + CMP0010: Bad variable reference syntax is an error. + CMP0009: FILE GLOB_RECURSE calls should not follow symlinks by default. + CMP0008: Libraries linked by full-path must have a valid library file name. + CMP0007: list command no longer ignores empty elements. + CMP0006: Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION. + CMP0005: Preprocessor definition values are now escaped automatically. + CMP0004: Libraries linked may not have leading or trailing whitespace. + CMP0003: Libraries linked via full path no longer produce linker search paths. + CMP0002: Logical target names must be globally unique. + CMP0001: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used. + CMP0000: A minimum required CMake version must be specified. -- cgit v0.12