Skip to content

Commit

Permalink
Merge branch 'Dynatrace:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaneberl authored Jul 23, 2024
2 parents 1dc0421 + a08d10a commit a1e00b4
Show file tree
Hide file tree
Showing 6,669 changed files with 693,511 additions and 642,195 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
65 changes: 65 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

name: Linux Build & Test

on:
push:
branches: [ "main" ]

jobs:
build:
name: ${{matrix.NAME}}
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "On"
NAME: "g++9.3 Release Dynamic x64"
CC: "gcc"
CXX: "g++"
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "Off"
NAME: "g++9.3 Release Static x64"
CC: "gcc"
CXX: "g++"
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "On"
NAME: "clang 10.0 Release Dynamic x64"
CC: "clang"
CXX: "clang++"
- BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "Off"
NAME: "clang 10.0 Release Static x64"
CC: "clang"
CXX: "clang++"

steps:
- uses: actions/checkout@v3

- name: Create Working directory
run: mkdir -p build

- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.1'

- name: CMake Generation
working-directory: ${{github.workspace}}/build
run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DOPENKIT_BUILD_TESTS=ON -DBUILD_DOC=OFF -DBUILD_SHARED_LIBS=${{matrix.BUILD_SHARED_LIBS}} .. || exit 1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.BUILD_TYPE}} --timeout 600 --output-on-failure
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
35 changes: 35 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Windows Build & Test

on:
push:
branches: [ "main" ]

jobs:
build:
name: ${{matrix.NAME}}
runs-on: windows-2019
strategy:
matrix:
include:
- BUILD_SHARED_LIBS: "On"
BUILD_TYPE: "Release"
- BUILD_SHARED_LIBS: "Off"
BUILD_TYPE: "Release"

steps:
- uses: actions/checkout@v3

- name: Create Build Directory
run: md -Name build -Force

- name: CMake Generation
working-directory: ${{github.workspace}}/build
run: cmake .. -G "Visual Studio 16 2019" "-DCMAKE_CONFIGURATION_TYPES=Debug;Release" -DOPENKIT_BUILD_TESTS=ON -DBUILD_DOC=OFF -DBUILD_SHARED_LIBS=${{matrix.BUILD_SHARED_LIBS}}

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{matrix.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.BUILD_TYPE}} --timeout 600 --output-on-failure
105 changes: 0 additions & 105 deletions .travis.yml

This file was deleted.

83 changes: 43 additions & 40 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2020 Dynatrace LLC
# Copyright 2018-2021 Dynatrace LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -25,19 +25,18 @@ fix_compiler_flags(USE_DEFAULT_WARNINGS_FLAGS)

######
# zlib
add_subdirectory(zlib-1.2.11)
SET(SKIP_INSTALL_FILES TRUE)
set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}")
if (NOT BUILD_SHARED_LIBS OR OPENKIT_MONOLITHIC_SHARED_LIB)
set(BUILD_SHARED_LIBS OFF)
endif()
add_subdirectory(zlib-1.3)
set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}")

######
# libcurl
set(BUILD_CURL_EXE OFF CACHE BOOL "Set to ON to build curl executable.")
if (BUILD_SHARED_LIBS AND NOT OPENKIT_MONOLITHIC_SHARED_LIB)
# if developer builds shared libs, but does not want monolithic OpenKit
# then libCurl is also build as shared library
set(CURL_STATICLIB OFF CACHE BOOL "Set to ON to build libcurl with static linking.")
else()
# either BUILD_SHARED_LIBS is disabled or OPENKIT_MONOLITHIC_SHARED_LIB is enabled
set(CURL_STATICLIB ON CACHE BOOL "Set to ON to build libcurl with static linking.")
endif()
set(CURL_DISABLE_TESTS OFF CACHE BOOL "Disable building cURL tests.")
if(MSVC)
if (OPENKIT_FORCE_SHARED_CRT OR (OPENKIT_MONOLITHIC_SHARED_LIB AND NOT OPENKIT_FORCE_STATIC_CRT))
set(CURL_STATIC_CRT OFF CACHE BOOL "Set to ON to build libcurl with static CRT on Windows (/MT).")
Expand All @@ -51,55 +50,59 @@ set(CMAKE_USE_LIBSSH2 OFF CACHE BOOL "Use libSSH2")
set(CURL_ZLIB ON CACHE BOOL "Set to ON to enable building curl with zlib support.")
if(WIN32)
# on Windows use Windows native SSL/TLS implementation
set(CMAKE_USE_WINSSL ON CACHE BOOL "enable Windows native SSL/TLS")
set(CMAKE_USE_DARWINSSL OFF CACHE BOOL "enable Apple OS native SSL/TLS")
set(CMAKE_USE_SCHANNEL ON CACHE BOOL "enable Windows native SSL/TLS")
set(CMAKE_USE_SECTRANSP OFF CACHE BOOL "enable Apple OS native SSL/TLS")
set(CMAKE_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental")
elseif(APPLE)
# on Darwin OS (OS X/iOS/...) use their native SSL/TLS implementation
set(CMAKE_USE_WINSSL OFF CACHE BOOL "enable Windows native SSL/TLS")
set(CMAKE_USE_DARWINSSL ON CACHE BOOL "enable Apple OS native SSL/TLS")
set(CMAKE_USE_SCHANNEL OFF CACHE BOOL "enable Windows native SSL/TLS")
set(CMAKE_USE_SECTRANSP ON CACHE BOOL "enable Apple OS native SSL/TLS")
set(CMAKE_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental")
else()
# on all other OS fall back to OpenSSL
set(CMAKE_USE_WINSSL OFF CACHE BOOL "enable Windows native SSL/TLS")
set(CMAKE_USE_DARWINSSL OFF CACHE BOOL "enable Apple OS native SSL/TLS")
set(CMAKE_USE_SCHANNEL OFF CACHE BOOL "enable Windows native SSL/TLS")
set(CMAKE_USE_SECTRANSP OFF CACHE BOOL "enable Apple OS native SSL/TLS")
set(CMAKE_USE_OPENSSL ON CACHE BOOL "Use OpenSSL code. Experimental")
endif()
add_subdirectory(curl-7.59.0)

set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}")
if (NOT BUILD_SHARED_LIBS OR OPENKIT_MONOLITHIC_SHARED_LIB)
set(BUILD_SHARED_LIBS OFF)
endif()
add_subdirectory(curl-8.4.0)
set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}")

######
# google test & google mock
if(OPENKIT_BUILD_TESTS)
# enforce same shared CRT settings as for OpenKit
if(BUILD_SHARED_LIBS OR OPENKIT_FORCE_SHARED_CRT)
set(gtest_force_shared_crt ON CACHE BOOL "Set to ON to build libcurl with static CRT on Windows (/MT)." FORCE)
set(gtest_force_shared_crt ON CACHE BOOL "Set to ON to build googletest with static CRT on Windows (/MT)." FORCE)
else ()
set(gtest_force_shared_crt OFF CACHE BOOL "Set to ON to build libcurl with static CRT on Windows (/MT)." FORCE)
set(gtest_force_shared_crt OFF CACHE BOOL "Set to ON to build googletest with static CRT on Windows (/MT)." FORCE)
endif()

# enforce building gmock, which includes gtest as well
set(BUILD_GMOCK ON CACHE BOOL "Builds the googlemock subproject" FORCE)

# disable installation of Google test
set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" FORCE)

# build googletest always as static library
# by temporarily turning of the BUILD_SHARED_LIBS
set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}")
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(googletest-release-1.12.1)
set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}")

add_subdirectory(googletest-release-1.8.0)
if (MSVC)
# hack necessary for Visual C++ compilers
# gtest does not know that newer Visual C++ compilers
# are C++11 compliant.
# MS deprecated tr1 namespace with Visual C++ 17 and due to "warnings as errors"-flag
# this leads to failing build
set (GTEST_MSVC_PREPROCESSOR_HACKS "GTEST_LANG_CXX11=1" "GTEST_HAS_TR1_TUPLE=0")
target_compile_definitions(gtest PUBLIC ${GTEST_MSVC_PREPROCESSOR_HACKS})
target_compile_definitions(gtest_main PUBLIC ${GTEST_MSVC_PREPROCESSOR_HACKS})
target_compile_definitions(gmock PUBLIC ${GTEST_MSVC_PREPROCESSOR_HACKS})
target_compile_definitions(gmock_main PUBLIC ${GTEST_MSVC_PREPROCESSOR_HACKS})
endif ()
endif()


set_target_properties(gmock PROPERTIES FOLDER 3rdparty/googletest)
set_target_properties(gmock_main PROPERTIES FOLDER 3rdparty/googletest)
set_target_properties(gtest PROPERTIES FOLDER 3rdparty/googletest)
set_target_properties(gtest_main PROPERTIES FOLDER 3rdparty/googletest)
set_target_properties(libcurl PROPERTIES FOLDER 3rdparty/libcurl)
set_target_properties(example PROPERTIES FOLDER 3rdparty/libcurl)
set_target_properties(uninstall PROPERTIES FOLDER 3rdparty/libcurl)
set_target_properties(minigzip PROPERTIES FOLDER 3rdparty/zlib)
set_target_properties(zlib PROPERTIES FOLDER 3rdparty/zlib)
set_target_properties(zlibstatic PROPERTIES FOLDER 3rdparty/zlib)

if (BUILD_SHARED_LIBS AND NOT OPENKIT_MONOLITHIC_SHARED_LIB)
set_target_properties(zlib PROPERTIES FOLDER 3rdparty/zlib)
else ()
set_target_properties(zlibstatic PROPERTIES FOLDER 3rdparty/zlib)
endif ()
Loading

0 comments on commit a1e00b4

Please sign in to comment.