Skip to content

Commit

Permalink
Use CMake variables to define module name and version (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger authored Jun 24, 2024
1 parent 58828b6 commit d3ba709
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/SofaViscoElastic/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@

namespace sofa::SofaViscoElastic
{

} // namespace sofa::component::solidmechanics::fem::viscoelastic
constexpr const char* MODULE_NAME = "@PROJECT_NAME@";
constexpr const char* MODULE_VERSION = "@PROJECT_VERSION@";
} // namespace sofa::SofaViscoElastic
6 changes: 3 additions & 3 deletions src/SofaViscoElastic/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ void initExternalModule()

const char* getModuleName()
{
return "SofaViscoElastic";
return MODULE_NAME;
}

const char* getModuleVersion()
{
return "1.0";
return MODULE_VERSION;
}

void init()
Expand All @@ -78,4 +78,4 @@ const char* getModuleComponentList()
static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(sofa_tostring(SOFA_TARGET));
return classes.c_str();
}
} // namespace sofa::component::solidmechanics::fem::viscoelastic
} // namespace sofa::SofaViscoElastic

0 comments on commit d3ba709

Please sign in to comment.