aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/cmake.d/03-macros.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake
index 207e85a..61fc0dc 100644
--- a/cmake/cmake.d/03-macros.cmake
+++ b/cmake/cmake.d/03-macros.cmake
@@ -247,10 +247,13 @@ endmacro()
# To be call inside project_targets_populate macro
macro(afb_genskel)
+ if ("${PROJECT_LANGUAGES}" MATCHES "CXX")
+ list(APPEND GENSKEL_OPTS "--cpp")
+ endif()
if (OPENAPI_DEF)
add_custom_command(OUTPUT ${SD}/${OPENAPI_DEF}.h
DEPENDS ${SD}/${OPENAPI_DEF}.json
- COMMAND afb-genskel ${SD}/${OPENAPI_DEF}.json > ${SD}/${OPENAPI_DEF}.h
+ COMMAND afb-genskel ${GENSKEL_OPTS} ${SD}/${OPENAPI_DEF}.json > ${SD}/${OPENAPI_DEF}.h
)
add_custom_target("${TARGET}_GENSKEL" DEPENDS ${SD}/${OPENAPI_DEF}.h
COMMENT "Generating OpenAPI header file ${OPENAPI_DEF}.h")
@@ -258,7 +261,7 @@ macro(afb_genskel)
else()
add_custom_command(OUTPUT ${SD}/${OUT}-apidef.h
DEPENDS ${SD}/${OUT}-apidef.json
- COMMAND afb-genskel ${SD}/${OUT}-apidef.json > ${SD}/${OUT}-apidef.h
+ COMMAND afb-genskel ${GENSKEL_OPTS} ${SD}/${OUT}-apidef.json > ${SD}/${OUT}-apidef.h
)
add_custom_target("${TARGET}_GENSKEL" DEPENDS ${SD}/${OUT}-apidef.h
COMMENT "Generating OpenAPI header file ${OUT}-apidef.h")