Skip to content

Commit 3b07058

Browse files
authored
[libc++][modules] Adds CMake 3.28 support. (#75700)
This is a preparation to start using CMake 3.28 in the CI.
1 parent f888e73 commit 3b07058

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

libcxx/modules/CMakeLists.txt.in

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ cmake_minimum_required(VERSION 3.26)
33
project(libc++-modules LANGUAGES CXX)
44

55
# Enable CMake's module support
6-
if(CMAKE_VERSION VERSION_LESS "3.27.0")
7-
set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a")
6+
if(CMAKE_VERSION VERSION_LESS "3.28.0")
7+
if(CMAKE_VERSION VERSION_LESS "3.27.0")
8+
set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a")
9+
else()
10+
set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7")
11+
endif()
12+
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
813
else()
9-
set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7")
14+
cmake_policy(VERSION 3.28)
1015
endif()
11-
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
1216

1317
# Default to C++ extensions being off. Libc++'s modules support have trouble
1418
# with extensions right now.

0 commit comments

Comments
 (0)