The "cmake" executable is the CMake command-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified on the command line with the -D option. The -i option will cause cmake to interactively prompt for such settings.
download_extract_timestamp cmake
Download Zip
https://0ilibinke.blogspot.com/?lk=2wZKRR
CMake requires that projects specify the version of CMake to which they have been written. This policy has been put in place so users trying to build the project may be told when they need to update their CMake. Specifying a version also helps the project build with CMake versions newer than that specified. Use the cmake_minimum_required command at the top of your main CMakeLists.txt file:
where "." is the version of CMake you want to support (such as "2.6"). The command will ensure that at least the given version of CMake is running and help newer versions be compatible with the project. See documentation of cmake_minimum_required for details.
Note that the command invocation must appear in the CMakeLists.txt file itself; a call in an included file is not sufficient. However, the cmake_policy command may be called to set policy CMP0000 to OLD or NEW behavior explicitly. The OLD behavior is to silently ignore the missing invocation. The NEW behavior is to issue an error instead of a warning. An included file may set CMP0000 explicitly to affect how this policy is enforced for the main CMakeLists.txt file.
In CMake 2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was used to request compatibility with earlier versions of CMake. In CMake 2.6 and above all compatibility issues are handled by policies and the cmake_policy command. However, CMake must still check CMAKE_BACKWARDS_COMPATIBILITY for projects written for CMake 2.4 and below.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by the include() and find_package() commands would affect the includer. Explicit invocations of cmake_policy(PUSH) and cmake_policy(POP) were required to isolate policy changes and protect the includer. While some scripts intend to affect the policies of their includer, most do not. In CMake 2.6.3 and above, include() and find_package() by default PUSH and POP an entry on the policy stack around an included script, but provide a NO_POLICY_SCOPE option to disable it. This policy determines whether or not to imply NO_POLICY_SCOPE for compatibility. The OLD behavior for this policy is to imply NO_POLICY_SCOPE for include() and find_package() commands. The NEW behavior for this policy is to allow the commands to do their default cmake_policy PUSH and POP.
Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e. located in the CMake module directory) calls include() or find_package(), the files located in the the CMake module directory are prefered over the files in CMAKE_MODULE_PATH. This makes sure that the modules belonging to CMake always get those files included which they expect, and against which they were developed and tested. In call other cases, the files found in CMAKE_MODULE_PATH still take precedence over the ones in the CMake module directory. The OLD behaviour is to always prefer files from CMAKE_MODULE_PATH over files from the CMake modules directory.
For help and discussion about using cmake, a mailing list is provided at cmake
cmake.org. The list is member-post-only but one may sign up on the CMake web page. Please first read the full documentation at before posting questions to the list.
Policies in CMake are used to preserve backward compatible behavior across multiple releases. When a new policy is introduced, newer CMake versions will begin to warn about the backward compatible behavior. It is possible to disable the warning by explicitly requesting the OLD, or backward compatible behavior using the cmake_policy() command. It is also possible to request NEW, or non-backward compatible behavior for a policy, also avoiding the warning. Each policy can also be set to either NEW or OLD behavior explicitly on the command line with the CMAKE_POLICY_DEFAULT_CMP variable.
The cmake_minimum_required() command does more than report an error if a too-old version of CMake is used to build a project. It also sets all policies introduced in that CMake version or earlier to NEW behavior. To manage policies without increasing the minimum required CMake version, the if(POLICY) command may be used:
The setting of a policy is confined in some cases to not propagate to the parent scope. For example, if the files read by the include() command or the find_package() command contain a use of cmake_policy(), that policy setting will not affect the caller by default. Both commands accept an optional NO_POLICY_SCOPE keyword to control this behavior.
This policy was introduced in CMake version 3.27. Use the cmake_policy() command to set it to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn when this policy is not set and simply uses OLD behavior.
This policy was introduced in CMake version 3.27. CMake version 3.27.7 warns when a relative path is encountered and the policy is not set, falling back to using OLD behavior. Use the cmake_policy() command to set it to OLD or NEW explicitly.
This policy was introduced in CMake version 3.27. CMake version 3.27.7 warns when the policy is not set and uses OLD behavior. Use the cmake_policy() command to set it to OLD or NEW explicitly.
This policy provides compatibility with projects that have not been updated to expect enabling of folders. Enabling folders causes projects to appear differently in IDEs. The policy was introduced in CMake version 3.26. Use the cmake_policy() command to set it to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn when this policy is not set and simply uses OLD behavior.
This policy was introduced in CMake version 3.25. Use the cmake_policy() command to set it to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn when this policy is not set and simply uses OLD behavior.
This policy was introduced in CMake version 3.25. CMake version 3.27.7 warns when the policy is not set and uses OLD behavior. Use the cmake_policy() command to set it to OLD or NEW explicitly.
This policy was introduced in CMake version 3.24. CMake version 3.27.7 warns when the policy is not set and uses OLD behavior. Use the cmake_policy() command to set it to OLD or NEW explicitly.
This policy was introduced in CMake version 3.24. Use the cmake_policy() command to set it to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn when this policy is not set and simply uses OLD behavior.
This policy was introduced in CMake version 3.24. Use the cmake_policy() command to set this policy to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn by default when this policy is not set and simply uses OLD behavior.
This policy was introduced in CMake version 3.24. Use the cmake_policy() command to set this policy to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn when this policy is not set and simply uses OLD behavior.
This policy was introduced in CMake version 3.24. Use the cmake_policy() command to set this policy to OLD or NEW explicitly. Unlike many policies, CMake version 3.27.7 does not warn by default when this policy is not set and simply uses OLD behavior. See documentation of the CMAKE_POLICY_WARNING_CMP0133 variable to control the warning.
35fe9a5643