diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/install.rst | 10 | ||||
-rw-r--r-- | Help/command/target_precompile_headers.rst | 27 | ||||
-rw-r--r-- | Help/envvar/CCMAKE_COLORS.rst | 34 | ||||
-rw-r--r-- | Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx | 25 | ||||
-rw-r--r-- | Help/manual/cmake-env-variables.7.rst | 8 | ||||
-rw-r--r-- | Help/release/dev/FindBLAS-import-target.rst | 4 | ||||
-rw-r--r-- | Help/release/dev/FindLAPACK-import-target.rst | 4 | ||||
-rw-r--r-- | Help/release/dev/FindPython-find-implementations.rst | 5 | ||||
-rw-r--r-- | Help/release/dev/ccmake-custom-colors.rst | 5 |
9 files changed, 104 insertions, 18 deletions
diff --git a/Help/command/install.rst b/Help/command/install.rst index 3b72ea6..c8df7d9 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -18,10 +18,12 @@ Synopsis Introduction ^^^^^^^^^^^^ -This command generates installation rules for a project. Rules -specified by calls to this command within a source directory are -executed in order during installation. The order across directories -is not defined. +This command generates installation rules for a project. Install rules +specified by calls to the ``install()`` command within a source directory +are executed in order during installation. Install rules in subdirectories +added by calls to the :command:`add_subdirectory` command are interleaved +with those in the parent directory to run in the order declared (see +policy :policy:`CMP0082`). There are multiple signatures for this command. Some of them define installation options for files and targets. Options common to diff --git a/Help/command/target_precompile_headers.rst b/Help/command/target_precompile_headers.rst index 569c7eb..0d4f45a 100644 --- a/Help/command/target_precompile_headers.rst +++ b/Help/command/target_precompile_headers.rst @@ -56,35 +56,34 @@ e.g. ``[["other_header.h"]]``) will be treated as is, and include directories must be available for the compiler to find them. Other header file names (e.g. ``project_header.h``) are interpreted as being relative to the current source directory (e.g. :variable:`CMAKE_CURRENT_SOURCE_DIR`) and will be -included by absolute path. - -Arguments to ``target_precompile_headers()`` may use "generator expressions" -with the syntax ``$<...>``. -See the :manual:`cmake-generator-expressions(7)` manual for available -expressions. See the :manual:`cmake-compile-features(7)` manual for -information on compile features and a list of supported compilers. -The ``$<COMPILE_LANGUAGE:...>`` generator expression is particularly -useful for specifying a language-specific header to precompile for -only one language (e.g. ``CXX`` and not ``C``). For example: +included by absolute path. For example: .. code-block:: cmake target_precompile_headers(myTarget PUBLIC project_header.h - "$<$<COMPILE_LANGUAGE:CXX>:cxx_only.h>" PRIVATE [["other_header.h"]] <unordered_map> ) -When specifying angle brackets inside a :manual:`generator expression -<cmake-generator-expressions(7)>`, be sure to encode the closing ``>`` -as ``$<ANGLE-R>``. For example: +Arguments to ``target_precompile_headers()`` may use "generator expressions" +with the syntax ``$<...>``. +See the :manual:`cmake-generator-expressions(7)` manual for available +expressions. +The ``$<COMPILE_LANGUAGE:...>`` generator expression is particularly +useful for specifying a language-specific header to precompile for +only one language (e.g. ``CXX`` and not ``C``). In this case, header +file names that are not explicitly in double quotes or angle brackets +must be specified by absolute path. Also, when specifying angle brackets +inside a generator expression, be sure to encode the closing ``>`` as +``$<ANGLE-R>``. For example: .. code-block:: cmake target_precompile_headers(mylib PRIVATE + "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/cxx_only.h>" "$<$<COMPILE_LANGUAGE:C>:<stddef.h$<ANGLE-R>>" "$<$<COMPILE_LANGUAGE:CXX>:<cstddef$<ANGLE-R>>" ) diff --git a/Help/envvar/CCMAKE_COLORS.rst b/Help/envvar/CCMAKE_COLORS.rst new file mode 100644 index 0000000..d4750c3 --- /dev/null +++ b/Help/envvar/CCMAKE_COLORS.rst @@ -0,0 +1,34 @@ +CCMAKE_COLORS +------------- + +Determines what colors are used by the CMake curses interface, +when run on a terminal that supports colors. +The syntax follows the same conventions as ``LS_COLORS``; +that is, a list of key/value pairs separated by ``:``. + +Keys are a single letter corresponding to a CMake cache variable type: + +- ``s``: A ``STRING``. +- ``p``: A ``FILEPATH``. +- ``c``: A value which has an associated list of choices. +- ``y``: A ``BOOL`` which has a true-like value (e.g. ``ON``, ``YES``). +- ``n``: A ``BOOL`` which has a false-like value (e.g. ``OFF``, ``NO``). + +Values are an integer number that specifies what color to use. +``0`` is black (you probably don't want to use that). +Others are determined by your terminal's color support. +Most (color) terminals will support at least 8 or 16 colors. +Some will support up to 256 colors. The colors will likely match +`this chart <https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg>`_, +although the first 16 colors may match the original +`CGA color palette <https://en.wikipedia.org/wiki/Color_Graphics_Adapter#Color_palette>`_. +(Many modern terminal emulators also allow their color palette, +at least for the first 16 colors, to be configured by the user.) + +Note that fairly minimal checking is done for bad colors +(although a value higher than what curses believes your terminal supports +will be silently ignored) or bad syntax. + +For example:: + + CCMAKE_COLORS='s=39:p=220:c=207:n=196:y=46' diff --git a/Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx b/Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx new file mode 100644 index 0000000..ee58556 --- /dev/null +++ b/Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx @@ -0,0 +1,25 @@ +// A simple program that builds a sqrt table +#include <cmath> +#include <fstream> +#include <iostream> + +int main(int argc, char* argv[]) +{ + // make sure we have enough arguments + if (argc < 2) { + return 1; + } + + std::ofstream fout(argv[1], std::ios_base::out); + const bool fileOpen = fout.is_open(); + if (fileOpen) { + fout << "double sqrtTable[] = {" << std::endl; + for (int i = 0; i < 10; ++i) { + fout << sqrt(static_cast<double>(i)) << "," << std::endl; + } + // close the table with a zero + fout << "0};" << std::endl; + fout.close(); + } + return fileOpen ? 0 : 1; // return 0 if wrote the file +} diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst index dfdf415..ee83799 100644 --- a/Help/manual/cmake-env-variables.7.rst +++ b/Help/manual/cmake-env-variables.7.rst @@ -80,3 +80,11 @@ Environment Variables for CTest /envvar/CTEST_PROGRESS_OUTPUT /envvar/CTEST_USE_LAUNCHERS_DEFAULT /envvar/DASHBOARD_TEST_FROM_CTEST + +Environment Variables for the CMake curses interface +==================================================== + +.. toctree:: + :maxdepth: 1 + + /envvar/CCMAKE_COLORS diff --git a/Help/release/dev/FindBLAS-import-target.rst b/Help/release/dev/FindBLAS-import-target.rst new file mode 100644 index 0000000..29d6f0c --- /dev/null +++ b/Help/release/dev/FindBLAS-import-target.rst @@ -0,0 +1,4 @@ +FindBLAS-import-target +---------------------- + +* The :module:`FindBLAS` module now provides an imported target. diff --git a/Help/release/dev/FindLAPACK-import-target.rst b/Help/release/dev/FindLAPACK-import-target.rst new file mode 100644 index 0000000..912d642 --- /dev/null +++ b/Help/release/dev/FindLAPACK-import-target.rst @@ -0,0 +1,4 @@ +FindLAPACK-import-target +------------------------ + +* The :module:`FindLAPACK` module now provides an imported target. diff --git a/Help/release/dev/FindPython-find-implementations.rst b/Help/release/dev/FindPython-find-implementations.rst new file mode 100644 index 0000000..d4f548b --- /dev/null +++ b/Help/release/dev/FindPython-find-implementations.rst @@ -0,0 +1,5 @@ +FindPython-find-implementations +------------------------------- + +* The :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` + modules gained the capability to specify which implementations to search for. diff --git a/Help/release/dev/ccmake-custom-colors.rst b/Help/release/dev/ccmake-custom-colors.rst new file mode 100644 index 0000000..fcabe56 --- /dev/null +++ b/Help/release/dev/ccmake-custom-colors.rst @@ -0,0 +1,5 @@ +ccmake-custom-colors +-------------------- + +* :manual:`ccmake(1)` learned to read a :envvar:`CCMAKE_COLORS` + environment variable to customize colors. |