Skip to content

[feature] C and Python bindings when building on native Windows with Intel OneAPI #22

Description

@dfnca

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

  1. 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.
  2. Added a compiler definition on windows to ensure that the Intel compiler workarounds in the numpy headers are triggered when using icx.
  3. Removed a system path update in the pytest conftest.py that was causing some tests to skip instead of execute on Windows
  4. Added a cmake preset to capture some settings for a release build on Windows using ifc/ifx

Open questions:

  1. how should the difference in Windows / linux compiler options be handled (e.g., -std08 vs -stand:f08
  2. should documentation be updated with a walkthrough for building on this platform / compiler?
  3. testing with previous compiler releases. This update has only been tested with Intel 2025.3.2 and gfortran.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions