From: Ludwig Jäck Date: Thu, 6 Jun 2024 09:29:20 +0000 (+0200) Subject: Migrate examples to castxml X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=refs%2Fheads%2Fmigrate-to-castxml;p=libt2n Migrate examples to castxml --- diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a5a3396..7421f18 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -35,10 +35,9 @@ get_property(gcc_include_dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES ) -foreach(gcc_include_dir ${gcc_include_dirs}) - set(gccxml_include_dirs "${gccxml_include_dirs} -I${gcc_include_dir}") -endforeach() +list(TRANSFORM gcc_include_dirs PREPEND "-I") + add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/minimalistic-server.xml - COMMAND ${CMAKE_SOURCE_DIR}/libt2n-gccxml.sh ${gccxml_include_dirs} ${CMAKE_CURRENT_SOURCE_DIR}/minimalistic-server.cpp -fxml=${CMAKE_CURRENT_SOURCE_DIR}/minimalistic-server.xml + COMMAND /usr/bin/castxml ${gcc_include_dirs} ${CMAKE_CURRENT_SOURCE_DIR}/minimalistic-server.cpp -fxml=${CMAKE_CURRENT_SOURCE_DIR}/minimalistic-server.xml DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/minimalistic-server.cpp ) diff --git a/examples/minimalistic-stub.hxx b/examples/minimalistic-stub.hxx index 7516a31..d0beb3b 100644 --- a/examples/minimalistic-stub.hxx +++ b/examples/minimalistic-stub.hxx @@ -21,10 +21,10 @@ #include #include -#ifdef __GCCXML__ -#define LIBT2N_SET_DEFAULTGROUP(x) namespace { typedef __attribute((gccxml(#x))) int libt2n_default; } -#define LIBT2N_EXPORT __attribute((gccxml("libt2n-default"))) -#define LIBT2N_EXPORT_GROUP(group) __attribute((gccxml("libt2n-"#group))) +#ifdef __castxml__ +#define LIBT2N_SET_DEFAULTGROUP(x) namespace { typedef __attribute__((annotate(#x))) int libt2n_default; } +#define LIBT2N_EXPORT __attribute__((annotate("libt2n-default"))) +#define LIBT2N_EXPORT_GROUP(group) __attribute__((annotate("libt2n-"#group))) #else #define LIBT2N_SET_DEFAULTGROUP(x) #define LIBT2N_EXPORT