Skip to content

Commit

Permalink
Add Include what you use
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo committed Jul 1, 2023
1 parent 049ab63 commit 879599b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion api/include/opentelemetry/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/detail/preprocessor.h"

#define OPENTELEMETRY_ABI_VERSION_NO 1
#define OPENTELEMETRY_VERSION "1.9.1"
Expand Down
12 changes: 8 additions & 4 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ elif [[ "$1" == "cmake.maintainer.sync.test" ]]; then
-DWITH_ASYNC_EXPORT_PREVIEW=OFF \
-DOTELCPP_MAINTAINER_MODE=ON \
-DWITH_NO_DEPRECATED_CODE=ON \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="iwyu" \
"${SRC_DIR}"
make -k
make -k CXX=include-what-you-use CXXFLAGS="-Xiwyu --error_always"
make test
exit 0
elif [[ "$1" == "cmake.maintainer.async.test" ]]; then
Expand All @@ -132,8 +133,9 @@ elif [[ "$1" == "cmake.maintainer.async.test" ]]; then
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DOTELCPP_MAINTAINER_MODE=ON \
-DWITH_NO_DEPRECATED_CODE=ON \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="iwyu" \
"${SRC_DIR}"
make -k -j $(nproc)
make -k CXX=include-what-you-use CXXFLAGS="-Xiwyu --error_always" -j $(nproc)
make test
exit 0
elif [[ "$1" == "cmake.maintainer.cpp11.async.test" ]]; then
Expand Down Expand Up @@ -206,8 +208,9 @@ elif [[ "$1" == "cmake.c++20.test" ]]; then
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="iwyu" \
"${SRC_DIR}"
make -j $(nproc)
make -k CXX=include-what-you-use CXXFLAGS="-Xiwyu --error_always" -j $(nproc)
make test
exit 0
elif [[ "$1" == "cmake.c++20.stl.test" ]]; then
Expand All @@ -219,8 +222,9 @@ elif [[ "$1" == "cmake.c++20.stl.test" ]]; then
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_STL=ON \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="iwyu" \
"${SRC_DIR}"
make -j $(nproc)
make -k CXX=include-what-you-use CXXFLAGS="-Xiwyu --error_always" -j $(nproc)
make test
exit 0
elif [[ "$1" == "cmake.legacy.test" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion ci/setup_ci_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ apt-get install --no-install-recommends --no-install-suggests -y \
wget \
git \
valgrind \
lcov
lcov \
iwyu
2 changes: 0 additions & 2 deletions sdk/include/opentelemetry/sdk/version/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#pragma once

#include "opentelemetry/detail/preprocessor.h"

#define OPENTELEMETRY_SDK_VERSION "1.9.1"

#include "opentelemetry/version.h"
Expand Down

0 comments on commit 879599b

Please sign in to comment.