Skip to content

Fix to windows-latest MSVC lwtnn linkage #334

Merged
nsmith- merged 9 commits intocms-nanoAOD:lwtnnfrom
sbein:debug-pr333-windows
Apr 16, 2026
Merged

Fix to windows-latest MSVC lwtnn linkage #334
nsmith- merged 9 commits intocms-nanoAOD:lwtnnfrom
sbein:debug-pr333-windows

Conversation

@sbein
Copy link
Copy Markdown

@sbein sbein commented Mar 27, 2026

This PR is an attempt to build on, and if successful, be pulled into or supersede, @nsmith's draft:
#333

It links lwtnn-stat on MSVC builds, since

target_link_libraries(correctionlib PRIVATE lwtnn-stat)

was inside the non-MSVC branch in CMakeLists.txt, so may be skipped on Windows.

It also fixes correction-config paths for editable installs. Editable installs were showing include/cmake paths from the source tree instead of the installed artifact location, which broke test_cmake_static_compilation.

local checks:

  • pytest -q tests/test_binding.py -vv
  • pytest -q tests/test_lwtnn.py -vv

Comment thread src/correctionlib/cli.py
@sbein
Copy link
Copy Markdown
Author

sbein commented Apr 5, 2026

I think there is now a proposed solution, which involves all commits here except the final one. The last commit temporarily points the lwtnn submodule URL at my fork so CI can fetch the MSVC warning-flags fix for validation. Once the corresponding lwtnn PR is merged upstream, I plan to revert that .gitmodules change and update the submodule pointer to the upstream merged commit.

Copy link
Copy Markdown
Collaborator

@nsmith- nsmith- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI error is extraneous (will look later)
For now I'll merge it into the main PR, thanks for the help!

Comment thread .gitmodules
[submodule "lwtnn"]
path = lwtnn
url = https://github.com/lwtnn/lwtnn.git
url = https://github.com/sbein/lwtnn.git
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might have noticed my patch is not in that repo either. Actually you can get a commit in any fork on github from the main repo.

@nsmith- nsmith- merged commit e9b6e2c into cms-nanoAOD:lwtnn Apr 16, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants