mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-04 04:03:22 +03:00
c++modules: Don't set CMAKE_CXX_STDLIB_MODULES_JSON if the file does not exist
This commit is contained in:
2 files changed
+4
-2
No files matched your search
@@ -26,7 +26,8 @@ function (_cmake_cxx_find_modules_json)
|
||||
RESULT_VARIABLE _clang_libcxx_modules_json_file_res
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
if (_clang_libcxx_modules_json_file_res)
|
||||
if (_clang_libcxx_modules_json_file_res OR
|
||||
NOT EXISTS "${_clang_libcxx_modules_json_file}")
|
||||
set(CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE "Could not find `${_clang_modules_json_impl}.modules.json` resource" PARENT_SCOPE)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
@@ -15,7 +15,8 @@ function (_cmake_cxx_find_modules_json)
|
||||
RESULT_VARIABLE _gnu_libstdcxx_modules_json_file_res
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
if (_gnu_libstdcxx_modules_json_file_res)
|
||||
if (_gnu_libstdcxx_modules_json_file_res OR
|
||||
NOT EXISTS "${_gnu_libstdcxx_modules_json_file}")
|
||||
set(CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE "Could not find `libstdc++.modules.json` resource" PARENT_SCOPE)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
Reference in new issue
Block a user