summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-21 18:36:47 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-08-17 18:42:54 (GMT)
commit80ef50a1919d62acb82a6423c40042a94edeac60 (patch)
tree442684aaaf9c20f1deb0f123359c23d6c18d19fe /Modules
parent80d65443982ca1b2c98c84ae86e2bfccdbdd7678 (diff)
downloadCMake-80ef50a1919d62acb82a6423c40042a94edeac60.zip
CMake-80ef50a1919d62acb82a6423c40042a94edeac60.tar.gz
CMake-80ef50a1919d62acb82a6423c40042a94edeac60.tar.bz2
CXXModules: add a variable for BMI-only compilation
This will be required when dealing with imported targets which contain modules.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/Clang-CXX.cmake1
-rw-r--r--Modules/Compiler/MSVC-CXX.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index a74e90b..1167ba8 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -43,5 +43,6 @@ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
" > <DYNDEP_FILE>")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "clang")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>")
+ set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG "--precompile")
endif()
endif()
diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake
index 10a9073..b03f826 100644
--- a/Modules/Compiler/MSVC-CXX.cmake
+++ b/Modules/Compiler/MSVC-CXX.cmake
@@ -87,4 +87,5 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.34")
set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_DEPFILE_FORMAT "msvc")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "msvc")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>")
+ set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG "-ifcOnly;-ifcOutput;<OBJECT>")
endif ()