Skip to content

Commit 3e7d003

Browse files
authored
Allow using C++17 standard (#211)
1 parent ebec9c4 commit 3e7d003

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.github/workflows/codecheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Run Cppcheck
7777
id: run-cppcheck
7878
run: |
79-
cppcheck --quiet --force --enable=all --std=c++11 --language=c++ --inline-suppr --suppressions-list=.github/scripts/cppcheck-suppressions.txt --xml --output-file=report.xml ddprof-lib/src/main/cpp/*
79+
cppcheck --quiet --force --enable=all --std=c++17 --language=c++ --inline-suppr --suppressions-list=.github/scripts/cppcheck-suppressions.txt --xml --output-file=report.xml ddprof-lib/src/main/cpp/*
8080
xsltproc --output report.html .github/scripts/cppcheck-html.xslt report.xml
8181
xsltproc --output report-gh.html .github/scripts/cppcheck-gh.xslt report.xml
8282
sed -i "s#target_branch#${HEAD_REF}#g" report.html

ddprof-lib/gtest/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ tasks.whenTaskAdded { task ->
101101
objectFileDir = file("$buildDir/obj/gtest/${config.name}/${testName}")
102102
compilerArgs.addAll(config.compilerArgs.findAll {
103103
// need to drop the -std and -DNDEBUG flags because we need a different standard and assertions enabled
104-
it != '-std=c++11' && it != '-DNDEBUG'
104+
it != '-std=c++17' && it != '-DNDEBUG'
105105
})
106106
if (os().isLinux() && isMusl()) {
107107
compilerArgs.add('-D__musl__')

ddprof-lib/src/test/make/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CC := g++
22
SRCDIR := ../../main/cpp-external ../../main/cpp
33
OBJDIR := ./../../../build/scanbuild_obj
4-
CFLAGS := -O0 -Wall -std=c++11 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fvisibility=hidden
4+
CFLAGS := -O0 -Wall -std=c++17 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fvisibility=hidden
55
SRCS := ${wildcard ${SRCDIR}/*.cpp }
66
OBJS=${patsubst ${SRCDIR}/%.cpp,${OBJDIR}/%.o,${SRCS}}
77
INCLUDES := -I$(JAVA_HOME)/include -I../../../../malloc-shim/src/main/public

gradle/configurations.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def commonLinuxCompilerArgs = [
114114
"-fvisibility=hidden",
115115
"-fdata-sections",
116116
"-ffunction-sections",
117-
"-std=c++11",
117+
"-std=c++17",
118118
"-DPROFILER_VERSION=\"${version}\"",
119119
"-DCOUNTERS"
120120
]

malloc-shim/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tasks.withType(CppCompile).configureEach {
1111
"-O3",
1212
"-fno-omit-frame-pointer",
1313
"-fvisibility=hidden",
14-
"-std=c++11",
14+
"-std=c++17",
1515
"-DPROFILER_VERSION=\"${project.getProperty('version')}\""
1616
]
1717
)

0 commit comments

Comments
 (0)