Skip to content

Commit f9d2f8d

Browse files
committed
[C++] Set working directory when building samples codecs. Issue #624.
1 parent b270d08 commit f9d2f8d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

sbe-samples/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ set(EXAMPLES_SCHEMA ${CODEC_EXAMPLES_SCHEMA_DIR}/example-schema.xml)
2424

2525
add_custom_command(
2626
OUTPUT ${GENERATED_CODECS}
27+
WORKING_DIRECTORY ${CODEC_EXAMPLES_SCHEMA_DIR}
2728
DEPENDS ${EXAMPLES_SCHEMA} sbe-jar ${SBE_JAR}
2829
COMMAND ${Java_JAVA_EXECUTABLE} -Dsbe.output.dir=${CODEC_TARGET_DIR} -Dsbe.generate.ir=true -Dsbe.target.language=cpp -Dsbe.xinclude.aware=true -jar ${SBE_JAR} ${EXAMPLES_SCHEMA}
2930
)

sbe-samples/src/main/resources/example-schema.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
semanticVersion="5.2"
88
description="Example schema"
99
byteOrder="littleEndian">
10-
<xi:include href="common-types.xml">
11-
<xi:fallback>
12-
<xi:include href="../../../../../../sbe-samples/src/main/resources/common-types.xml"/>
13-
</xi:fallback>
14-
</xi:include>
10+
<xi:include href="common-types.xml"/>
1511
<types>
1612
<type name="ModelYear" primitiveType="uint16"/>
1713
<type name="VehicleCode" primitiveType="char" length="6" characterEncoding="ASCII"/>

0 commit comments

Comments
 (0)