Skip to content

FindOpenMP: Avoid CMP0054 warnings

Brad King requested to merge brad.king/cmake:FindOpenMP-CMP0054 into master

When invoked in projects that don't set CMP0054 to NEW, FindOpenMP triggers a warning:

CMake Warning (dev) at .../Modules/FindOpenMP.cmake:... (if):
  Policy CMP0054 is not set...Quoted variables like "c" will no
  longer be dereferenced when the policy is set to NEW.  Since
  the policy is not set the OLD behavior will be used.

Set the policy within the module's scope to avoid this.

Fixes: #17292 (closed)

Merge request reports