SM0 She11
Path:
/
/
usr
/
share
/
cmake3
/
Help
/
command
Full Path (server): /usr/share/cmake3/Help/command
Create Fil3
Upl04d Fil3
📄 FIND_XXX.txt
[E]
[D]
[R]
📄 FIND_XXX_ORDER.txt
[E]
[D]
[R]
📄 FIND_XXX_ROOT.txt
[E]
[D]
[R]
📄 LINK_OPTIONS_LINKER.txt
[E]
[D]
[R]
📄 OPTIONS_SHELL.txt
[E]
[D]
[R]
📄 add_compile_definitions.rst
[E]
[D]
[R]
📄 add_compile_definitions.rst.rename
[E]
[D]
[R]
📄 add_compile_options.rst
[E]
[D]
[R]
📄 add_compile_options.rst.rename
[E]
[D]
[R]
📄 add_custom_command.rst
[E]
[D]
[R]
📄 add_custom_command.rst.rename
[E]
[D]
[R]
📄 add_custom_target.rst
[E]
[D]
[R]
📄 add_custom_target.rst.rename
[E]
[D]
[R]
📄 add_definitions.rst
[E]
[D]
[R]
📄 add_definitions.rst.rename
[E]
[D]
[R]
📄 add_dependencies.rst
[E]
[D]
[R]
📄 add_executable.rst
[E]
[D]
[R]
📄 add_executable.rst.rename
[E]
[D]
[R]
📄 add_library.rst
[E]
[D]
[R]
📄 add_library.rst.rename
[E]
[D]
[R]
📄 add_link_options.rst
[E]
[D]
[R]
📄 add_link_options.rst.rename
[E]
[D]
[R]
📄 add_subdirectory.rst
[E]
[D]
[R]
📄 add_test.rst
[E]
[D]
[R]
📄 add_test.rst.rename
[E]
[D]
[R]
📄 aux_source_directory.rst
[E]
[D]
[R]
📄 break.rst
[E]
[D]
[R]
📄 build_command.rst
[E]
[D]
[R]
📄 build_command.rst.rename
[E]
[D]
[R]
📄 build_name.rst
[E]
[D]
[R]
📄 cmake_host_system_information.rst
[E]
[D]
[R]
📄 cmake_minimum_required.rst
[E]
[D]
[R]
📄 cmake_parse_arguments.rst
[E]
[D]
[R]
📄 cmake_policy.rst
[E]
[D]
[R]
📄 cmake_policy.rst.rename
[E]
[D]
[R]
📄 configure_file.rst
[E]
[D]
[R]
📄 continue.rst
[E]
[D]
[R]
📄 create_test_sourcelist.rst
[E]
[D]
[R]
📄 ctest_build.rst
[E]
[D]
[R]
📄 ctest_build.rst.rename
[E]
[D]
[R]
📄 ctest_configure.rst
[E]
[D]
[R]
📄 ctest_coverage.rst
[E]
[D]
[R]
📄 ctest_empty_binary_directory.rst
[E]
[D]
[R]
📄 ctest_memcheck.rst
[E]
[D]
[R]
📄 ctest_read_custom_files.rst
[E]
[D]
[R]
📄 ctest_read_custom_files.rst.rename
[E]
[D]
[R]
📄 ctest_run_script.rst
[E]
[D]
[R]
📄 ctest_sleep.rst
[E]
[D]
[R]
📄 ctest_start.rst
[E]
[D]
[R]
📄 ctest_submit.rst
[E]
[D]
[R]
📄 ctest_test.rst
[E]
[D]
[R]
📄 ctest_test.rst.rename
[E]
[D]
[R]
📄 ctest_update.rst
[E]
[D]
[R]
📄 ctest_upload.rst
[E]
[D]
[R]
📄 define_property.rst
[E]
[D]
[R]
📄 else.rst
[E]
[D]
[R]
📄 elseif.rst
[E]
[D]
[R]
📄 enable_language.rst
[E]
[D]
[R]
📄 enable_testing.rst
[E]
[D]
[R]
📄 endforeach.rst
[E]
[D]
[R]
📄 endfunction.rst
[E]
[D]
[R]
📄 endif.rst
[E]
[D]
[R]
📄 endmacro.rst
[E]
[D]
[R]
📄 endwhile.rst
[E]
[D]
[R]
📄 exec_program.rst
[E]
[D]
[R]
📄 execute_process.rst
[E]
[D]
[R]
📄 export.rst
[E]
[D]
[R]
📄 export_library_dependencies.rst
[E]
[D]
[R]
📄 file.rst
[E]
[D]
[R]
📄 file.rst.rename
[E]
[D]
[R]
📄 find_file.rst
[E]
[D]
[R]
📄 find_library.rst
[E]
[D]
[R]
📄 find_package.rst
[E]
[D]
[R]
📄 find_package.rst.rename
[E]
[D]
[R]
📄 find_path.rst
[E]
[D]
[R]
📄 find_program.rst
[E]
[D]
[R]
📄 fltk_wrap_ui.rst
[E]
[D]
[R]
📄 foreach.rst
[E]
[D]
[R]
📄 function.rst
[E]
[D]
[R]
📄 get_cmake_property.rst
[E]
[D]
[R]
📄 get_cmake_property.rst.rename
[E]
[D]
[R]
📄 get_directory_property.rst
[E]
[D]
[R]
📄 get_filename_component.rst
[E]
[D]
[R]
📄 get_property.rst
[E]
[D]
[R]
📄 get_source_file_property.rst
[E]
[D]
[R]
📄 get_target_property.rst
[E]
[D]
[R]
📄 get_test_property.rst
[E]
[D]
[R]
📄 if.rst
[E]
[D]
[R]
📄 include.rst
[E]
[D]
[R]
📄 include_directories.rst
[E]
[D]
[R]
📄 include_directories.rst.rename
[E]
[D]
[R]
📄 include_external_msproject.rst
[E]
[D]
[R]
📄 include_guard.rst
[E]
[D]
[R]
📄 include_regular_expression.rst
[E]
[D]
[R]
📄 install.rst
[E]
[D]
[R]
📄 install.rst.rename
[E]
[D]
[R]
📄 install_files.rst
[E]
[D]
[R]
📄 install_programs.rst
[E]
[D]
[R]
📄 install_targets.rst
[E]
[D]
[R]
📄 link_directories.rst
[E]
[D]
[R]
📄 link_directories.rst.rename
[E]
[D]
[R]
📄 link_libraries.rst
[E]
[D]
[R]
📄 list.rst
[E]
[D]
[R]
📄 list.rst.rename
[E]
[D]
[R]
📄 load_cache.rst
[E]
[D]
[R]
📄 load_command.rst
[E]
[D]
[R]
📄 macro.rst
[E]
[D]
[R]
📄 make_directory.rst
[E]
[D]
[R]
📄 mark_as_advanced.rst
[E]
[D]
[R]
📄 math.rst
[E]
[D]
[R]
📄 message.rst
[E]
[D]
[R]
📄 option.rst
[E]
[D]
[R]
📄 output_required_files.rst
[E]
[D]
[R]
📄 project.rst
[E]
[D]
[R]
📄 qt_wrap_cpp.rst
[E]
[D]
[R]
📄 qt_wrap_ui.rst
[E]
[D]
[R]
📄 remove.rst
[E]
[D]
[R]
📄 remove_definitions.rst
[E]
[D]
[R]
📄 return.rst
[E]
[D]
[R]
📄 separate_arguments.rst
[E]
[D]
[R]
📄 set.rst
[E]
[D]
[R]
📄 set.rst.rename
[E]
[D]
[R]
📄 set_directory_properties.rst
[E]
[D]
[R]
📄 set_property.rst
[E]
[D]
[R]
📄 set_property.rst.rename
[E]
[D]
[R]
📄 set_source_files_properties.rst
[E]
[D]
[R]
📄 set_target_properties.rst
[E]
[D]
[R]
📄 set_tests_properties.rst
[E]
[D]
[R]
📄 set_tests_properties.rst.rename
[E]
[D]
[R]
📄 site_name.rst
[E]
[D]
[R]
📄 source_group.rst
[E]
[D]
[R]
📄 string.rst
[E]
[D]
[R]
📄 string.rst.rename
[E]
[D]
[R]
📄 subdir_depends.rst
[E]
[D]
[R]
📄 subdirs.rst
[E]
[D]
[R]
📄 target_compile_definitions.rst
[E]
[D]
[R]
📄 target_compile_definitions.rst.rename
[E]
[D]
[R]
📄 target_compile_features.rst
[E]
[D]
[R]
📄 target_compile_features.rst.rename
[E]
[D]
[R]
📄 target_compile_options.rst
[E]
[D]
[R]
📄 target_compile_options.rst.rename
[E]
[D]
[R]
📄 target_include_directories.rst
[E]
[D]
[R]
📄 target_include_directories.rst.rename
[E]
[D]
[R]
📄 target_link_directories.rst
[E]
[D]
[R]
📄 target_link_directories.rst.rename
[E]
[D]
[R]
📄 target_link_libraries.rst
[E]
[D]
[R]
📄 target_link_libraries.rst.rename
[E]
[D]
[R]
📄 target_link_options.rst
[E]
[D]
[R]
📄 target_link_options.rst.rename
[E]
[D]
[R]
📄 target_precompile_headers.rst
[E]
[D]
[R]
📄 target_sources.rst
[E]
[D]
[R]
📄 target_sources.rst.rename
[E]
[D]
[R]
📄 try_compile.rst
[E]
[D]
[R]
📄 try_compile.rst.rename
[E]
[D]
[R]
📄 try_run.rst
[E]
[D]
[R]
📄 try_run.rst.rename
[E]
[D]
[R]
📄 unset.rst
[E]
[D]
[R]
📄 unset.rst.rename
[E]
[D]
[R]
📄 use_mangled_mesa.rst
[E]
[D]
[R]
📄 utility_source.rst
[E]
[D]
[R]
📄 variable_requires.rst
[E]
[D]
[R]
📄 variable_watch.rst
[E]
[D]
[R]
📄 while.rst
[E]
[D]
[R]
📄 write_file.rst
[E]
[D]
[R]
Editing: function.rst
function -------- Start recording a function for later invocation as a command. .. code-block:: cmake function(<name> [<arg1> ...]) <commands> endfunction() Defines a function named ``<name>`` that takes arguments named ``<arg1>``, ... The ``<commands>`` in the function definition are recorded; they are not executed until the function is invoked. Per legacy, the :command:`endfunction` command admits an optional ``<name>`` argument. If used, it must be a verbatim repeat of the argument of the opening ``function`` command. A function opens a new scope: see :command:`set(var PARENT_SCOPE)` for details. See the :command:`cmake_policy()` command documentation for the behavior of policies inside functions. See the :command:`macro()` command documentation for differences between CMake functions and macros. Invocation ^^^^^^^^^^ The function invocation is case-insensitive. A function defined as .. code-block:: cmake function(foo) <commands> endfunction() can be invoked through any of .. code-block:: cmake foo() Foo() FOO() and so on. However, it is strongly recommended to stay with the case chosen in the function definition. Typically functions use all-lowercase names. Arguments ^^^^^^^^^ When the function is invoked, the recorded ``<commands>`` are first modified by replacing formal parameters (``${arg1}``, ...) with the arguments passed, and then invoked as normal commands. In addition to referencing the formal parameters you can reference the ``ARGC`` variable which will be set to the number of arguments passed into the function as well as ``ARGV0``, ``ARGV1``, ``ARGV2``, ... which will have the actual values of the arguments passed in. This facilitates creating functions with optional arguments. Furthermore, ``ARGV`` holds the list of all arguments given to the function and ``ARGN`` holds the list of arguments past the last expected argument. Referencing to ``ARGV#`` arguments beyond ``ARGC`` have undefined behavior. Checking that ``ARGC`` is greater than ``#`` is the only way to ensure that ``ARGV#`` was passed to the function as an extra argument.
Save