Files
whetstone_DSL/editor/CMakeLists.txt
Bill 665c96b648 Sprint 2 Step 6: JSON deserialization and round-trip verification
fromJson(json) reconstructs heap-allocated AST from JSON. createNode factory
handles all 33 concepts. deleteTree for cleanup. Test verifies save→load→save
produces byte-identical JSON for the full Calculator model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 19:14:45 -07:00

36 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(WhetstoneEditor LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# nlohmann/json (header-only, fetched once)
include(FetchContent)
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(json)
add_executable(step1_test tests/step1_test.cpp)
target_include_directories(step1_test PRIVATE src)
add_executable(step2_test tests/step2_test.cpp)
target_include_directories(step2_test PRIVATE src)
add_executable(step3_test tests/step3_test.cpp)
target_include_directories(step3_test PRIVATE src)
add_executable(step4_test tests/step4_test.cpp)
target_include_directories(step4_test PRIVATE src)
add_executable(step5_test tests/step5_test.cpp)
target_include_directories(step5_test PRIVATE src)
target_link_libraries(step5_test PRIVATE nlohmann_json::nlohmann_json)
add_executable(step6_test tests/step6_test.cpp)
target_include_directories(step6_test PRIVATE src)
target_link_libraries(step6_test PRIVATE nlohmann_json::nlohmann_json)