Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ set(PUBLIC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/include")

# pugixml: the XML layer the generated mx::core consumes directly (plan §2.1).
# Vendored at src/private/pugixml (upstream 1.15, stock pugiconfig).
add_library(pugixml STATIC ${PRIVATE_DIR}/pugixml/pugixml.cpp)
target_include_directories(pugixml PUBLIC ${PRIVATE_DIR})
# Client projects may provide a compatible pugixml target before adding mx.
if(NOT TARGET pugixml)
add_library(pugixml STATIC ${PRIVATE_DIR}/pugixml/pugixml.cpp)
target_include_directories(pugixml PUBLIC ${PRIVATE_DIR}/pugixml)
endif()

# mx_core: the generated C++ typed model plus its hand-written runtime
# (Decimal, Result, Error, Lexical, Token, NameToken, OneOrMore, Xml). The
Expand Down
6 changes: 4 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ if useBinaryRelease {
// `src/private`), minus the Catch2 runner, the test suites, and the example
// programs -- the only files carrying their own main(). The public surface
// is the mx::api headers under `src/include`; `src/private` is added to the
// internal header search path so the model can include `mx/core/...` and
// `pugixml/...`.
// internal header search path so the model can include `mx/core/...`; and
// `src/private/pugixml` is added so sources can use the canonical
// `#include "pugixml.hpp"` form that the CMake build also exposes.
mxTarget = .target(
name: "Mx",
path: "src",
Expand All @@ -37,6 +38,7 @@ if useBinaryRelease {
publicHeadersPath: "include",
cxxSettings: [
.headerSearchPath("private"),
.headerSearchPath("private/pugixml"),
]
)
}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ recorded in `docs/ai/design/mx-core-plan.md`.

`mx::core` consumes the vendored [pugixml](http://pugixml.org/) (`src/private/pugixml/`) directly,
in keeping with the build tenets [above](#build-tenets). The earlier `ezxml` abstraction layer is
retired.
retired. A client project may provide a compatible version by creating the CMake `pugixml` target
before adding `mx`.

##### `mx::impl`

Expand Down
2 changes: 1 addition & 1 deletion src/private/mx/api/DocumentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "mx/impl/ScoreWriter.h"
#include "mx/impl/WriteRefusal.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <map>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mx/core/Attribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "mx/core/generated/ScorePartwise.h"
#include "mx/core/generated/ScoreTimewise.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <utility>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mx/core/Xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <string>
#include <string_view>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/api/ApiTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "mxtest/api/ApiTester.h"
#include "mx/api/DocumentManager.h"
#include "mxtest/file/StupidFileFunctions.h"
#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <sstream>

Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/api/CorpusRoundtripMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "mx/core/Attribution.h"
#include "mxtest/corert/Compare.h"
#include "mxtest/corert/Fixer.h"
#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <algorithm>
#include <filesystem>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/api/PitchDataTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "cpul/cpulTestHarness.h"
#include "mx/api/DocumentManager.h"
#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <sstream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/api/SlurTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "cpul/cpulTestHarness.h"
#include "mxtest/api/TestHelpers.h"
#include "mxtest/file/MxFileRepository.h"
#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <sstream>

Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/core/AttributionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "mx/core/generated/ScoreHeaderGroup.h"
#include "mx/core/generated/ScorePartwise.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <string>
#include <string_view>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/core/DocumentTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "mx/core/generated/Document.h"
#include "mx/core/generated/Version.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/core/ShapeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "mx/core/generated/Pitch.h"
#include "mx/core/generated/Step.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/corert/Compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/corert/CoreRoundtripImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "mxtest/file/PathRoot.h"
#include "mxtest/import/Normalize.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <algorithm>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/corert/Fixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/import/Normalize.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

namespace mxtest
{
Expand Down
2 changes: 1 addition & 1 deletion src/private/mxtest/validate/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "mx/core/generated/Document.h"
#include "mxtest/corert/CoreRoundtripImpl.h"

#include "pugixml/pugixml.hpp"
#include "pugixml.hpp"

#include <cstdio>
#include <filesystem>
Expand Down
Loading