Skip to content

Commit

Permalink
Merge pull request #14 from theodelrieu/fix/config
Browse files Browse the repository at this point in the history
Fix/config
  • Loading branch information
theodelrieu authored Sep 14, 2021
2 parents f511256 + 4498108 commit 68235d2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
run: brew install ninja
- name: Build and test
run: python $GITHUB_WORKSPACE/ci/run-ci.py build-and-test --profile $GITHUB_WORKSPACE/ci/conan-profiles/macos11
build-windows:
build-windows-cxx14:
runs-on: windows-latest
strategy:
matrix:
Expand All @@ -105,7 +105,32 @@ jobs:
run: |
set CXX=cl
"${{ matrix.vcvars_cmd }}" ${{ matrix.vcvars_args }} && python %GITHUB_WORKSPACE%/ci/run-ci.py build-and-test --profile %GITHUB_WORKSPACE%/ci/conan-profiles/${{ matrix.compiler }}
build-windows-cxx17:
runs-on: windows-latest
strategy:
matrix:
compiler: [vs2019]
include:
- os: windows-latest
compiler: vs2019
vcvars_cmd: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
vcvars_args: x64 10.0.18362.0
steps:
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install conan and path
run: pip install conan==$env:CONAN_VERSION path==$env:PATH_VERSION --user
- name: Checkout repository
uses: actions/checkout@v1
- name: Install build tools
run: cinst ninja -y
- name: Build and test
shell: cmd
run: |
set CXX=cl
"${{ matrix.vcvars_cmd }}" ${{ matrix.vcvars_args }} && python %GITHUB_WORKSPACE%/ci/run-ci.py build-and-test --profile %GITHUB_WORKSPACE%/ci/conan-profiles/vs2019-cxx17
build-windows-cxx20:
runs-on: windows-latest
strategy:
Expand All @@ -116,7 +141,6 @@ jobs:
compiler: vs2019
vcvars_cmd: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
vcvars_args: x64 10.0.18362.0

steps:
- name: Setup Python environment
uses: actions/setup-python@v2
Expand Down
10 changes: 10 additions & 0 deletions ci/conan-profiles/vs2019-cxx17
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[settings]
os=Windows
os_build=Windows
build_type=Release
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
compiler.runtime=MD
compiler.cppstd=17
arch=x86_64
15 changes: 5 additions & 10 deletions config/include/mgs/config.hpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
#pragma once

#ifdef _MSC_VER
# if _MSVC_LANG >= 201402L
# define MGS_HAS_CPP14
# if _MSVC_LANG >= 201703L
# define MGS_HAS_CPP17
# define MGS_HAS_CPP20
# endif
# if _MSVC_LANG > 201703L
# define MGS_HAS_CPP20
# define MGS_HAS_CPP17
# elif _MSVC_LANG > 201402L
# define MGS_HAS_CPP17
# endif
#else
# if __cplusplus >= 201709L
# define MGS_HAS_CPP20
# define MGS_HAS_CPP17
# define MGS_HAS_CPP14
# elif __cplusplus >= 201703L
# define MGS_HAS_CPP17
# define MGS_HAS_CPP14
# elif __cplusplus >= 201402L
# define MGS_HAS_CPP14
# endif
#endif

0 comments on commit 68235d2

Please sign in to comment.