Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 24b4ab9

Browse files
committed
modeling: remove support for Dia and JSON
1 parent 676bad8 commit 24b4ab9

File tree

54 files changed

+2
-48312
lines changed

Some content is hidden

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

54 files changed

+2
-48312
lines changed

CMakeLists.txt

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -393,40 +393,7 @@ if (DOGEN_CLI_EXECUTABLE)
393393
set(DOGEN_GENERATION_OPTIONS --output-directory ${projects_dir}/)
394394
endif()
395395

396-
if (WITH_JSON_VALIDATION)
397-
add_custom_target(iaj)
398-
add_custom_target(vaj)
399-
400-
add_dependencies(iaj indent_all_json)
401-
add_dependencies(vaj indent_all_json)
402-
endif()
403-
404-
#
405-
# benchmarks
406-
#
407-
if(NOT UNIX)
408-
set(WITH_BENCHMARKS "off")
409-
endif()
410-
411-
if(WITH_BENCHMARKS)
412-
set(benchmark_repeats "20")
413-
set(benchmark_command "${CMAKE_SOURCE_DIR}/build/scripts/benchmark.linux.sh")
414-
set(benchmark_directory "${stage_test_data_dir}/benchmarks/actual")
415-
set(benchmark_prefix "")
416-
if(NOT EXISTS "${benchmark_directory}")
417-
make_directory("${benchmark_directory}")
418-
endif()
419-
420-
add_custom_target(benchmark_stats)
421-
add_custom_target(benchmark_all)
422-
add_custom_target(ba)
423-
add_dependencies(ba benchmark_all)
424-
425-
add_custom_target(benchmark_dia)
426-
add_custom_target(benchmark_json)
427-
add_custom_target(benchmark_org)
428-
add_dependencies(benchmark_all benchmark_dia)
429-
endif()
396+
set(WITH_BENCHMARKS "off")
430397

431398
#
432399
# include all sub directories

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ or its abbreviation ```rat```.
4343
## Regenerating Models
4444

4545
If you'd like to run Dogen to regenerate all models, you can do so by using the
46-
target ```generate_all_dia``` or its abbreviation ```gad```. This is useful, for
46+
target ```generate_all_org``` or its abbreviation ```gao```. This is useful, for
4747
example, to update the Reference Implementation to the latest version of Dogen,
4848
or just to see how Dogen works. However, note that Dogen must be on the path for
4949
the target to become available. If you installed Dogen via a package, it's
@@ -58,9 +58,6 @@ After regeneration, you can then use ```git diff``` to inspect the differences
5858
produced by regeneration, if any. The build directory contains all of the logs,
5959
under the directory ```log```.
6060

61-
If you'd like to regenerate ODB code, you can use the target ```odb_all``` or
62-
the abbreviated target ```oa```. Note that
63-
6461
# Test Models
6562

6663
The Reference Implementation is composed of a number of test models. These can

projects/cpp_ref_impl.models/CMakeLists.txt

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -17,79 +17,8 @@
1717
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1818
# MA 02110-1301, USA.
1919
#
20-
set(input_dir "json")
21-
set(output_dir "${CMAKE_CURRENT_SOURCE_DIR}/json")
22-
set(folder "${CMAKE_CURRENT_SOURCE_DIR}/json")
23-
if (WITH_JSON_VALIDATION)
24-
set(files "")
2520

26-
file(GLOB_RECURSE files RELATIVE
27-
"${CMAKE_CURRENT_SOURCE_DIR}/${input_dir}"
28-
"${CMAKE_CURRENT_SOURCE_DIR}/${input_dir}/*.json")
29-
30-
set(target "models.json")
31-
add_custom_target(validate_${target})
32-
add_dependencies(validate_all_json validate_${target})
33-
34-
add_custom_target(indent_${target})
35-
add_dependencies(indent_all_json indent_${target})
36-
37-
foreach(file ${files})
38-
add_custom_target(validate_${file}
39-
COMMENT "Validating JSON for ${target}/${file}."
40-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
41-
COMMAND ${JQ_COMMAND} . ${folder}/${file} > /dev/null)
42-
add_dependencies(validate_${target} validate_${file})
43-
44-
add_custom_target(indent_${file}
45-
COMMENT "Indenting JSON for ${target}/${file}."
46-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
47-
COMMAND ${JQ_COMMAND} . ${folder}/${file} > ${folder}/${file}_tmp
48-
COMMAND mv ${folder}/${file}_tmp ${folder}/${file})
49-
add_dependencies(indent_${target} indent_${file})
50-
51-
endforeach()
52-
endif()
53-
54-
#
55-
# Conversion targets
56-
#
5721
if (DOGEN_CLI_EXECUTABLE)
58-
#
59-
# Model conversion
60-
#
61-
file(GLOB models "dia/*.dia")
62-
foreach(model ${models})
63-
set(model_name "")
64-
get_filename_component(model_name ${model} NAME)
65-
66-
set(output_dir "${CMAKE_CURRENT_SOURCE_DIR}/json")
67-
set(destination_name ${output_dir}/${model_name})
68-
string(REGEX REPLACE ".dia$" ".json" destination_name
69-
${destination_name})
70-
71-
add_custom_target(convert_${model_name}_json
72-
COMMENT "Converting ${model_name} to JSON."
73-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
74-
COMMAND ${DOGEN_CLI_EXECUTABLE} convert
75-
--source ${model} --destination ${destination_name}
76-
${DOGEN_COMMON_OPTIONS})
77-
add_dependencies(convert_all_json convert_${model_name}_json)
78-
79-
set(output_dir "${CMAKE_CURRENT_SOURCE_DIR}/org")
80-
set(destination_name ${output_dir}/${model_name})
81-
string(REGEX REPLACE ".dia$" ".org" destination_name
82-
${destination_name})
83-
84-
add_custom_target(convert_${model_name}_org
85-
COMMENT "Converting ${model_name} to org-mode."
86-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
87-
COMMAND ${DOGEN_CLI_EXECUTABLE} convert
88-
--source ${model} --destination ${destination_name}
89-
${DOGEN_COMMON_OPTIONS})
90-
add_dependencies(convert_all_org convert_${model_name}_org)
91-
endforeach()
92-
9322
# input models
9423
set(models cpp_ref_impl.directory_settings)
9524
set(models ${models} cpp_ref_impl.northwind)
@@ -122,6 +51,4 @@ if (DOGEN_CLI_EXECUTABLE)
12251
# set(models ${models} cpp_ref_impl.out_of_sync)
12352
endif()
12453

125-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/dia)
126-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/json)
12754
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/org)

projects/cpp_ref_impl.models/dia/CMakeLists.txt

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)