FindOpenMP produces CMP0012 warning
I get the following warning while using include(FindOpenMP)
with cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
.
CMake Warning (dev) at /usr/local/Cellar/cmake/3.9.6/share/cmake/Modules/FindOpenMP.cmake:277 (if): if given arguments:
"TRUE"
An argument named "TRUE" appears in a conditional statement. Policy CMP0012 is not set: if() recognizes numbers and boolean constants. Run "cmake --help-policy CMP0012" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /usr/local/Cellar/cmake/3.9.6/share/cmake/Modules/FindOpenMP.cmake:380 (_OPENMP_GET_SPEC_DATE) cmake-build-debug/dependencies/stxxl/src/CMakeLists.txt:499 (include) This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenMP_C: -fopenmp (found version "1.0") CMake Warning (dev) at /usr/local/Cellar/cmake/3.9.6/share/cmake/Modules/FindOpenMP.cmake:277 (if): if given arguments:
"TRUE"
An argument named "TRUE" appears in a conditional statement. Policy CMP0012 is not set: if() recognizes numbers and boolean constants. Run "cmake --help-policy CMP0012" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /usr/local/Cellar/cmake/3.9.6/share/cmake/Modules/FindOpenMP.cmake:380 (_OPENMP_GET_SPEC_DATE) cmake-build-debug/dependencies/stxxl/src/CMakeLists.txt:499 (include) This warning is for project developers. Use -Wno-dev to suppress it.
I am not quite sure if I should suppress this warning with cmake_policy(SET CMP0012 NEW)
. But I think it should be done in FindOpenMP. If you disagree please provide the reasoning :-).