Skip to content

Commit 6d63de6

Browse files
authored
Merge pull request #24 from pribault/pribault/improvements
Some fixes and improvements
2 parents b560ff4 + 3875d44 commit 6d63de6

10 files changed

Lines changed: 110 additions & 5 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@
3636
.vscode
3737
build
3838
Testing
39+
build-*

‎CMakeLists.txt‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.15)
22

33
add_subdirectory(rscpp)
44

@@ -133,10 +133,20 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
133133
target_link_options(ReCpp PUBLIC "-latomic")
134134
endif()
135135

136+
set(RECPP_COMPILATION_FLAGS ${RSCPP_COMPILATION_FLAGS})
137+
136138
if(WIN32)
137-
target_compile_options(ReCpp PUBLIC /WX)
139+
set(RECPP_COMPILATION_FLAGS
140+
/W4
141+
/WX
142+
/wd4503
143+
/wd4702
144+
/bigobj
145+
)
138146
elseif(UNIX)
139-
target_compile_options(ReCpp PUBLIC -Werror)
147+
set(RECPP_COMPILATION_FLAGS
148+
-Wall -Werror
149+
)
140150
endif()
141151

142152
set_property(TARGET ReCpp PROPERTY CXX_STANDARD 17)

‎CMakePresets.json‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"version": 2,
3+
"configurePresets": [
4+
{
5+
"name": "debug",
6+
"generator": "Ninja",
7+
"binaryDir": "${sourceDir}/build-debug",
8+
"cacheVariables": {
9+
"CMAKE_BUILD_TYPE": "Debug"
10+
}
11+
},
12+
{
13+
"name": "build-debug-asan",
14+
"inherits": "debug",
15+
"binaryDir": "${sourceDir}/build-debug-asan",
16+
"cacheVariables": {
17+
"USE_ASAN": "ON"
18+
}
19+
},
20+
{
21+
"name": "release",
22+
"generator": "Ninja",
23+
"binaryDir": "${sourceDir}/build-release",
24+
"cacheVariables": {
25+
"CMAKE_BUILD_TYPE": "Release"
26+
}
27+
},
28+
{
29+
"name": "profile",
30+
"generator": "Ninja",
31+
"binaryDir": "${sourceDir}/build-profile",
32+
"cacheVariables": {
33+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
34+
}
35+
}
36+
],
37+
"buildPresets": [
38+
{
39+
"name": "build-debug",
40+
"configurePreset": "debug"
41+
},
42+
{
43+
"name": "build-release",
44+
"configurePreset": "release"
45+
},
46+
{
47+
"name": "build-profile",
48+
"configurePreset": "profile"
49+
}
50+
],
51+
"testPresets": [
52+
{
53+
"name": "test-debug",
54+
"configurePreset": "debug",
55+
"output": {
56+
"outputOnFailure": true
57+
}
58+
},
59+
{
60+
"name": "test-release",
61+
"configurePreset": "release",
62+
"output": {
63+
"outputOnFailure": true
64+
}
65+
}
66+
]
67+
}

‎examples/resource-loading/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.15)
22

33
project(ReCpp-test
44
VERSION 0.0.0

‎examples/subscribe-and-observe-on/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.15)
22

33
project(ReCpp-test
44
VERSION 0.0.0

‎include/recpp/processors/inl/AndThen.inl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#pragma once
22

3+
#ifdef max
4+
#undef max
5+
#endif
6+
7+
#ifdef min
8+
#undef min
9+
#endif
10+
311
#include <limits>
412

513
template <typename T, typename R>

‎include/recpp/processors/inl/IgnoreElements.inl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#pragma once
22

3+
#ifdef max
4+
#undef max
5+
#endif
6+
7+
#ifdef min
8+
#undef min
9+
#endif
10+
311
#include <limits>
412

513
template <typename T, typename R>

‎include/recpp/subscribers/inl/DefaultSubscriber.inl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#pragma once
22

3+
#ifdef max
4+
#undef max
5+
#endif
6+
7+
#ifdef min
8+
#undef min
9+
#endif
10+
311
#include <limits>
412

513
template <typename T>

‎include/recpp/subscriptions/inl/EmptySubscription.inl‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ recpp::subscriptions::EmptySubscription<T>::Impl::Impl(const rscpp::Subscriber<T
1515
template <typename T>
1616
void recpp::subscriptions::EmptySubscription<T>::Impl::request(std::size_t count)
1717
{
18+
(void)count;
19+
1820
if (!m_completed)
1921
{
2022
m_completed = true;

‎include/recpp/subscriptions/inl/NeverSubscription.inl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ recpp::subscriptions::NeverSubscription<T>::Impl::Impl(const rscpp::Subscriber<T
1515
template <typename T>
1616
void recpp::subscriptions::NeverSubscription<T>::Impl::request(std::size_t count)
1717
{
18+
(void)count;
1819
}
1920

2021
template <typename T>

0 commit comments

Comments
 (0)