Skip to content

Commit 1f39b95

Browse files
authored
Upgrade to CMake 3.21 (#266)
1 parent 2dbbc78 commit 1f39b95

File tree

5 files changed

+7
-23
lines changed

5 files changed

+7
-23
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
cmake_minimum_required (VERSION 3.20)
4+
cmake_minimum_required (VERSION 3.21)
55

66
set(DIRECTXMATH_VERSION 3.20)
77

CMakePresets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": 2,
2+
"version": 3,
33
"configurePresets": [
44
{
55
"name": "base",
@@ -8,7 +8,7 @@
88
"generator": "Ninja",
99
"hidden": true,
1010
"binaryDir": "${sourceDir}/out/build/${presetName}",
11-
"cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" }
11+
"installDir": "${sourceDir}/out/install/${presetName}"
1212
},
1313

1414
{

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ FOR SECURITY ADVISORIES, see [GitHub](https://github.com/microsoft/DirectXMath/s
8989

9090
For a full change history, see [CHANGELOG.md](https://github.com/microsoft/DirectXMath/blob/main/CHANGELOG.md).
9191

92+
* The CMake projects require 3.21 or later. VS 2019 users will need to install a standalone version of CMake 3.21 or later and add it to their PATH.
93+
9294
* The clang/LLVM toolset currently does not respect the ``float_control`` pragma for SSE instrinsics. Therefore, the use of ``/fp:fast`` is not recommended on clang/LLVM until this issue is fixed. See [55713](https://github.com/llvm/llvm-project/issues/55713).
9395

9496
## Support

SHMath/CMakeLists.txt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
cmake_minimum_required (VERSION 3.20)
4+
cmake_minimum_required (VERSION 3.21)
55

66
if(DEFINED DIRECTXMATH_VERSION)
77
set(SHMATH_VERSION ${DIRECTXMATH_VERSION})
@@ -15,15 +15,6 @@ project(DirectXSH
1515
HOMEPAGE_URL "https://go.microsoft.com/fwlink/?LinkID=615560"
1616
LANGUAGES CXX)
1717

18-
if(CMAKE_VERSION VERSION_LESS 3.21)
19-
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
20-
if(not_top)
21-
set(PROJECT_IS_TOP_LEVEL false)
22-
else()
23-
set(PROJECT_IS_TOP_LEVEL true)
24-
endif()
25-
endif()
26-
2718
if(PROJECT_IS_TOP_LEVEL)
2819
message(FATAL_ERROR "SHMath should be built by the main CMakeLists using BUILD_SHMATH")
2920
endif()

XDSP/CMakeLists.txt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
cmake_minimum_required (VERSION 3.20)
4+
cmake_minimum_required (VERSION 3.21)
55

66
if(DEFINED DIRECTXMATH_VERSION)
77
set(XDSP_VERSION ${DIRECTXMATH_VERSION})
@@ -15,15 +15,6 @@ project(XDSP
1515
HOMEPAGE_URL "https://go.microsoft.com/fwlink/?LinkID=615560"
1616
LANGUAGES CXX)
1717

18-
if(CMAKE_VERSION VERSION_LESS 3.21)
19-
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
20-
if(not_top)
21-
set(PROJECT_IS_TOP_LEVEL false)
22-
else()
23-
set(PROJECT_IS_TOP_LEVEL true)
24-
endif()
25-
endif()
26-
2718
if(PROJECT_IS_TOP_LEVEL)
2819
message(FATAL_ERROR "XSDP should be built by the main CMakeLists using BUILD_XDSP")
2920
endif()

0 commit comments

Comments
 (0)