Skip to content

Commit 8d8243f

Browse files
authored
Merge pull request #518 from bratpiorka/rrudnick_ubuntu_20
test and fix UMF simplest build
2 parents 2b28deb + e1ee2f5 commit 8d8243f

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

.github/workflows/pr_push.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,33 @@ jobs:
2121
- os: windows-latest
2222
disjoint: 'OFF'
2323
build_tests: 'ON'
24+
simple_cmake: 'OFF'
2425
# pure C build (Windows)
2526
- os: windows-latest
2627
disjoint: 'OFF'
2728
# Tests' building is off for a pure C build
2829
build_tests: 'OFF'
30+
simple_cmake: 'OFF'
2931
- os: ubuntu-latest
3032
disjoint: 'ON'
3133
build_tests: 'ON'
3234
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
3335
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
36+
simple_cmake: 'OFF'
3437
# pure C build (Linux)
3538
- os: ubuntu-latest
3639
disjoint: 'OFF'
3740
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
3841
# Tests' building is off for a pure C build
3942
build_tests: 'OFF'
4043
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
44+
simple_cmake: 'OFF'
45+
# simplest CMake
46+
- os: ubuntu-latest
47+
disjoint: 'OFF'
48+
build_tests: 'ON'
49+
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
50+
simple_cmake: 'ON'
4151
runs-on: ${{matrix.os}}
4252

4353
steps:
@@ -68,6 +78,7 @@ jobs:
6878
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
6979

7080
- name: Configure CMake
81+
if: matrix.simple_cmake == 'OFF'
7182
run: >
7283
cmake
7384
-B ${{github.workspace}}/build
@@ -83,6 +94,16 @@ jobs:
8394
-DUMF_TESTS_FAIL_ON_SKIP=ON
8495
${{matrix.extra_build_options}}
8596
97+
- name: Configure CMake (simple)
98+
if: matrix.simple_cmake == 'ON'
99+
run: >
100+
cmake
101+
-B ${{github.workspace}}/build
102+
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
103+
-DUMF_BUILD_SHARED_LIBRARY=ON
104+
-DUMF_TESTS_FAIL_ON_SKIP=ON
105+
${{matrix.extra_build_options}}
106+
86107
- name: Build
87108
run: cmake --build ${{github.workspace}}/build --config Release -j
88109

include/umf/proxy_lib_new_delete.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ static inline void *internal_aligned_alloc(size_t alignment, size_t size) {
6868
#define decl_new_nothrow(n) [[nodiscard]]
6969
#endif // defined(_MSC_VER) && defined(_Ret_notnull_) && defined(_Post_writable_byte_size_)
7070

71-
void operator delete(void *p) noexcept { free(p); };
72-
void operator delete[](void *p) noexcept { free(p); };
71+
void operator delete(void *p) noexcept { free(p); }
72+
void operator delete[](void *p) noexcept { free(p); }
7373

7474
void operator delete(void *p, const std::nothrow_t &) noexcept { free(p); }
7575
void operator delete[](void *p, const std::nothrow_t &) noexcept { free(p); }
@@ -96,11 +96,11 @@ decl_new_nothrow(n) void *operator new[](std::size_t n,
9696
void operator delete(void *p, std::size_t n) noexcept {
9797
(void)(n);
9898
free(p);
99-
};
99+
}
100100
void operator delete[](void *p, std::size_t n) noexcept {
101101
(void)(n);
102102
free(p);
103-
};
103+
}
104104
#endif // (__cplusplus >= 201402L || _MSC_VER >= 1916)
105105

106106
#if (__cplusplus > 201402L || defined(__cpp_aligned_new))
@@ -116,12 +116,12 @@ void operator delete(void *p, std::size_t n, std::align_val_t al) noexcept {
116116
(void)(n);
117117
(void)(al);
118118
free(p);
119-
};
119+
}
120120
void operator delete[](void *p, std::size_t n, std::align_val_t al) noexcept {
121121
(void)(n);
122122
(void)(al);
123123
free(p);
124-
};
124+
}
125125
void operator delete(void *p, std::align_val_t al,
126126
const std::nothrow_t &) noexcept {
127127
(void)(al);

src/utils/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ endif()
3232
if(LINUX OR MACOSX)
3333
set(UMF_UTILS_SOURCES ${UMF_UTILS_SOURCES_COMMON}
3434
${UMF_UTILS_SOURCES_POSIX})
35+
set(UMF_UTILS_LIBS dl)
3536
elseif(WINDOWS)
3637
set(UMF_UTILS_SOURCES ${UMF_UTILS_SOURCES_COMMON}
3738
${UMF_UTILS_SOURCES_WINDOWS})
@@ -41,7 +42,8 @@ add_library(umf_utils INTERFACE)
4142
add_library(${PROJECT_NAME}::utils ALIAS umf_utils)
4243

4344
target_sources(umf_utils INTERFACE ${UMF_UTILS_SOURCES})
44-
target_link_libraries(umf_utils INTERFACE ${CMAKE_THREAD_LIBS_INIT})
45+
target_link_libraries(umf_utils INTERFACE ${CMAKE_THREAD_LIBS_INIT}
46+
${UMF_UTILS_LIBS})
4547

4648
target_include_directories(
4749
umf_utils

0 commit comments

Comments
 (0)