diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 154aafa..35efe5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: CI on: + pull_request: push: jobs: @@ -79,14 +80,6 @@ jobs: echo "SOFA_PLUGIN_PATH=$WORKSPACE_ARTIFACT_PATH/lib" | tee -a $GITHUB_ENV fi - if [[ "$RUNNER_OS" == "macOS" ]]; then - echo "DYLD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$DYLD_LIBRARY_PATH" | tee -a $GITHUB_ENV - fi - - if [[ "$RUNNER_OS" == "Linux" ]]; then - echo "LD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$LD_LIBRARY_PATH" | tee -a $GITHUB_ENV - fi - - name: Run Tearing_test if: always() shell: bash diff --git a/src/Tearing/initTearing.cpp b/src/Tearing/initTearing.cpp index 5b2d8db..d2904fd 100644 --- a/src/Tearing/initTearing.cpp +++ b/src/Tearing/initTearing.cpp @@ -23,6 +23,9 @@ ****************************************************************************/ #include +#include +using sofa::core::ObjectFactory; + namespace sofa::component { @@ -35,7 +38,7 @@ extern "C" { TEARING_API const char* getModuleComponentList(); } -void initExternalModule() +void initTearing() { static bool first = true; if (first) @@ -44,14 +47,21 @@ void initExternalModule() } } +void initExternalModule() +{ + initTearing(); +} + + + const char* getModuleName() { - return "tearing"; + return sofa_tostring(SOFA_TARGET); } const char* getModuleVersion() { - return "1.0"; + return sofa_tostring(TEARING_VERSION); } const char* getModuleLicense() @@ -66,14 +76,10 @@ const char* getModuleDescription() const char* getModuleComponentList() { - // string containing the names of the classes provided by the plugin - return "TearingEngine, TearingAlgorithms, VolumeTearingEngine, VolumeTearingAlgorithms"; -} - - -void init() -{ - initExternalModule(); + /// string containing the names of the classes provided by the plugin + static std::string classes = ObjectFactory::getInstance()->listClassesFromTarget(sofa_tostring(SOFA_TARGET)); + return classes.c_str(); } + } // namespace sofa::component diff --git a/src/Tearing/initTearing.h b/src/Tearing/initTearing.h index 1ff2607..71a8bc3 100644 --- a/src/Tearing/initTearing.h +++ b/src/Tearing/initTearing.h @@ -21,9 +21,10 @@ * Authors: see Authors.txt * * Further information: https://infinytech3d.com * ****************************************************************************/ +#pragma once #include namespace sofa::component { - TEARING_API void init(); + void TEARING_API initTearing(); } // namespace sofa::component