Skip to content

Commit

Permalink
Fixed preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
fuersten committed Aug 22, 2024
1 parent c57c2ae commit 03ccbce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
build-linux:
name: ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.cxx }}
name: ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.cxx }} CXX-${{matrix.cxx_version}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -86,14 +86,14 @@ jobs:
version=$(grep "project(" CMakeLists.txt | cut -d ' ' -f3)
echo "VERSION=$version" >> "$GITHUB_ENV"
- name: Upload rexsapi package
if: ${{ matrix.build_type == 'Release' && matrix.cxx == 'g++' }}
if: ${{ matrix.build_type == 'Release' && matrix.cxx == 'g++' && matrix.cxx_version == 17 }}
uses: actions/upload-artifact@v4
with:
name: rexsapi-linux-${{env.VERSION}}
path: build/rexsapi-linux-*.zip

build-macos:
name: ${{ matrix.os }} ${{ matrix.build_type }}
name: ${{ matrix.os }} ${{ matrix.build_type }} CXX-${{matrix.cxx_version}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -122,14 +122,14 @@ jobs:
version=$(grep "project(" CMakeLists.txt | cut -d ' ' -f3)
echo "VERSION=$version" >> "$GITHUB_ENV"
- name: Upload rexsapi package
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' && matrix.cxx_version == 17 }}
uses: actions/upload-artifact@v4
with:
name: rexsapi-darwin-${{env.VERSION}}
path: build/rexsapi-darwin-*.zip

build-windows:
name: ${{ matrix.os }} ${{ matrix.build_type }}
name: ${{ matrix.os }} ${{ matrix.build_type }} CXX-${{matrix.cxx_version}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
env.write(entry.format(m.group(1)))
shell: python
- name: Upload rexsapi package
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' && matrix.cxx_version == 17 }}
uses: actions/upload-artifact@v4
with:
name: rexsapi-windows-${{env.VERSION}}
Expand Down
2 changes: 1 addition & 1 deletion include/rexsapi/Types.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <rexsapi/Exception.hxx>
#include <rexsapi/Format.hxx>

#if (__cplusplus >= 202002L || _MSVC_LANG >= 202002L) && not __APPLE__
#if ((__cplusplus >= 202002L || _MSVC_LANG >= 202002L) && !defined(__APPLE__))
#include <chrono>
namespace rexs_date = std::chrono;
namespace rexs_format = std;
Expand Down
2 changes: 1 addition & 1 deletion test/TypesTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ TEST_CASE("Datetime test")
SUBCASE("Parse")
{
const rexsapi::TDatetime dt{"2023-03-28T13:49:36+02:00"};
#if (__cplusplus >= 202002L || _MSVC_LANG >= 202002L) && not __APPLE__
#if ((__cplusplus >= 202002L || _MSVC_LANG >= 202002L) && !defined(__APPLE__))
auto rexs_march = std::chrono::March;
#else
auto rexs_march = date::mar;
Expand Down

0 comments on commit 03ccbce

Please sign in to comment.