From 92e370ce9c1f0582014b54d43e388ee012dfe13d Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Thu, 17 Oct 2024 20:26:58 -0400 Subject: [PATCH] Revise export include headers (#241) Signed-off-by: Juan Cruz Viotti --- DEPENDENCIES | 4 ++-- src/engine/include/sourcemeta/alterschema/engine_bundle.h | 4 +++- src/engine/include/sourcemeta/alterschema/engine_rule.h | 4 +++- .../include/sourcemeta/alterschema/engine_transformer.h | 4 +++- src/linter/include/sourcemeta/alterschema/linter.h | 4 +++- .../src/json/include/sourcemeta/jsontoolkit/json.h | 2 +- .../src/json/include/sourcemeta/jsontoolkit/json_error.h | 2 +- .../src/json/include/sourcemeta/jsontoolkit/json_value.h | 2 +- .../src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h | 2 +- .../jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonpointer.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonpointer_error.h | 2 +- .../jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonschema_anchor.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonschema_bundle.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonschema_error.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonschema_reference.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonschema_resolver.h | 2 +- .../include/sourcemeta/jsontoolkit/jsonschema_walker.h | 2 +- .../src/uri/include/sourcemeta/jsontoolkit/uri.h | 2 +- .../src/uri/include/sourcemeta/jsontoolkit/uri_error.h | 2 +- vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake | 7 ++++--- vendor/noa/cmake/noa/library.cmake | 7 ++++--- 23 files changed, 38 insertions(+), 28 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index dd11414..271df34 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,4 +1,4 @@ vendorpull https://github.com/sourcemeta/vendorpull dea311b5bfb53b6926a4140267959ae334d3ecf4 -noa https://github.com/sourcemeta/noa 837e1ff981f8df45d9e2977a50f5da61d8affed4 -jsontoolkit https://github.com/sourcemeta/jsontoolkit 9685d29e2e633d71319c64b1ab2fbceab865dbf3 +noa https://github.com/sourcemeta/noa caad2e1ceedf9fd1a18686a6a6d1e2b9757ead75 +jsontoolkit https://github.com/sourcemeta/jsontoolkit 2d78929faf0f96110edfb67fa3ddf6916cf35ef7 googletest https://github.com/google/googletest a7f443b80b105f940225332ed3c31f2790092f47 diff --git a/src/engine/include/sourcemeta/alterschema/engine_bundle.h b/src/engine/include/sourcemeta/alterschema/engine_bundle.h index f0fa2a1..cfb7c14 100644 --- a/src/engine/include/sourcemeta/alterschema/engine_bundle.h +++ b/src/engine/include/sourcemeta/alterschema/engine_bundle.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_ALTERSCHEMA_BUNDLE_H_ #define SOURCEMETA_ALTERSCHEMA_BUNDLE_H_ -#include "engine_export.h" +#ifndef SOURCEMETA_ALTERSCHEMA_ENGINE_EXPORT +#include +#endif #include #include diff --git a/src/engine/include/sourcemeta/alterschema/engine_rule.h b/src/engine/include/sourcemeta/alterschema/engine_rule.h index 35e79f1..9222a5e 100644 --- a/src/engine/include/sourcemeta/alterschema/engine_rule.h +++ b/src/engine/include/sourcemeta/alterschema/engine_rule.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_ALTERSCHEMA_ENGINE_RULE_H_ #define SOURCEMETA_ALTERSCHEMA_ENGINE_RULE_H_ -#include "engine_export.h" +#ifndef SOURCEMETA_ALTERSCHEMA_ENGINE_EXPORT +#include +#endif #include #include diff --git a/src/engine/include/sourcemeta/alterschema/engine_transformer.h b/src/engine/include/sourcemeta/alterschema/engine_transformer.h index 80ebd1c..0dec7f4 100644 --- a/src/engine/include/sourcemeta/alterschema/engine_transformer.h +++ b/src/engine/include/sourcemeta/alterschema/engine_transformer.h @@ -1,7 +1,9 @@ #ifndef SOURCEMETA_ALTERSCHEMA_ENGINE_TRANSFORMER_H_ #define SOURCEMETA_ALTERSCHEMA_ENGINE_TRANSFORMER_H_ -#include "engine_export.h" +#ifndef SOURCEMETA_ALTERSCHEMA_ENGINE_EXPORT +#include +#endif #include #include diff --git a/src/linter/include/sourcemeta/alterschema/linter.h b/src/linter/include/sourcemeta/alterschema/linter.h index 97379e9..a1e56d9 100644 --- a/src/linter/include/sourcemeta/alterschema/linter.h +++ b/src/linter/include/sourcemeta/alterschema/linter.h @@ -10,7 +10,9 @@ /// #include /// ``` -#include "linter_export.h" +#ifndef SOURCEMETA_ALTERSCHEMA_LINTER_EXPORT +#include +#endif #include diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json.h b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json.h index 88224e6..18c589e 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json.h +++ b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSON_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSON_EXPORT -#include "json_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_error.h b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_error.h index 4e9b341..eb7e90c 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_error.h +++ b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_error.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSON_ERROR_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSON_EXPORT -#include "json_export.h" +#include #endif #include // std::uint64_t diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h index 005561f..a5e9fb9 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h +++ b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSON_VALUE_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSON_EXPORT -#include "json_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h b/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h index 813210f..d54a60e 100644 --- a/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h +++ b/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONL_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONL_EXPORT -#include "jsonl_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h b/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h index 6e2d31b..41ef4ab 100644 --- a/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h +++ b/vendor/jsontoolkit/src/jsonl/include/sourcemeta/jsontoolkit/jsonl_iterator.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONL_ITERATOR_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONL_EXPORT -#include "jsonl_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h index 2cd68d9..c79eebe 100644 --- a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h +++ b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONPOINTER_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONPOINTER_EXPORT -#include "jsonpointer_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h index 71b08a1..29b9812 100644 --- a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h +++ b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_error.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONPOINTER_ERROR_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONPOINTER_EXPORT -#include "jsonpointer_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h index 54e0d9f..9a98194 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h index a55d0c7..aaf565b 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_anchor.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_ANCHOR_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h index bacca95..345510b 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_BUNDLE_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h index 887563f..a2ca383 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_error.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_ERROR_H #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h index 3f4ff6a..4eac526 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_reference.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_REFERENCE_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h index d1cb51d..9bd3cd0 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_resolver.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_RESOLVER_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h index 625a7f8..e271a41 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_walker.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_WALKER_H_ #ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT -#include "jsonschema_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri.h b/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri.h index b9ee2d4..c698abf 100644 --- a/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri.h +++ b/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_URI_H_ #ifndef SOURCEMETA_JSONTOOLKIT_URI_EXPORT -#include "uri_export.h" +#include #endif #include diff --git a/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri_error.h b/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri_error.h index 8062f45..d031387 100644 --- a/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri_error.h +++ b/vendor/jsontoolkit/src/uri/include/sourcemeta/jsontoolkit/uri_error.h @@ -2,7 +2,7 @@ #define SOURCEMETA_JSONTOOLKIT_URI_ERROR_H_ #ifndef SOURCEMETA_JSONTOOLKIT_URI_EXPORT -#include "uri_export.h" +#include #endif #include // std::uint64_t diff --git a/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake b/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake index 9868714..bc74677 100644 --- a/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake +++ b/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake @@ -18,6 +18,7 @@ function(noa_library) set(INCLUDE_PREFIX "include/${NOA_LIBRARY_PROJECT}") endif() + set(EXPORT_HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/${INCLUDE_PREFIX}/${NOA_LIBRARY_NAME}_export.h") if(NOT NOA_LIBRARY_VARIANT) set(PUBLIC_HEADER "${INCLUDE_PREFIX}/${NOA_LIBRARY_NAME}.h") else() @@ -25,7 +26,7 @@ function(noa_library) endif() if(NOA_LIBRARY_SOURCES) - set(ABSOLUTE_PRIVATE_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/${NOA_LIBRARY_NAME}_export.h") + set(ABSOLUTE_PRIVATE_HEADERS "${EXPORT_HEADER_PATH}") else() set(ABSOLUTE_PRIVATE_HEADERS) endif() @@ -100,7 +101,7 @@ function(noa_library) if(NOA_LIBRARY_SOURCES) include(GenerateExportHeader) generate_export_header(${TARGET_NAME} - EXPORT_FILE_NAME ${NOA_LIBRARY_NAME}_export.h) + EXPORT_FILE_NAME ${EXPORT_HEADER_PATH}) set_target_properties(${TARGET_NAME} PROPERTIES SOVERSION "${PROJECT_VERSION_MAJOR}" @@ -108,7 +109,7 @@ function(noa_library) # To find the generated files target_include_directories(${TARGET_NAME} - PUBLIC "$") + PUBLIC "$") endif() endfunction() diff --git a/vendor/noa/cmake/noa/library.cmake b/vendor/noa/cmake/noa/library.cmake index 9868714..bc74677 100644 --- a/vendor/noa/cmake/noa/library.cmake +++ b/vendor/noa/cmake/noa/library.cmake @@ -18,6 +18,7 @@ function(noa_library) set(INCLUDE_PREFIX "include/${NOA_LIBRARY_PROJECT}") endif() + set(EXPORT_HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/${INCLUDE_PREFIX}/${NOA_LIBRARY_NAME}_export.h") if(NOT NOA_LIBRARY_VARIANT) set(PUBLIC_HEADER "${INCLUDE_PREFIX}/${NOA_LIBRARY_NAME}.h") else() @@ -25,7 +26,7 @@ function(noa_library) endif() if(NOA_LIBRARY_SOURCES) - set(ABSOLUTE_PRIVATE_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/${NOA_LIBRARY_NAME}_export.h") + set(ABSOLUTE_PRIVATE_HEADERS "${EXPORT_HEADER_PATH}") else() set(ABSOLUTE_PRIVATE_HEADERS) endif() @@ -100,7 +101,7 @@ function(noa_library) if(NOA_LIBRARY_SOURCES) include(GenerateExportHeader) generate_export_header(${TARGET_NAME} - EXPORT_FILE_NAME ${NOA_LIBRARY_NAME}_export.h) + EXPORT_FILE_NAME ${EXPORT_HEADER_PATH}) set_target_properties(${TARGET_NAME} PROPERTIES SOVERSION "${PROJECT_VERSION_MAJOR}" @@ -108,7 +109,7 @@ function(noa_library) # To find the generated files target_include_directories(${TARGET_NAME} - PUBLIC "$") + PUBLIC "$") endif() endfunction()