mirror of
https://github.com/nlohmann/json.git
synced 2026-11-13 15:35:23 +00:00
Use CMake 4.5's stable import std support in the module test
CMake 4.5 makes `import std` available to every target that scans for C++ modules and drops the experimental CMAKE_EXPERIMENTAL_CXX_IMPORT_STD gate and the CXX_MODULE_STD property. The module test no longer needs the version-specific opt-in token, so the ci_module_cpp20 jobs no longer have to pin CMake 4.3.4 and now request CMake ^4.5.0. The modules, CMake and README documentation now list the CMake, generator and toolchain requirements for building the module and for `import std;`. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
7 files changed
+30
-24
No files matched your search
@@ -17,8 +17,8 @@ using namespace nlohmann::literals;
|
||||
// Standard-library facilities are pulled in via `import std;` rather than
|
||||
// textual `#include`s: mixing `import` with textual standard headers does not
|
||||
// compile under GCC's C++20 modules implementation, whereas `import std;` works
|
||||
// across GCC, Clang, and MSVC. This requires C++23 and CMake's (experimental)
|
||||
// import-std support; see CMakeLists.txt.
|
||||
// across GCC, Clang, and MSVC. This requires C++23 and CMake 4.5 or newer;
|
||||
// see CMakeLists.txt.
|
||||
int main()
|
||||
{
|
||||
// basic_json / json: parsing and value access
|
||||
|
||||
Reference in new issue
Block a user