Skip to content

Conversation

@karosc
Copy link
Member

@karosc karosc commented Sep 2, 2025

This fixes a regression that prevents openmp from linking on macos

Adding set(OpenMP_AVAILABLE TRUE) gets swmm-solver to attempt linking to omp project built on macos

Adding the target_include_directories block below gets swmm-solver to find omp.h when compiling.

target_include_directories(
    omp
    INTERFACE
        ${OPENMP_INCLUDE_DIR}
)

@michaeltryby
Copy link
Collaborator

@karosc Nice catch! After implementing this several years ago and giving it some thought in the intervening time, I've come to the conclusion that the wheel build is the wrong place to handle swmm's OpenMP dependency on MacOS. It more naturally fits as part of the swmm library build. Besides being in the wrong place it also doesn't work ... which you cleverly figured out!

I am working on a PR to move this into the swmm-solver. I will incorporate the include path and compiler flag changes you have identified. I appreciate your help on this! Thank you!

@karosc
Copy link
Member Author

karosc commented Sep 2, 2025

@michaeltryby, I agree. SWMM feels like a more natural place for this cmake fu.

@karosc karosc closed this Sep 2, 2025
@karosc karosc deleted the fix_macos_openmp branch September 10, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants