diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-08 22:00:37 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-12-02 18:04:34 (GMT) |
commit | 0b333de923f8e9d3d8a0916a351840ccf81f4d37 (patch) | |
tree | e88f7f4a2e56dc8ea714ce76096b3c7efef52856 /.gitlab | |
parent | 21b9fb1e8c7348ac4493f4fc245a3c5c5828d2d3 (diff) | |
download | CMake-0b333de923f8e9d3d8a0916a351840ccf81f4d37.zip CMake-0b333de923f8e9d3d8a0916a351840ccf81f4d37.tar.gz CMake-0b333de923f8e9d3d8a0916a351840ccf81f4d37.tar.bz2 |
ci: add C++ module rules file for Clang
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/cxx_modules_rules_clang.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.gitlab/ci/cxx_modules_rules_clang.cmake b/.gitlab/ci/cxx_modules_rules_clang.cmake new file mode 100644 index 0000000..9d75880 --- /dev/null +++ b/.gitlab/ci/cxx_modules_rules_clang.cmake @@ -0,0 +1,16 @@ +set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3") + +set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) +string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE + "${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}" + " -format=p1689 --p1689-targeted-file-name=<SOURCE> --p1689-targeted-output=<OBJECT> --" + " <DEFINES> <INCLUDES> <FLAGS> -x c++ <SOURCE>" + " > <DYNDEP_FILE>") +# No support for `-MF` discovered dependencies in `clang-scan-deps`. +set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_DEPFILE_FORMAT "none") +set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "clang") +set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>") + +# Default to C++ extensions being off. Clang's modules support have trouble +# with extensions right now. +set(CMAKE_CXX_EXTENSIONS OFF) |