Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no-JSON and Windows builds #1200

Merged
merged 9 commits into from
Apr 25, 2024
Merged

Conversation

sethrj
Copy link
Member

@sethrj sethrj commented Apr 24, 2024

This is a follow-on to #1196 . It fixes the new CI builds that were introduced.

MSVC warnings that this fixes

Throwing from a C function with windows:

celeritas\src\corecel\sys\ScopedSignalHandler.cc(29): error C2220: the following warning is treated as an error
celeritas\src\corecel\sys\ScopedSignalHandler.cc(29): warning C4297: '`anonymous-namespace'::celer_set_signal': function assumed not to throw an exception but does
celeritas\src\corecel\sys\ScopedSignalHandler.cc(29): note: The function is extern "C" and /EHc was specified

Using std::fma in an integer template context:

celeritas\src\orange\MatrixUtils.cc(76): error C2220: the following warning is treated as an error
celeritas\src\orange\MatrixUtils.cc(76): warning C4244: '=': conversion from 'double' to 'int', possible loss of data

Missing include:

celeritas\src\orange\orangeinp\detail\PostfixLogicBuilder.cc(215): error C2039: 'sort': is not a member of 'std'

Not propagating compile flags to celer-g4 when Geant4 is disabled:

ostream(779): error C2220: the following warning is treated as an error
ostream(779): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

Accidental use of real_type instead of size_type:

celeritas\src\celeritas\optical\detail\../OpticalGenData.hh(150): warning C4244: 'argument': conversion from 'const celeritas::real_type' to 'size_t', possible loss of data

Implicit truncation from real_type to size_type:

2024-04-21T11:40:36.2485761Z D:\a\celeritas\celeritas\src\celeritas/optical/ScintillationPreGenerator.hh(120): error C2220: the following warning is treated as an error
2024-04-21T11:40:36.2488477Z D:\a\celeritas\celeritas\src\celeritas/optical/ScintillationPreGenerator.hh(120): warning C4244: '=': conversion from 'T' to 'celeritas::size_type', possible loss of data

@sethrj sethrj added bug Something isn't working core Software engineering infrastructure labels Apr 24, 2024
@sethrj sethrj requested a review from pcanal April 24, 2024 19:23
Throwing from a C function with windows:
```
celeritas\src\corecel\sys\ScopedSignalHandler.cc(29): error C2220: the following warning is treated as an error
celeritas\src\corecel\sys\ScopedSignalHandler.cc(29): warning C4297: '`anonymous-namespace'::celer_set_signal': function assumed not to throw an exception but does
celeritas\src\corecel\sys\ScopedSignalHandler.cc(29): note: The function is extern "C" and /EHc was specified
```

Using `std::fma` in an integer template context:
```
celeritas\src\orange\MatrixUtils.cc(76): error C2220: the following warning is treated as an error
celeritas\src\orange\MatrixUtils.cc(76): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
```

Missing include:
```
celeritas\src\orange\orangeinp\detail\PostfixLogicBuilder.cc(215): error C2039: 'sort': is not a member of 'std'
```

Not propagating compile flags to celer-g4 when Geant4 is disabled:
```
ostream(779): error C2220: the following warning is treated as an error
ostream(779): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
```

Accidental use of real_type instead of size_type:
```
celeritas\src\celeritas\optical\detail\../OpticalGenData.hh(150): warning C4244: 'argument': conversion from 'const celeritas::real_type' to 'size_t', possible loss of data
```

Implicit truncation from real_type to size_type:
```
2024-04-21T11:40:36.2485761Z D:\a\celeritas\celeritas\src\celeritas/optical/ScintillationPreGenerator.hh(120): error C2220: the following warning is treated as an error
2024-04-21T11:40:36.2488477Z D:\a\celeritas\celeritas\src\celeritas/optical/ScintillationPreGenerator.hh(120): warning C4244: '=': conversion from 'T' to 'celeritas::size_type', possible loss of data
```
@sethrj sethrj marked this pull request as ready for review April 24, 2024 20:03
@sethrj sethrj requested a review from pcanal April 24, 2024 20:03
@sethrj sethrj enabled auto-merge (squash) April 25, 2024 03:26
@sethrj sethrj removed the request for review from amandalund April 25, 2024 11:47
@sethrj sethrj disabled auto-merge April 25, 2024 11:48
@sethrj sethrj merged commit 6f47d21 into celeritas-project:develop Apr 25, 2024
27 of 28 checks passed
@sethrj sethrj deleted the windows-fix branch April 25, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Software engineering infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants