Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
fa8d22c
Added virtual site support for non-perturbed systems
tom-potter-cresset Apr 25, 2025
67e14b2
OpenMM simulations with virtual sites, including coordinate logging t…
tom-potter-cresset Apr 30, 2025
24362d0
Fixed exception parameters
tom-potter-cresset Apr 30, 2025
6f71522
Compute virtual sites before minimisation or dynamics
tom-potter-cresset May 1, 2025
0c36680
Refactored virtual site code
tom-potter-cresset May 9, 2025
fd82689
Constructing openmm systems of perturbable molecules
tom-potter-cresset May 12, 2025
5765a6c
Fixed issue where virtual site charges weren't updated with lambda
tom-potter-cresset May 15, 2025
4b59b33
Fix for virtual sites on ghost atoms
tom-potter-cresset Jun 10, 2025
d80b6f2
Removed references to map["virtual_sites"]
tom-potter-cresset Jun 12, 2025
d2c000a
Restraints account for virtual site offset when constructing an openm…
tom-potter-cresset Aug 6, 2025
6f68914
Restraint fix
tom-potter-cresset Aug 12, 2025
bbd0fac
Merge remote-tracking branch 'origin' into feature_vsites
tom-potter-cresset Oct 17, 2025
f8d0f1c
Merge branch 'devel' into feature_vsites
tom-potter-cresset Oct 22, 2025
feb7994
Merge branch 'devel' into feature_vsites
tom-potter-cresset Oct 23, 2025
59a1efa
Merge branch 'devel' into feature_vsites
tom-potter-cresset Nov 13, 2025
374e00c
Merge remote-tracking branch 'origin' into feature_vsites
tom-potter-cresset Dec 4, 2025
448e067
Merge remote-tracking branch 'origin' into feature_vsites
tom-potter-cresset Dec 4, 2025
c0f0174
Update development version.
lohedges Feb 17, 2026
e926d8c
Add placeholder to CHANGELOG.
lohedges Feb 17, 2026
86d14d3
Add openff-nagl to OBS dependencies.
lohedges Feb 17, 2026
f3a63e6
Merge remote-tracking branch 'origin/devel' into feature_vsites
tom-potter-cresset Feb 17, 2026
9a9f74e
Guard SireOpenMM imports.
lohedges Feb 18, 2026
721a781
openff-nagl is causing issues with Windows Python 3.12.
lohedges Feb 18, 2026
3da5fd3
Fix AMBER CMAP indexing bug. [closes #400]
lohedges Mar 2, 2026
d6f62cc
Merge pull request #401 from OpenBioSim/fix_400
lohedges Mar 3, 2026
05ca87c
Add method to return current energy trajectory records.
lohedges Mar 4, 2026
de8bbf8
Sort energies by lambda.
lohedges Mar 4, 2026
6b378bc
Store energies in lambda order to begin with.
lohedges Mar 5, 2026
8098fee
Fix accidental character deletion.
lohedges Mar 5, 2026
2049dec
Just return a raw NumPy array of floats.
lohedges Mar 5, 2026
208c15f
Merge pull request #403 from OpenBioSim/fix_somd_124
lohedges Mar 6, 2026
e5600d1
Fix GLYCAM force-field parsing issues.
lohedges Mar 9, 2026
718cbaf
Handle perturbable topologies.
lohedges Mar 9, 2026
067dfa7
Fix GLYCAM residue reindexing bug.
lohedges Mar 9, 2026
0b6f83d
Mark GLYCAM tests as slow and refactor.
lohedges Mar 9, 2026
97de1d4
Add BioSimSpace helper function to merge intrascale properties.
lohedges Mar 12, 2026
ccbd942
Fix pasting error.
lohedges Mar 13, 2026
ff60c0d
Fix GroMolType streaming operator.
lohedges Mar 13, 2026
a23a232
Fix errors caused by 1-3 terms in merged molecule.
lohedges Mar 13, 2026
78cd3e7
Fix order.
lohedges Mar 16, 2026
de90d6d
Fix comparison operator.
lohedges Mar 16, 2026
ac18e40
Add method to expose non-default elements of sparse matrix.
lohedges Mar 16, 2026
b281b88
Add fast pre-compute of genuine 1-4 pairs.
lohedges Mar 16, 2026
a35a7d7
Fix autoformatting changes.
lohedges Mar 16, 2026
3aac55c
Merge remote-tracking branch 'origin/devel' into feature_vsites
tom-potter-cresset Mar 16, 2026
f1f9f10
Add clang-format configuration.
lohedges Mar 16, 2026
2cfb531
Autoformat. [ci skip]
lohedges Mar 16, 2026
a112be7
Force UTF-8 encoding on Windows during tests.
lohedges Mar 16, 2026
b0a6e14
Print energies to investigate Windows CI failure.
lohedges Mar 16, 2026
4de636c
Fix missing test env section.
lohedges Mar 16, 2026
b0f1a11
Capture stdout during testing.
lohedges Mar 16, 2026
c0cd911
Skip failing energy assertion on Windows. [ci skip]
lohedges Mar 16, 2026
5de3c7c
Merge pull request #407 from OpenBioSim/fix_glycam
lohedges Mar 16, 2026
81f6fe4
Add support for OpenMM CMAP.
lohedges Mar 18, 2026
3f66444
Expose CMAP merge.
lohedges Mar 18, 2026
d688651
Add test for perturbable CMAPs.
lohedges Mar 18, 2026
c518f9a
Update CHANGELOG.
lohedges Mar 18, 2026
1342b2b
Add timeout to avoid hang when there is no internet connection.
lohedges Mar 18, 2026
7660ee1
Use pre-merge system avoid BioSimSpace dependency and speed up test.
lohedges Mar 18, 2026
7d63fab
Add third chain.
lohedges Mar 18, 2026
78480ce
Formatting tweak.
lohedges Mar 18, 2026
7105611
Return grid values by const reference.
lohedges Mar 18, 2026
3d54be2
Merge pull request #409 from OpenBioSim/feature_openmm_cmap
lohedges Mar 19, 2026
0bf7b5f
Add "cmap" to property list.
lohedges Mar 19, 2026
9b9ea39
Fix pythonizing of CMAP named attributes.
lohedges Mar 19, 2026
9f0ed4e
Expose changed_cmaps function on PeturbableOpenMMMolecule.
lohedges Mar 19, 2026
301b9a2
Fix copy and assignment operators.
lohedges Mar 19, 2026
6f6c7d6
Update perturbable CMAP test to use actual mutation.
lohedges Mar 19, 2026
7ed107e
Fix setLambda when no CMAPs are present in either state.
lohedges Mar 19, 2026
80b6c98
Add support for 4- and 5-point water models with OpenMM.
lohedges Mar 19, 2026
f002ba8
Use math.isnan to make assertion explicit. [ci skip]
lohedges Mar 20, 2026
e822c40
Merge remote-tracking branch 'origin/devel' into feature_vsites
tom-potter-cresset Mar 20, 2026
4315572
Catch edge cases and add functionality for coupling levers.
lohedges Mar 23, 2026
c81b8d4
Energy trajectory key is also required in else block. [ci skip]
lohedges Mar 24, 2026
cf21f12
Merge pull request #412 from OpenBioSim/feature_openmm_vsite_water
lohedges Mar 24, 2026
2a1a567
Fix run_constrained key. [ci skip]
lohedges Mar 24, 2026
0ba5879
Merge pull request #413 from OpenBioSim/fix_run_constrained
lohedges Mar 24, 2026
00c590e
Switch back to run_constraints. This is correct for rattler-build.
lohedges Mar 24, 2026
5a36e6b
Remove duplicate registers.
lohedges Mar 25, 2026
bcf73cf
Deduplicate metatypes per header.
lohedges Mar 25, 2026
4a5c029
Update CHANGELOG.
lohedges Mar 25, 2026
4330138
Merge pull request #414 from OpenBioSim/fix_duplicate_registers
lohedges Mar 25, 2026
c59b2a9
Added virtual site handling to new restraint types
tom-potter-cresset Mar 26, 2026
7cf0659
Fix CI logic for PRs run against external forks. [ci skip]
lohedges Mar 31, 2026
746d0f4
Implement the DMR approach and make it default for using when using M…
akalpokas Mar 30, 2026
94e8980
Update morse potential tests to support DMR, update changelog and upd…
akalpokas Mar 31, 2026
b364f8b
Update formatting in the Morse restraints
akalpokas Mar 31, 2026
39d9cf6
Merge pull request #416 from akalpokas/feature_DMR
lohedges Mar 31, 2026
44c389d
Blacken. [ci skip]
lohedges Mar 31, 2026
ca6e7da
Update Morse potential restraints description
jmichel80 Apr 1, 2026
a9a4ef6
Silently repair intrascale entries that conflict with connectivity.
lohedges Apr 2, 2026
bc818c7
Add repulsion term to the Morse potential
akalpokas Apr 10, 2026
7570005
setCoordinates now takes System by value to avoid mutating the input.
lohedges Apr 10, 2026
7c91397
Merge pull request #417 from OpenBioSim/fix_set_coordinates
lohedges Apr 10, 2026
c3201c0
Fix crash recovery: use pre-run state snapshot and randomise velocities.
lohedges Apr 13, 2026
48612e6
Skip when auto_fix_minimise = False. [ci skip]
lohedges Apr 13, 2026
984e7eb
Merge pull request #420 from OpenBioSim/fix_419
lohedges Apr 13, 2026
74d3be7
Remove redundant code.
lohedges Mar 26, 2026
90abe9e
Add per-force-group energy caching to skip unchanged forces during la…
lohedges Mar 26, 2026
6837f82
Copy Property base class state. [ci skip]
lohedges Apr 9, 2026
47b1547
Add overloads for context state modifying methods.
lohedges Apr 9, 2026
e012473
Reduce kernel calls by consolidating groups.
lohedges Apr 9, 2026
1e13e0f
Formatting tweak.
lohedges Apr 13, 2026
afff783
Conditionally add CMAP force. [ci skip]
lohedges Apr 13, 2026
0200a08
Merge remote-tracking branch 'origin' into feature_vsites
tom-potter-cresset Apr 13, 2026
bcf3767
Add warning when residues are re-ordered. [ref #423]
lohedges Apr 14, 2026
f4118ca
Remove redundant import [ci skip]
lohedges Apr 14, 2026
fa0854e
Update CHANGELOG. [ci skip]
lohedges Apr 14, 2026
ec56bd4
Merge pull request #422 from OpenBioSim/feature_force_groups
lohedges Apr 14, 2026
78a4724
Remove redundant code.
lohedges Apr 14, 2026
fed9d69
Added unit tests for virtual sites in OpenMM
tom-potter-cresset Apr 15, 2026
e50d431
Add pre-commit. [ci skip]
lohedges Apr 15, 2026
f58bdc5
Merge remote-tracking branch 'origin' into feature_vsites
tom-potter-cresset Apr 15, 2026
9aad672
Fix typo in unused method. [ci skip]
lohedges Apr 15, 2026
6455b8b
Updated changelog
tom-potter-cresset Apr 15, 2026
30ca120
Merge remote-tracking branch 'origin' into feature_vsites
tom-potter-cresset Apr 15, 2026
3b5fe05
Avoid conda clang-format, which causes conflicts. [ci skip]
lohedges Apr 15, 2026
378efe3
[ci skip] Removed comments
tom-potter-cresset Apr 15, 2026
7dfe5f7
Merge remote-tracking branch 'origin' into feature_vsites [ci skip]
tom-potter-cresset Apr 15, 2026
0289366
Pass platform to OpenMM in tests
tom-potter-cresset Apr 15, 2026
032f4f1
Use map for platform
tom-potter-cresset Apr 15, 2026
f95f269
Autoformat. [ci skip]
lohedges Apr 16, 2026
4a7ce53
Set virtual site positions in SOMMContext.__init__. [ci skip]
lohedges Apr 16, 2026
01605be
Remove redundant comment. [ci skip]
lohedges Apr 16, 2026
9f5a3e1
Virtual site positions now set in SOMMContext.__init__. [ci skip]
lohedges Apr 16, 2026
43a08ef
Merge pull request #424 from OpenBioSim/feature_vsites
lohedges Apr 16, 2026
21b6bb9
Preferentially use RDKit::determineBondOrders().
lohedges Apr 16, 2026
a7c3fd9
Merge pull request #425 from OpenBioSim/fix_350
lohedges Apr 16, 2026
2d4a4ff
Map the end-state element property when performing HMR. [ci skip]
lohedges Apr 16, 2026
4189f8d
Merge pull request #428 from OpenBioSim/fix_427
lohedges Apr 16, 2026
922e7b7
Fix mergeIntrascale dropping (1,1) pairs in ring-breaking perturbations.
lohedges Apr 17, 2026
a331660
Test a different r_sigma parameter for MorserRestraint [ci skip]
akalpokas Apr 17, 2026
be36dfb
Merge pull request #430 from OpenBioSim/fix_intrascale_merge
lohedges Apr 17, 2026
86ef9e0
Merge devel into feature_repulsive_morse and resolve conflicts
akalpokas Apr 17, 2026
2079f43
Fix out-of-bounds molidx searches silently returning the last molecule.
lohedges Apr 17, 2026
d789fdd
Add missing ruff.toml file. [ci skip]
lohedges Apr 17, 2026
b9b8062
Merge pull request #432 from OpenBioSim/fix_286
lohedges Apr 19, 2026
76a90e9
Fix mergeIntrascale using per-state connectivity for correct bonded d…
lohedges Apr 20, 2026
82d4478
Merge pull request #434 from OpenBioSim/fix_ring_break_merge
lohedges Apr 20, 2026
057c236
Simplify C++ patchIntrascale wrapper function.
lohedges Apr 20, 2026
673c843
Make wrapper function more Pythonic.
lohedges Apr 20, 2026
0aa64d4
Merge branch 'OpenBioSim:devel' into feature_repulsive_morse
akalpokas Apr 21, 2026
8d00483
Reassign end state element and mass properties.
lohedges Apr 21, 2026
21a90d6
Merge pull request #435 from akalpokas/feature_repulsive_morse [ci skip]
lohedges Apr 21, 2026
728757e
Merge pull request #436 from OpenBioSim/fix_515
lohedges Apr 21, 2026
e855b80
Formatting tweak. [ci skip]
lohedges Apr 21, 2026
3b8952d
Add support for weighting lambda schedule stages.
lohedges Apr 24, 2026
3dae8ef
Fix syntax error. (Didn't change outcome.)
lohedges Apr 24, 2026
65a2fb5
Merge pull request #439 from OpenBioSim/feature_stage_weights
lohedges Apr 24, 2026
d10c777
Add support for caching long-range correction coefficients.
lohedges Apr 27, 2026
535f0d0
Split ghost Coulomb and LJ interactions into separate forces.
lohedges Apr 28, 2026
02d8ed4
Only need to use preserveLongRangeCorrection with CustomNonbondedForce.
lohedges Apr 28, 2026
20257f8
Revert debugging update.
lohedges Apr 28, 2026
b293f3a
Add internal caching of CustomNonbondedForce LRC coefficients.
lohedges Apr 28, 2026
4dc6bc9
No longer need preserveLongRangeCorrection parameter.
lohedges Apr 28, 2026
356901a
Update XML parser to handle new custom forces.
lohedges Apr 29, 2026
b27c346
Add full LRC handling via CustomVolume forces.
lohedges Apr 29, 2026
f5e4edf
Add unit test for LRC.
lohedges Apr 29, 2026
758101f
Add paragraph on LRC handling.
lohedges Apr 29, 2026
4975dd2
Remove redundant parameters from CustomNonbondedForce objects.
lohedges Apr 29, 2026
0772799
Add Beutler soft-core form for ABFE.
lohedges Apr 30, 2026
ca6ab90
Name LRC forces.
lohedges Apr 30, 2026
31fd5d8
Add lrc_scale lever.
lohedges May 1, 2026
2a5b8f8
Refactor soft-core expression definitions to avoid duplication.
lohedges May 5, 2026
499dd22
Update method name for clarity.
lohedges May 6, 2026
457aff5
Recombine ghost nonbonded forces to improve performance.
lohedges May 6, 2026
22c36d6
Add unit test for GCMC water LRC.
lohedges May 6, 2026
298f29b
Improve formatting.
lohedges May 6, 2026
0a43fe7
Add method for reversing a LambdaSchedule. [ref OpenBioSim/somd2#78]
lohedges May 7, 2026
d022e0b
Autodetect Visual Studio generator version.
lohedges May 7, 2026
bc53f89
Merge pull request #440 from OpenBioSim/feature_lrc
lohedges May 7, 2026
22b5aab
Apply Cresset patch. [ci skip] [closes #212]
lohedges May 8, 2026
3cb5763
Fix string linting error. [ci skip]
lohedges May 8, 2026
871e2e2
Add support for a QM/MM switching function.
lohedges May 11, 2026
276e8cd
Add CUDA as emle system requirement.
lohedges May 11, 2026
6eb4c81
Fix docstrings.
lohedges May 11, 2026
5af3b0b
Document new switch_width option.
lohedges May 11, 2026
659249d
Merge pull request #441 from OpenBioSim/feature_switching_function
lohedges May 11, 2026
d00f765
Add softcore CustomBondForce for ring-breaking and ring-making pairs.
lohedges May 8, 2026
3928960
Add missing REST2 scaling.
lohedges May 8, 2026
e0d5942
Fix ring-break/make CLJ exception to use morphed charges from CLJ.
lohedges May 12, 2026
b3d954a
Exclude ghost atoms from ring-breaking forces to avoid double counting.
lohedges May 13, 2026
f31f3ea
Merge pull request #442 from OpenBioSim/feature_ring_break_softcore
lohedges May 13, 2026
9ed9f3f
Fix ring-break/make Coulomb to follow ghost-force correction pattern.
lohedges May 14, 2026
afafe29
Correctly track whether cljff needs updating. [ci skip]
lohedges May 14, 2026
e79d9c3
Merge pull request #443 from OpenBioSim/fix_ring_break_softcore
lohedges May 14, 2026
7ac1924
Decouple softcore LJ and Coulomb in ring-break CustomBondForce.
lohedges May 15, 2026
3879052
Merge pull request #444 from OpenBioSim/fix_ring_break_softcore
lohedges May 15, 2026
33569da
Guard against CustomVolumeForce absence. [ci skip]
lohedges May 22, 2026
f47cdaa
Merge pull request #445 from OpenBioSim/fix_guard_CustomVolumeForce
lohedges May 22, 2026
7695e0b
Apply switching function chain rule correction force to nearest QM atom.
lohedges May 29, 2026
37d4d20
Merge pull request #446 from OpenBioSim/fix_switching_function
lohedges May 29, 2026
24a3581
Disable _SECURE_SCL to fix build with MSVC 19.38+.
lohedges May 29, 2026
4ce9b75
Polyfill stdext::make_checked_array_iterator removed in MSVC 14.38+.
lohedges May 29, 2026
6e2ffa2
Guard stdext polyfill with __cplusplus to fix C file compilation.
lohedges May 29, 2026
1b4dc84
Add stdext polyfill force-include to wrapper build for MSVC 14.38+.
lohedges May 29, 2026
a19745c
Update max hydrogen mass to 4.0 g/mol and expose map option to set.
lohedges Jun 16, 2026
cb67f71
Update threshold to handle SOMD2 upper bound.
lohedges Jun 16, 2026
776b5c4
Reduce threshold to handle minimal realistic value.
lohedges Jun 16, 2026
80cf65b
Warn if HMR produces a negative heavy atom mass.
lohedges Jun 16, 2026
0df37ae
Handle kartograf API change.
lohedges Jun 17, 2026
87af385
Pin map_hydrogens_on_hydrogens_only to keep mapping kartograf-version…
lohedges Jun 18, 2026
dde1376
Allocate ghost-14 slot if either end-state exception scale is nonzero.
lohedges Jun 18, 2026
feba446
Constrain unperturbed heavy-atom bonds regardless of mass, matching S…
lohedges Jun 18, 2026
8178db4
Merge pull request #448 from OpenBioSim/fix_447
lohedges Jun 19, 2026
3d05613
Merge branch 'main' into release_2026.1.0
lohedges Jun 25, 2026
c443b08
Update version.
lohedges Jun 25, 2026
c6e2a33
Update CHANGELOG for release. [ci skip]
lohedges Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
SIRE_SILENT_PHONEHOME: 1
SIRE_EMLE: 1
REPO: "${{ github.event.pull_request.head.repo.full_name || github.repository }}"
SIRE_REMOTE: "https://github.com/${{ github.event.pull_request.head.repo.full_name || github.repository }}.git"
steps:
#
- uses: actions/checkout@v4
Expand Down
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
# General file quality checks (Python source files only)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
files: ^(src|tests|wrapper)/
types: [python]
- id: end-of-file-fixer
files: ^(src|tests|wrapper)/
types: [python]
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict

# Python formatting and linting (src/, tests/, and wrapper/ Python files)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
hooks:
# Run the formatter
- id: ruff-format
files: ^(src|tests|wrapper)/
# Run the linter (auto-fix but don't block commits)
- id: ruff
files: ^(src|tests|wrapper)/
args: [--fix, --exit-zero]

# C++ formatting (corelib/ and wrapper/ only)
# Runs clang-format only on files staged for commit, so the codebase
# drifts gradually toward the .clang-format standard rather than
# requiring a blanket one-time reformatting pass.
# NOTE: do NOT run 'pre-commit run --all-files' for C++ — use per-file
# formatting instead to preserve the drift-based approach.
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.3
hooks:
- id: clang-format
files: ^(corelib|wrapper)/.*\.(cpp|h|hpp)$
16 changes: 16 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,22 @@ Developers guide
Please `visit the website <https://sire.openbiosim.org>`__ for information on how to
develop applications using sire.

The repository uses `pre-commit <https://pre-commit.com>`__ to enforce
consistent code style. After setting up your development environment, install
the hooks with:

.. code-block:: bash

pre-commit install

Python code in ``src/``, ``tests/``, and ``wrapper/`` is formatted with
`ruff <https://docs.astral.sh/ruff/>`__; C++ code in ``corelib/`` and
``wrapper/`` is formatted with
`clang-format <https://clang.llvm.org/docs/ClangFormat.html>`__ using the
``.clang-format`` file in the repository root. The C++ formatter runs only
on files staged for commit, allowing the codebase to drift gradually toward
a consistent style without a blanket one-time reformatting.

GitHub actions
--------------
Since sire is quite large, a build can take quite long and might not be neccessary
Expand Down
19 changes: 14 additions & 5 deletions actions/generate_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,20 @@ def get_git_info(srcdir):
"""Get the git remote URL and branch/tag."""
gitdir = os.path.join(srcdir, ".git")

remote = run_cmd(
f"git --git-dir={gitdir} --work-tree={srcdir} config --get remote.origin.url"
)
if not remote.endswith(".git"):
remote += ".git"
# For PR builds from external forks the checkout remote points to the base
# repo, not the fork. The workflow sets SIRE_REMOTE to the fork's clone
# URL so that rattler-build fetches from the right place.
env_remote = os.environ.get("SIRE_REMOTE")
if env_remote:
remote = env_remote
if not remote.endswith(".git"):
remote += ".git"
else:
remote = run_cmd(
f"git --git-dir={gitdir} --work-tree={srcdir} config --get remote.origin.url"
)
if not remote.endswith(".git"):
remote += ".git"

branch = run_cmd(
f"git --git-dir={gitdir} --work-tree={srcdir} rev-parse --abbrev-ref HEAD"
Expand Down
3 changes: 3 additions & 0 deletions corelib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ elseif (MSVC)
add_compile_options("/EHsc")
add_compile_options("/permissive-")
add_compile_options("/Zc:twoPhase-")
# Provide stdext::make_checked_array_iterator stub for MSVC 14.38+ where it was removed.
# Qt5's qvector.h uses it unconditionally on MSVC, so force-include a polyfill.
add_compile_options("/FI${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/stdext_compat.h")
message( STATUS "Compiling with MSVC" )
set( SIRE_COMPILER "MSVC" )

Expand Down
22 changes: 22 additions & 0 deletions corelib/build/cmake/stdext_compat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once
// stdext::make_checked_array_iterator and make_unchecked_array_iterator were
// removed in MSVC 14.38 (VS 2022 17.8). Qt5's qcompilerdetection.h maps
// QT_MAKE_CHECKED_ARRAY_ITERATOR and QT_MAKE_UNCHECKED_ARRAY_ITERATOR to these
// functions unconditionally on MSVC, so provide no-op stubs.
#if defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER >= 1938
#include <cstddef>
namespace stdext
{
template <typename T>
T *make_checked_array_iterator(T *ptr, std::size_t, std::size_t index = 0)
{
return ptr + index;
}

template <typename T>
T *make_unchecked_array_iterator(T *ptr)
{
return ptr;
}
}
#endif
Loading