From 0e7550f392e806c8f51c824fcff5351c873a64b6 Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:09:39 +0800 Subject: [PATCH 1/8] Workflow --- .github/workflows/Linux-clang.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/Linux-gcc.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/Windows.yml | 27 +++++++++++++++++++++++++++ .github/workflows/macOS.yml | 29 +++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 .github/workflows/Linux-clang.yml create mode 100644 .github/workflows/Linux-gcc.yml create mode 100644 .github/workflows/Windows.yml create mode 100644 .github/workflows/macOS.yml diff --git a/.github/workflows/Linux-clang.yml b/.github/workflows/Linux-clang.yml new file mode 100644 index 00000000..4a5698c7 --- /dev/null +++ b/.github/workflows/Linux-clang.yml @@ -0,0 +1,30 @@ +name: "Linux Clang" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + BUILD_TYPE: Release + CXX: clang++-9 + +jobs: + job: + name: "Linux Clang" + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Configure + run: mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=../bin .. + - name: Build + run: cmake --build build + - name: Install + run: cmake --install build diff --git a/.github/workflows/Linux-gcc.yml b/.github/workflows/Linux-gcc.yml new file mode 100644 index 00000000..85689d13 --- /dev/null +++ b/.github/workflows/Linux-gcc.yml @@ -0,0 +1,30 @@ +name: "Linux GCC" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + BUILD_TYPE: Release + CXX: g++-9 + +jobs: + job: + name: "Linux GCC" + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Configure + run: mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=../bin .. + - name: Build + run: cmake --build build + - name: Install + run: cmake --install build diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml new file mode 100644 index 00000000..d31d1767 --- /dev/null +++ b/.github/workflows/Windows.yml @@ -0,0 +1,27 @@ +name: Windows + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + job: + name: Windows + runs-on: windows-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Configure + run: mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=../bin .. + - name: Build + run: cmake --build build + # - name: Install + # run: cmake --install build + diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml new file mode 100644 index 00000000..02ef6304 --- /dev/null +++ b/.github/workflows/macOS.yml @@ -0,0 +1,29 @@ +name: macOS + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + BUILD_TYPE: Release + +jobs: + job: + name: macOS + runs-on: macos-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Configure + run: mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=../bin .. + - name: Build + run: cmake --build build + - name: Install + run: cmake --install build From 55c5467b357534ae7eeb316de23f871c315ca71d Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:14:05 +0800 Subject: [PATCH 2/8] Update SIOBuild.cmake --- cmake/SIOBuild.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/SIOBuild.cmake b/cmake/SIOBuild.cmake index 222a236f..1f5ca610 100644 --- a/cmake/SIOBuild.cmake +++ b/cmake/SIOBuild.cmake @@ -289,5 +289,7 @@ ENDFOREACH() IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 ) SET( CMAKE_CXX_FLAGS "-fdiagnostics-color=auto ${CMAKE_CXX_FLAGS}" ) ENDIF() - +IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + SET( CMAKE_CXX_FLAGS "/permissive- ${CMAKE_CXX_FLAGS}" ) +ENDIF() INSTALL( FILES cmake/MacroCheckPackageLibs.cmake cmake/MacroCheckPackageVersion.cmake DESTINATION lib/cmake ) From f98553d20e8ab41df6fd32e3a164e072c32851bd Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:18:21 +0800 Subject: [PATCH 3/8] Update api.h --- source/include/sio/api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/sio/api.h b/source/include/sio/api.h index 16a99d76..ee4efdc2 100644 --- a/source/include/sio/api.h +++ b/source/include/sio/api.h @@ -1,5 +1,5 @@ #pragma once - +#define NOMINMAX // -- sio headers #include #include From 18181048d7dadbe5de4a002614febc6e12462293 Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:18:35 +0800 Subject: [PATCH 4/8] Update api.h --- source/include/sio/api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/include/sio/api.h b/source/include/sio/api.h index ee4efdc2..16a99d76 100644 --- a/source/include/sio/api.h +++ b/source/include/sio/api.h @@ -1,5 +1,5 @@ #pragma once -#define NOMINMAX + // -- sio headers #include #include From bc8560237aa3ef3d31b4642e4e8f9618b5855b0d Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:20:33 +0800 Subject: [PATCH 5/8] Update definitions.h --- source/include/sio/definitions.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/include/sio/definitions.h b/source/include/sio/definitions.h index b2921445..7116c1c2 100644 --- a/source/include/sio/definitions.h +++ b/source/include/sio/definitions.h @@ -9,6 +9,9 @@ #include #include #include +#ifdef _WIN32 +#define NOMINMAX +#endif #ifdef __APPLE__ #include <_types.h> #include <_types/_uint16_t.h> From c523c3eb78f6bb708a9d02fa8a5bbfae19b509c2 Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:23:54 +0800 Subject: [PATCH 6/8] Update api.h --- source/include/sio/api.h | 1 + 1 file changed, 1 insertion(+) diff --git a/source/include/sio/api.h b/source/include/sio/api.h index 16a99d76..8dacd666 100644 --- a/source/include/sio/api.h +++ b/source/include/sio/api.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace sio { From 61b0d25aba0dc79aec3778c80181367382350a49 Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:30:31 +0800 Subject: [PATCH 7/8] Update CMakeLists.txt --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83f10670..56443cec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ # @author Frank Gaede, DESY # @author Jan Engels, DESY # @author Remi Ete, DESY -CMAKE_MINIMUM_REQUIRED( VERSION 2.8 FATAL_ERROR ) +CMAKE_MINIMUM_REQUIRED( VERSION 3.1 FATAL_ERROR ) ######################################################## # project name @@ -18,6 +18,8 @@ SET( SIO_VERSION_PATCH 2 ) LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) +SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + # options OPTION( SIO_EXAMPLES "Switch ON to build SIO examples" ON ) OPTION( INSTALL_DOC "Set to OFF to skip build/install Documentation" OFF ) From 70a5b4a6bf9b0af3e2d4f8cd22ce42e07be51be0 Mon Sep 17 00:00:00 2001 From: flagarde Date: Tue, 4 Aug 2020 16:45:49 +0800 Subject: [PATCH 8/8] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56443cec..80877636 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ # @author Frank Gaede, DESY # @author Jan Engels, DESY # @author Remi Ete, DESY -CMAKE_MINIMUM_REQUIRED( VERSION 3.1 FATAL_ERROR ) +CMAKE_MINIMUM_REQUIRED( VERSION 3.4 FATAL_ERROR ) ######################################################## # project name