Skip to content

Commit 5a79a30

Browse files
authored
1.0 code complete (#1)
* wip * wip * wip: mostly done with initial tests * v1.0 tests implemented * wip: adding examples * add examples to test * examples entered. * update help * get rid of inapplicable message * fix literal encoding for Win
1 parent faa2a94 commit 5a79a30

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10206
-345
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ Thumbs.db
5959
callgrind.out.*
6060

6161

62+
# Ignore everything in tests/data
63+
tests/data/*
64+
65+
# Allow tests/data/inputs and its contents
66+
!tests/data/inputs/
67+
!tests/data/inputs/**
68+
69+
# Explicitly exclude unwanted files in tests/data/inputs
70+
tests/data/inputs/**/.DS_Store

cmake/GenerateMnxSchemaXxd.cmake

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,16 @@
11
# GenerateMnxSchemaXxd.cmake
22

33
# Define the paths
4-
set(MNX_SCHEMA_JSON "${CMAKE_BINARY_DIR}/third_party/mnx-schema.json")
4+
set(MNX_SCHEMA_DIR "${CMAKE_SOURCE_DIR}/schema")
5+
set(MNX_SCHEMA_JSON "${MNX_SCHEMA_DIR}/mnx-schema.json")
56
set(GENERATED_MNX_XXD "${GENERATED_DIR}/mnx_schema.xxd")
6-
set(MNX_SCHEMA_URL "https://w3c.github.io/mnx/docs/mnx-schema.json")
7-
8-
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/third_party")
9-
10-
# Only download if the file doesn't exist
11-
if(NOT EXISTS "${MNX_SCHEMA_JSON}")
12-
message(STATUS "Downloading ${MNX_SCHEMA_URL}...")
13-
execute_process(
14-
COMMAND curl --fail --location --output "${MNX_SCHEMA_JSON}" "${MNX_SCHEMA_URL}"
15-
RESULT_VARIABLE download_result
16-
OUTPUT_QUIET
17-
ERROR_QUIET
18-
)
19-
20-
if(NOT download_result EQUAL 0)
21-
message(FATAL_ERROR "Failed to download ${MNX_SCHEMA_URL}")
22-
else()
23-
message(STATUS "Downloaded ${MNX_SCHEMA_URL} to ${MNX_SCHEMA_JSON}")
24-
endif()
25-
else()
26-
message(STATUS "Schema file already exists; skipping download.")
27-
endif()
287

298
# Step 2: Convert mnx-schema.json to mnx_schema.xxd
309
add_custom_command(
3110
OUTPUT "${CMAKE_BINARY_DIR}/generated/mnx_schema.xxd"
3211
COMMAND ${CMAKE_COMMAND} -E echo "Generating mnx_schema.xxd..."
3312
COMMAND ${CMAKE_COMMAND} -E make_directory "${GENERATED_DIR}"
34-
COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_BINARY_DIR}/third_party"
13+
COMMAND ${CMAKE_COMMAND} -E chdir "${MNX_SCHEMA_DIR}"
3514
xxd -i "mnx-schema.json" > "${GENERATED_MNX_XXD}"
3615
DEPENDS "${MNX_SCHEMA_JSON}"
3716
COMMENT "Converting mnx-schema.json to mnx_schema.xxd"

0 commit comments

Comments
 (0)