Skip to content

Commit

Permalink
attempt to fix msvc version macro builds
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jul 20, 2024
1 parent d35c283 commit d4a9a0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
set PATH=%BOOST_ROOT%;%PATH%
set PYTHON_INTERPRETER=python
cd test
b2 -l400 warnings=all warnings-as-errors=on ${{ matrix.config }} deterministic-tests
b2 -l400 msvc-version-macro=on warnings=all warnings-as-errors=on ${{ matrix.config }} deterministic-tests
- name: tests (flaky)
Expand All @@ -63,7 +63,7 @@ jobs:
:retry
if %c%==0 exit /B 1
set /a c = %c% -1
b2 -l400 warnings=all warnings-as-errors=on ${{ matrix.config }}
b2 -l400 msvc-version-macro=on warnings=all warnings-as-errors=on ${{ matrix.config }}
if %errorlevel%==0 exit /B 0
if %c% gtr 0 goto retry
exit /B 1
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
echo %BOOST_ROOT%
echo %PATH%
cd simulation
b2 --hash release address-model=64 link=static debug-iterators=off invariant-checks=on define=BOOST_ASIO_DISABLE_IOCP asserts=on testing.execute=off
b2 --hash release msvc-version-macro=on address-model=64 link=static debug-iterators=off invariant-checks=on define=BOOST_ASIO_DISABLE_IOCP asserts=on testing.execute=off
- name: run sims
uses: nick-fields/retry@v3
Expand All @@ -114,7 +114,7 @@ jobs:
timeout_minutes: 120
command: |
cd simulation
b2 --hash -l700 release address-model=64 link=static debug-iterators=off invariant-checks=on define=BOOST_ASIO_DISABLE_IOCP asserts=on
b2 --hash -l700 release msvc-version-macro=on address-model=64 link=static debug-iterators=off invariant-checks=on define=BOOST_ASIO_DISABLE_IOCP asserts=on
build:
name: Build
Expand Down Expand Up @@ -149,23 +149,23 @@ jobs:
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
b2 ${{ matrix.config }} cxxstd=14 address-model=64 warnings=all warnings-as-errors=on
b2 ${{ matrix.config }} cxxstd=14 msvc-version-macro=on address-model=64 warnings=all warnings-as-errors=on
- name: build examples
if: ${{ ! contains(matrix.config, 'windows-api=store') }}
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
cd examples
b2 ${{ matrix.config }} address-model=64 warnings=all warnings-as-errors=on
b2 ${{ matrix.config }} msvc-version-macro=on address-model=64 warnings=all warnings-as-errors=on
- name: build tools
if: ${{ ! contains(matrix.config, 'windows-api=store') }}
run: |
set BOOST_ROOT=%CD%\boost
set PATH=%BOOST_ROOT%;%PATH%
cd tools
b2 ${{ matrix.config }} address-model=64 warnings=all warnings-as-errors=on
b2 ${{ matrix.config }} msvc-version-macro=on address-model=64 warnings=all warnings-as-errors=on
mingw:
name: MingW
Expand Down
7 changes: 0 additions & 7 deletions Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,8 @@ rule building ( properties * )
# https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170
result += <cxxflags>/permissive- ;
}

# ask the compiler to correctly set __cplusplus version
if <toolset>msvc in $(properties)
{
result += <msvc-version-macro>on ;
}
}


if <toolset>gcc in $(properties) && <target-os>windows in $(properties)
{
# allow larger .obj files (with more sections)
Expand Down

0 comments on commit d4a9a0c

Please sign in to comment.