Skip to content

FindOpenMP: Do not overwrite user-set FLAGS, LIB_NAMES

Balthasar Reuter requested to merge reuterbal/cmake:reuterbal-23743 into master

Since !4327 (merged) we replace both OpenMP_${LANG}_FLAGS and OpenMP_${LANG}_LIB_NAMES with detected flags if either one is not set. That can overwrite user-provided flags.

Update the logic for C, CXX, and Fortran to initialize each OpenMP_${LANG}_{FLAGS,LIB_NAMES} variable only if it has not already been set by the user.

Fixes: #23743 (closed)
Topic-rename: FindOpenMP-no-force-flags

Edited by Brad King

Merge request reports