Skip to content

Commit 75c48f0

Browse files
committed
[C++]: Generate IR codecs during CMake run
1 parent 930feff commit 75c48f0

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,5 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/sbe-tool/src/main/cpp)
9595
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/sbe-tool/src/test/cpp)
9696
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/sbe-samples/src/main/cpp)
9797
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/sbe-benchmarks/src/main/cpp)
98+
99+
add_dependencies(sbe ir_codecs)

sbe-tool/src/main/cpp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uk_co_real_logic_sbe_ir_generated/*

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414
# limitations under the License.
1515
#
1616

17+
add_custom_target(
18+
ir_codecs
19+
java
20+
"-Dsbe.output.dir=${CMAKE_CURRENT_SOURCE_DIR}"
21+
"-Dsbe.target.language=CPP"
22+
"-jar" "${CMAKE_SOURCE_DIR}/sbe-all/build/libs/sbe-all-${SBE_VERSION_TXT}.jar"
23+
"../resources/sbe-ir.xml"
24+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
25+
COMMENT "Generate IR codecs"
26+
)
27+
1728
set(HEADERS
1829
sbe/sbe.h
1930
otf/IrDecoder.h

0 commit comments

Comments
 (0)