mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-06 04:03:27 +03:00
c++modules: Persist CMAKE_CXX_STDLIB_MODULES_JSON
And change checks to look for a value rather than definition. This fix keeps the same set of test cases in `RunCMake.CXXModules` selected as before. Fixes: #27589
This commit is contained in:
1 parent
961ed3f2e9
commit
75a30136a1
4 files changed
+4
-6
No files matched your search
@@ -98,6 +98,4 @@ set(CMAKE_CXX_COMPILER_CLANG_RESOURCE_DIR "@CMAKE_CXX_COMPILER_CLANG_RESOURCE_DI
|
||||
|
||||
set(CMAKE_CXX_COMPILER_IMPORT_STD "@CMAKE_CXX_COMPILER_IMPORT_STD@")
|
||||
set(CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE "@CMAKE_CXX_COMPILER_IMPORT_STD_ERROR_MESSAGE@")
|
||||
if(CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
set(CMAKE_CXX_STDLIB_MODULES_JSON "@CMAKE_CXX_STDLIB_MODULES_JSON@")
|
||||
endif()
|
||||
set(CMAKE_CXX_STDLIB_MODULES_JSON "@CMAKE_CXX_STDLIB_MODULES_JSON@")
|
||||
@@ -8,7 +8,7 @@ function (_cmake_cxx_find_modules_json)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
if (NOT CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
execute_process(
|
||||
COMMAND
|
||||
"${CMAKE_CXX_COMPILER}"
|
||||
|
||||
@@ -4,7 +4,7 @@ function (_cmake_cxx_find_modules_json)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
if (NOT CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
execute_process(
|
||||
COMMAND
|
||||
"${CMAKE_CXX_COMPILER}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function (_cmake_cxx_find_modules_json)
|
||||
if (DEFINED CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
if (CMAKE_CXX_STDLIB_MODULES_JSON)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in new issue
Block a user