Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Merge requests
!200
Change strategy for modules registration to the ModuleRepository
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Change strategy for modules registration to the ModuleRepository
feature/pluggins
into
develop
Overview
0
Commits
7
Pipelines
0
Changes
6
Merged
Stéphane Del Pino
requested to merge
feature/pluggins
into
develop
5 months ago
Overview
0
Commits
7
Pipelines
0
Changes
6
Expand
Now modules register self register: ModuleRepository is unchanged while adding new modules
0
0
Merge request reports
Viewing commit
24a96100
Prev
Next
Show latest version
6 files
+
303
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
24a96100
Add template plugin generation tool and its self documentation
· 24a96100
Stéphane Del Pino
authored
5 months ago
tools/plugin-template/CMakeLists.txt-template
0 → 100644
+
95
−
0
Options
cmake_minimum_required (VERSION 3.19)
project("_PLUGIN_LOW_")
# CMake utils
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Forbids in-source builds
include(CheckNotInSources)
# use PkgConfig to find packages
find_package(PkgConfig REQUIRED)
find_package(Pugs REQUIRED)
# -----------------------------------------------------
# dynamic libraries
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
link_libraries("-rdynamic")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#------------------------------------------------------
set(CMAKE_CONFIGURATION_TYPES "Release;Debug;Coverage" CACHE STRING INTERNAL FORCE )
#------------------------------------------------------
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#------------------------------------------------------
set(PUGS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(PUGS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
# Add new build types
set(CMAKE_CXX_FLAGS_COVERAGE
"-g -O0 --coverage"
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
set(CMAKE_C_FLAGS_COVERAGE
"-g -O0 --coverage"
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
"--coverage"
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
"--coverage"
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
mark_as_advanced(
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
if(CMAKE_BUILD_TYPE)
string(REGEX MATCH "^(Release|Debug|Coverage)$" VALID_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
if(NOT VALID_BUILD_TYPE)
message(FATAL_ERROR "Invalid CMAKE_BUILD_TYPE: '${CMAKE_BUILD_TYPE}'")
endif()
endif()
# Default build type is Release
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build: Release Debug Coverage."
FORCE)
endif()
#------------------------------------------------------
# default build shared libraries
if (NOT BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON CACHE STRING "" FORCE)
endif()
#------------------------------------------------------
# Checks if compiler version is compatible with Pugs sources
set(GNU_CXX_MIN_VERSION "10.0.0")
set(CLANG_CXX_MIN_VERSION "11.0.0")
#------------------------------------------------------
# Change Kokkos namespace to avoid conflicts
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DKokkos=InlineKokkos")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
include_directories(SYSTEM "${PUGS_PREFIX_PATH}/include")
include_directories(SYSTEM "${PUGS_PREFIX_PATH}/include/kokkos")
include_directories(SYSTEM "${PUGS_PREFIX_PATH}/include/tao/")
add_library(_PLUGIN_NAME_
_PLUGIN_NAME_Module.cpp
)
Loading