diff options
author | Brad King <brad.king@kitware.com> | 2017-09-22 17:47:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-22 17:50:35 (GMT) |
commit | dd5324ab1e68d745e0e83e0d0fe75fd5c9774bfa (patch) | |
tree | ebb8853d3a3c3d3f4eeb454dd4633f1c9fe84a03 /Modules/FindOpenMP.cmake | |
parent | 4609aaf513ffd6f253ec7c8a8bca6bb93d7eede5 (diff) | |
download | CMake-dd5324ab1e68d745e0e83e0d0fe75fd5c9774bfa.zip CMake-dd5324ab1e68d745e0e83e0d0fe75fd5c9774bfa.tar.gz CMake-dd5324ab1e68d745e0e83e0d0fe75fd5c9774bfa.tar.bz2 |
FindOpenMP: Avoid CMP0054 warnings
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
Diffstat (limited to 'Modules/FindOpenMP.cmake')
-rw-r--r-- | Modules/FindOpenMP.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index 4a3edf9..595b0b3 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -75,6 +75,7 @@ # the OpenMP specification implemented by the ``<lang>`` compiler. cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced cmake_policy(SET CMP0057 NEW) # if IN_LIST function(_OPENMP_FLAG_CANDIDATES LANG) |