|
28 | 28 |
|
29 | 29 | cmake_minimum_required(VERSION 3.14 FATAL_ERROR) |
30 | 30 |
|
31 | | -# the policy allows us to change options without caching |
32 | | -cmake_policy(SET CMP0077 NEW) |
33 | | -set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) |
34 | | - |
35 | | -# the policy allows us to change set(CACHE) without caching |
36 | | -if(POLICY CMP0126) |
37 | | - cmake_policy(SET CMP0126 NEW) |
38 | | - set(CMAKE_POLICY_DEFAULT_CMP0126 NEW) |
39 | | -endif() |
40 | | - |
41 | | -# The policy uses the download time for timestamp, instead of the timestamp in the archive. This |
42 | | -# allows for proper rebuilds when a projects url changes |
43 | | -if(POLICY CMP0135) |
44 | | - cmake_policy(SET CMP0135 NEW) |
45 | | - set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) |
46 | | -endif() |
47 | | - |
48 | 31 | set(CURRENT_CPM_VERSION 1.0.0-development-version) |
49 | 32 |
|
50 | 33 | get_filename_component(CPM_CURRENT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" REALPATH) |
@@ -84,6 +67,23 @@ endif() |
84 | 67 |
|
85 | 68 | set_property(GLOBAL PROPERTY CPM_INITIALIZED true) |
86 | 69 |
|
| 70 | +# the policy allows us to change options without caching |
| 71 | +cmake_policy(SET CMP0077 NEW) |
| 72 | +set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) |
| 73 | + |
| 74 | +# the policy allows us to change set(CACHE) without caching |
| 75 | +if(POLICY CMP0126) |
| 76 | + cmake_policy(SET CMP0126 NEW) |
| 77 | + set(CMAKE_POLICY_DEFAULT_CMP0126 NEW) |
| 78 | +endif() |
| 79 | + |
| 80 | +# The policy uses the download time for timestamp, instead of the timestamp in the archive. This |
| 81 | +# allows for proper rebuilds when a projects url changes |
| 82 | +if(POLICY CMP0135) |
| 83 | + cmake_policy(SET CMP0135 NEW) |
| 84 | + set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) |
| 85 | +endif() |
| 86 | + |
87 | 87 | option(CPM_USE_LOCAL_PACKAGES "Always try to use `find_package` to get dependencies" |
88 | 88 | $ENV{CPM_USE_LOCAL_PACKAGES} |
89 | 89 | ) |
|
0 commit comments