OXIESEC PANEL
- Current Dir:
/
/
usr
/
local
/
doc
/
cmake
/
html
/
_sources
/
command
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
04/04/2023 07:10:48 PM
rwxr-xr-x
📄
add_compile_definitions.rst.txt
1.04 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_compile_options.rst.txt
1.31 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_custom_command.rst.txt
20.78 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_custom_target.rst.txt
7.4 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_definitions.rst.txt
1.38 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_dependencies.rst.txt
1 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_executable.rst.txt
4.3 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_library.rst.txt
11.08 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_link_options.rst.txt
1.08 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_subdirectory.rst.txt
2.06 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
add_test.rst.txt
3.25 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
aux_source_directory.rst.txt
1.06 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
block.rst.txt
1.81 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
break.rst.txt
208 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
build_command.rst.txt
1.86 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
build_name.rst.txt
430 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
cmake_host_system_information.rst.txt
11.36 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
cmake_language.rst.txt
18.83 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
cmake_minimum_required.rst.txt
3.19 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
cmake_parse_arguments.rst.txt
4.82 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
cmake_path.rst.txt
25.13 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
cmake_policy.rst.txt
5.56 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
configure_file.rst.txt
5.26 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
continue.rst.txt
362 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
create_test_sourcelist.rst.txt
1.52 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_build.rst.txt
3.23 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_configure.rst.txt
1.66 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_coverage.rst.txt
1.62 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_empty_binary_directory.rst.txt
323 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_memcheck.rst.txt
1.49 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_read_custom_files.rst.txt
332 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_run_script.rst.txt
577 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_sleep.rst.txt
265 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_start.rst.txt
3.12 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_submit.rst.txt
4.01 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_test.rst.txt
10.23 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_update.rst.txt
1.34 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
ctest_upload.rst.txt
678 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
define_property.rst.txt
3.3 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
else.rst.txt
129 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
elseif.rst.txt
194 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
enable_language.rst.txt
1.06 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
enable_testing.rst.txt
474 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
endblock.rst.txt
190 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
endforeach.rst.txt
342 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
endfunction.rst.txt
337 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
endif.rst.txt
300 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
endmacro.rst.txt
319 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
endwhile.rst.txt
317 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
exec_program.rst.txt
958 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
execute_process.rst.txt
6.04 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
export.rst.txt
5.6 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
export_library_dependencies.rst.txt
1.13 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
file.rst.txt
45.8 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
find_file.rst.txt
1.55 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
find_library.rst.txt
3.85 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
find_package.rst.txt
32.47 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
find_path.rst.txt
1.84 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
find_program.rst.txt
1.44 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
fltk_wrap_ui.rst.txt
380 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
foreach.rst.txt
3.57 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
function.rst.txt
2.32 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_cmake_property.rst.txt
766 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_directory_property.rst.txt
1.28 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_filename_component.rst.txt
2.54 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_property.rst.txt
3.46 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_source_file_property.rst.txt
1.96 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_target_property.rst.txt
1.15 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
get_test_property.rst.txt
831 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
if.rst.txt
14.6 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
include.rst.txt
1.06 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
include_directories.rst.txt
1.57 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
include_external_msproject.rst.txt
1.09 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
include_guard.rst.txt
1.8 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
include_regular_expression.rst.txt
571 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
install.rst.txt
43.13 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
install_files.rst.txt
1.39 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
install_programs.rst.txt
1.26 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
install_targets.rst.txt
664 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
link_directories.rst.txt
2.53 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
link_libraries.rst.txt
669 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
list.rst.txt
10.1 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
load_cache.rst.txt
1001 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
load_command.rst.txt
686 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
macro.rst.txt
4.77 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
make_directory.rst.txt
306 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
mark_as_advanced.rst.txt
867 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
math.rst.txt
1.19 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
message.rst.txt
8.12 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
option.rst.txt
615 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
output_required_files.rst.txt
680 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
project.rst.txt
6.16 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
qt_wrap_cpp.rst.txt
829 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
qt_wrap_ui.rst.txt
981 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
remove.rst.txt
306 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
remove_definitions.rst.txt
293 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
return.rst.txt
3.21 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
separate_arguments.rst.txt
2.53 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
set.rst.txt
4.39 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
set_directory_properties.rst.txt
630 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
set_property.rst.txt
4.38 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
set_source_files_properties.rst.txt
1.68 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
set_target_properties.rst.txt
758 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
set_tests_properties.rst.txt
624 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
site_name.rst.txt
304 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
source_group.rst.txt
2.18 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
string.rst.txt
18.51 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
subdir_depends.rst.txt
306 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
subdirs.rst.txt
1.05 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_compile_definitions.rst.txt
2.15 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_compile_features.rst.txt
1.82 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_compile_options.rst.txt
2.13 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_include_directories.rst.txt
3.57 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_link_directories.rst.txt
2.77 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_link_libraries.rst.txt
16.66 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_link_options.rst.txt
2.14 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_precompile_headers.rst.txt
5.6 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
target_sources.rst.txt
7.99 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
try_compile.rst.txt
13.25 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
try_run.rst.txt
5.71 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
unset.rst.txt
1.54 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
use_mangled_mesa.rst.txt
475 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
utility_source.rst.txt
977 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
variable_requires.rst.txt
784 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
variable_watch.rst.txt
1.76 KB
04/04/2023 07:03:28 PM
rw-r--r--
📄
while.rst.txt
891 bytes
04/04/2023 07:03:28 PM
rw-r--r--
📄
write_file.rst.txt
705 bytes
04/04/2023 07:03:28 PM
rw-r--r--
Editing: target_precompile_headers.rst.txt
Close
target_precompile_headers ------------------------- .. versionadded:: 3.16 Add a list of header files to precompile. Precompiling header files can speed up compilation by creating a partially processed version of some header files, and then using that version during compilations rather than repeatedly parsing the original headers. Main Form ^^^^^^^^^ .. code-block:: cmake target_precompile_headers(<target> <INTERFACE|PUBLIC|PRIVATE> [header1...] [<INTERFACE|PUBLIC|PRIVATE> [header2...] ...]) The command adds header files to the :prop_tgt:`PRECOMPILE_HEADERS` and/or :prop_tgt:`INTERFACE_PRECOMPILE_HEADERS` target properties of ``<target>``. The named ``<target>`` must have been created by a command such as :command:`add_executable` or :command:`add_library` and must not be an :ref:`ALIAS target <Alias Targets>`. The ``INTERFACE``, ``PUBLIC`` and ``PRIVATE`` keywords are required to specify the :ref:`scope <Target Usage Requirements>` of the following arguments. ``PRIVATE`` and ``PUBLIC`` items will populate the :prop_tgt:`PRECOMPILE_HEADERS` property of ``<target>``. ``PUBLIC`` and ``INTERFACE`` items will populate the :prop_tgt:`INTERFACE_PRECOMPILE_HEADERS` property of ``<target>`` (:ref:`IMPORTED targets <Imported Targets>` only support ``INTERFACE`` items). Repeated calls for the same ``<target>`` will append items in the order called. Projects should generally avoid using ``PUBLIC`` or ``INTERFACE`` for targets that will be :ref:`exported <install(EXPORT)>`, or they should at least use the :genex:`$<BUILD_INTERFACE:...>` generator expression to prevent precompile headers from appearing in an installed exported target. Consumers of a target should typically be in control of what precompile headers they use, not have precompile headers forced on them by the targets being consumed (since precompile headers are not typically usage requirements). A notable exception to this is where an :ref:`interface library <Interface Libraries>` is created to define a commonly used set of precompile headers in one place and then other targets link to that interface library privately. In this case, the interface library exists specifically to propagate the precompile headers to its consumers and the consumer is effectively still in control, since it decides whether to link to the interface library or not. The list of header files is used to generate a header file named ``cmake_pch.h|xx`` which is used to generate the precompiled header file (``.pch``, ``.gch``, ``.pchi``) artifact. The ``cmake_pch.h|xx`` header file will be force included (``-include`` for GCC, ``/FI`` for MSVC) to all source files, so sources do not need to have ``#include "pch.h"``. Header file names specified with angle brackets (e.g. ``<unordered_map>``) or explicit double quotes (escaped for the :manual:`cmake-language(7)`, 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. For example: .. code-block:: cmake target_precompile_headers(myTarget PUBLIC project_header.h PRIVATE [["other_header.h"]] <unordered_map> ) .. |command_name| replace:: ``target_compile_features`` .. |more_see_also| replace:: The :genex:`$<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 :genex:`$<ANGLE-R>`. For example: .. include:: GENEX_NOTE.txt :start-line: 1 .. 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>>" ) Reusing Precompile Headers ^^^^^^^^^^^^^^^^^^^^^^^^^^ The command also supports a second signature which can be used to specify that one target re-uses a precompiled header file artifact from another target instead of generating its own: .. code-block:: cmake target_precompile_headers(<target> REUSE_FROM <other_target>) This form sets the :prop_tgt:`PRECOMPILE_HEADERS_REUSE_FROM` property to ``<other_target>`` and adds a dependency such that ``<target>`` will depend on ``<other_target>``. CMake will halt with an error if the :prop_tgt:`PRECOMPILE_HEADERS` property of ``<target>`` is already set when the ``REUSE_FROM`` form is used. .. note:: The ``REUSE_FROM`` form requires the same set of compiler options, compiler flags and compiler definitions for both ``<target>`` and ``<other_target>``. Some compilers (e.g. GCC) may issue a warning if the precompiled header file cannot be used (``-Winvalid-pch``). See Also ^^^^^^^^ * To disable precompile headers for specific targets, see the :prop_tgt:`DISABLE_PRECOMPILE_HEADERS` target property. * To prevent precompile headers from being used when compiling a specific source file, see the :prop_sf:`SKIP_PRECOMPILE_HEADERS` source file property. * :command:`target_compile_definitions` * :command:`target_compile_features` * :command:`target_compile_options` * :command:`target_include_directories` * :command:`target_link_libraries` * :command:`target_link_directories` * :command:`target_link_options` * :command:`target_sources`