diff options
author | Brad King <brad.king@kitware.com> | 2023-03-06 13:59:12 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-03-06 08:59:21 -0500 |
commit | 617b8df7cf6da8b73247c2622cde32c9733aa7c8 (patch) | |
tree | 80fee466f4b4b781030045505030f414d56839b6 /Modules/Compiler | |
parent | 0bb5f2be2201b9a0224176ce542f88ec73014b58 (diff) | |
parent | 3fe8e33f278312c7840672ebae4b1e99c69e59bf (diff) | |
download | cmake-617b8df7cf6da8b73247c2622cde32c9733aa7c8.tar.gz |
Merge topic 'clang-16-cxx-modules'
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8285
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/Clang-CXX.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 84b05d7f09..33154fdf11 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -29,3 +29,17 @@ if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC") set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE) endif() endif() + +if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) + string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE + "${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}" + " -format=p1689" + " --" + " <CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS>" + " -x c++ <SOURCE> -c -o <OBJECT>" + " -MT <DYNDEP_FILE>" + " -MD -MF <DEP_FILE>" + " > <DYNDEP_FILE>") + set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "clang") + set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>") +endif () |