Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Misc build scripts cleanup #2232

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,6 @@ set(OTELCPP_PROTO_PATH
CACHE PATH "Path to opentelemetry-proto")

if(WIN32)
if(BUILD_TESTING)
if(MSVC)
# Warning as error: warning STL4036: <ciso646> is removed in C++20
add_compile_options(/wd4996)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this option no longer needed?

Copy link
Member Author

@marcalff marcalff Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opentelemetry-cpp code does not even include header ciso464, and the build passes in maintainer mode on windows without the option, even when tests are compiled, with the dependency in GTest.

PR#2114 added this, but I think it was not needed.

This fix corrects it, and resolves your comment:

https://github.com/open-telemetry/opentelemetry-cpp/pull/2114/files#r1260156709

endif()
endif()
option(WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
endif(WIN32)

Expand Down
9 changes: 3 additions & 6 deletions ci/setup_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,19 @@ if [ "x$CMAKE_VERSION" = "x" ]; then
export CMAKE_VERSION=3.15.2
fi

# This variable not set on CI pipeline for only legacy environment(GCC 4.8).
# With 1.13.0 version, C++14 must be set which does not supported by legacy environment anymore.
# Also with this version, release version path needs to be adapted.
if [ -z "${GOOGLETEST_VERSION}" ]; then
# By default, GoogleTest version set the following version.
# Version by default. Requires C++14.
export GOOGLETEST_VERSION=1.13.0
fi

OLD_GOOGLETEST_VERSION_REGEXP="^1\.([0-9]|10|11|12)(\..*)?$"

# If GoogleTest version less than ${GOOGLETEST_LATEST_VERSION}
# Else otherwise
if [[ ${GOOGLETEST_VERSION} =~ ${OLD_GOOGLETEST_VERSION_REGEXP} ]]; then
# Old (up to 1.12.x included) download URL format.
GOOGLETEST_VERSION_PATH="release-${GOOGLETEST_VERSION}"
GOOGLETEST_FOLDER_PATH="googletest-release-${GOOGLETEST_VERSION}"
else
# New (since 1.13.0) download URL format.
GOOGLETEST_VERSION_PATH="v${GOOGLETEST_VERSION}"
GOOGLETEST_FOLDER_PATH="googletest-${GOOGLETEST_VERSION}"
fi
Expand Down