Problem / use case
The C and Python bindings don't build "out of the box" in native Windows with the Intel OneAPI compiler set. This can be a problem in environments where WSL or Msys alternatives are not available.
Proposed solution
Update build configuration and documentation to successfully build in native Windows using Intel OneAPI while not affecting any other platform / compiler combinations.
Additional context
I have a working configuration that I pushed to my fork for review / comment:
https://github.com/dfnca/cea/tree/feat/icxPythonBinding
- Updated several CMakeLists.txt to use the proper flags for static linking (the gfortran flags were hardwired originally). Also imposed static linking on Intel linux so that a developer environment isn't needed to run cea.
- Added a compiler definition on windows to ensure that the Intel compiler workarounds in the numpy headers are triggered when using icx.
- Removed a system path update in the pytest conftest.py that was causing some tests to skip instead of execute on Windows
- Added a cmake preset to capture some settings for a release build on Windows using ifc/ifx
Open questions:
- how should the difference in Windows / linux compiler options be handled (e.g., -std08 vs -stand:f08
- should documentation be updated with a walkthrough for building on this platform / compiler?
- testing with previous compiler releases. This update has only been tested with Intel 2025.3.2 and gfortran.
Problem / use case
The C and Python bindings don't build "out of the box" in native Windows with the Intel OneAPI compiler set. This can be a problem in environments where WSL or Msys alternatives are not available.
Proposed solution
Update build configuration and documentation to successfully build in native Windows using Intel OneAPI while not affecting any other platform / compiler combinations.
Additional context
I have a working configuration that I pushed to my fork for review / comment:
https://github.com/dfnca/cea/tree/feat/icxPythonBinding
Open questions: