diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:42:50 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:42:50 +0300 |
| commit | 5fad10f89c485cfdc7b99011f07609f8871160d4 (patch) | |
| tree | 1860b39753b652dfe54d3cbbc80c875f40198d1f /json4cpp/tests/module_cpp20 | |
| parent | 292baed7ac0cf84263263966ed32ed113cae857f (diff) | |
| parent | 9a737481aed085fd289f82dff1fa8c3c66627a7e (diff) | |
| download | Project-Tick-5fad10f89c485cfdc7b99011f07609f8871160d4.tar.gz Project-Tick-5fad10f89c485cfdc7b99011f07609f8871160d4.zip | |
Add 'json4cpp/' from commit '9a737481aed085fd289f82dff1fa8c3c66627a7e'
git-subtree-dir: json4cpp
git-subtree-mainline: 292baed7ac0cf84263263966ed32ed113cae857f
git-subtree-split: 9a737481aed085fd289f82dff1fa8c3c66627a7e
Diffstat (limited to 'json4cpp/tests/module_cpp20')
| -rw-r--r-- | json4cpp/tests/module_cpp20/CMakeLists.txt | 19 | ||||
| -rw-r--r-- | json4cpp/tests/module_cpp20/main.cpp | 14 |
2 files changed, 33 insertions, 0 deletions
diff --git a/json4cpp/tests/module_cpp20/CMakeLists.txt b/json4cpp/tests/module_cpp20/CMakeLists.txt new file mode 100644 index 0000000000..b6d395aaad --- /dev/null +++ b/json4cpp/tests/module_cpp20/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.28) + +project(json_test CXX) + +set(NLOHMANN_JSON_BUILD_MODULES ON CACHE BOOL "Enable nlohmann.json module support") + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_BINARY_DIR}/tests) + +add_executable(json_test main.cpp) +target_link_libraries(json_test + PRIVATE + nlohmann_json_modules +) + +target_compile_definitions(json_test + PRIVATE NLOHMANN_JSON_BUILD_MODULES +) + +target_compile_features(json_test PUBLIC cxx_std_20) diff --git a/json4cpp/tests/module_cpp20/main.cpp b/json4cpp/tests/module_cpp20/main.cpp new file mode 100644 index 0000000000..9a2f3d360f --- /dev/null +++ b/json4cpp/tests/module_cpp20/main.cpp @@ -0,0 +1,14 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ (supporting code) +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + +import nlohmann.json; + +int main() +{ + nlohmann::json j; +} |
