Skip to content

Commit 649dab1

Browse files
committed
disable -Wdeprecated-declarations
We use ftime() which we know is deprecated, but we're comparing it to other clocks. Signed-off-by: Steven Noonan <[email protected]>
1 parent a3c8ae4 commit 649dab1

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/script.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if lsb_release -c | grep -q bionic$; then
2929
export ASAN_OPTIONS=detect_odr_violation=0
3030
fi
3131

32-
meson . build-meson -Dbuildtype=release -Ddebug=false -Db_lto=true
32+
meson . build-meson -Dwerror=true -Dbuildtype=release -Ddebug=false -Db_lto=true
3333

3434
# Build some tests with sanitizers
3535
if [[ $BUILD_SANITIZERS -ne 0 ]]; then

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ add_executable(clockperf affinity.c clock.c drift.c main.c version.c build.h lic
2323
target_link_libraries(clockperf Threads::Threads OpenMP::OpenMP_C)
2424
if(NOT MSVC)
2525
target_link_libraries(clockperf m)
26+
target_compile_options(clockperf PRIVATE -Wno-deprecated-declarations)
2627
endif()
2728
if(WIN32 OR CYGWIN OR MINGW)
2829
target_link_libraries(clockperf winmm)

GNUmakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ CFLAGS := \
6060
-Wno-long-long \
6161
-Wno-overlength-strings \
6262
-Wold-style-definition \
63-
-Wstrict-prototypes
63+
-Wstrict-prototypes \
64+
-Wno-deprecated-declarations
6465

6566
LDFLAGS := -lm
6667
OBJECTS := affinity.o clock.o drift.o main.o version.o

meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ lm = compiler.find_library('m')
2525
threads = dependency('threads')
2626
openmp = dependency('openmp')
2727

28+
add_project_arguments(compiler.first_supported_argument('-Wno-deprecated-declarations'), language: 'c')
29+
2830
executable('clockperf',
2931
src,
3032
gen_build_h,

0 commit comments

Comments
 (0)