Skip to content

Commit f798d2b

Browse files
first commit
1 parent 5652a4d commit f798d2b

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ jobs:
1010
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
1111
- name: get cmake
1212
uses: lukka/get-cmake@latest
13-
- name: Set up Clang
14-
uses: egor-tensin/setup-clang@v1
15-
with:
16-
version: latest
17-
platform: x64
1813
- name: cmake
1914
shell: bash
2015
run: |

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
cmake_minimum_required(VERSION 3.27)
1+
cmake_minimum_required(VERSION 3.22.1)
22
project(nautilus_lib)
33

44
set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED True)
66
set(CATCH_ENABLE_REPRODUCIBLE_BUILD OFF CACHE INTERNAL "Turn off tests")
77
#set(NES_WARNINGS "-Wall -Wextra -pedantic -Wno-null-character -Wno-dollar-in-identifier-extension -Werror=extra -Werror=exceptions -Werror=all -Werror=integer-overflow -Werror=return-type -Werror=return-stack-address -Werror=delete-non-virtual-dtor -Werror=deprecated -Werror=writable-strings -Werror=array-bounds -Werror=ignored-qualifiers -Werror=sign-compare -Wno-deprecated-copy-with-dtor -Wno-unused-variable -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-invalid-offsetof ")
88

9-
set(CMAKE_CXX_FLAGS "-fpermissive -fPIC")
9+
set(CMAKE_CXX_FLAGS "-fpermissive -fPIC -g")
1010
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
1111

1212

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -qq \
4+
build-essential \
5+
software-properties-common \
6+
gcc \
7+
g++ \
8+
cmake \
9+
ccache \
10+
gdb-multiarch \
11+
gdb \
12+
git

nautilus-api/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
add_executable(nautilus-api-tests
1515
Interface/DataTypeTest2.cpp)
1616

17-
target_link_libraries(nautilus-api-tests PUBLIC "$<LINK_LIBRARY:WHOLE_ARCHIVE,nautilus-api>" Catch2::Catch2WithMain)
17+
target_link_libraries(nautilus-api-tests PUBLIC nautilus-api Catch2::Catch2WithMain)
1818
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
1919
include(CTest)
2020
include(Catch)

nautilus-common/include/common/PluginRegistry.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ template<typename T>
3131
class PluginRegistry {
3232

3333
private:
34-
static inline std::list<std::unique_ptr<T>> items = std::list<std::unique_ptr<T>>();
35-
34+
static std::list<std::unique_ptr<T>>& getItems() {
35+
static std::list<std::unique_ptr<T>> items;
36+
return items;
37+
}
3638
public:
37-
static std::list<std::unique_ptr<T>>& getPlugins() { return items; }
39+
static std::list<std::unique_ptr<T>>& getPlugins() { return getItems(); }
3840
/** A static registration template. Use like such:
3941
*
4042
* Registry<PluginInterfaceType>::Add<PluginType> X;
@@ -48,10 +50,11 @@ class PluginRegistry {
4850
static std::unique_ptr<T> CtorFn() { return std::make_unique<V>(); }
4951

5052
public:
51-
Add() { PluginRegistry<T>::items.emplace_back(CtorFn()); }
53+
Add() { getItems().emplace_back(CtorFn()); }
5254
};
5355
};
5456

57+
5558
/**
5659
* @brief The plugin registry allows the dynamic registration of plugins at runtime.
5760
* A plugin is a provider of a specific type T, which defines the plugin interface.

0 commit comments

Comments
 (0)