FindOpenMP dev warning and fails to find openmp on conda
I'm trying to build galario on conda.
https://github.com/mtazzari/galario/issues/93
https://github.com/conda-forge/staged-recipes/pull/4067
To add OpenMP support for mac and linux, I tried building with the condagcc
package with version 4.8.5 and the conda cmake version is 4.9. There are two problems
warning
CMake Warning (dev) at /tmp/conda-galario/galario_1507193012026/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/share/cmake-3.9/Modules/FindOpenMP.cmake:200 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
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.
Call Stack (most recent call first):
/tmp/conda-galario/galario_1507193012026/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/share/cmake-3.9/Modules/FindOpenMP.cmake:324 (_OPENMP_GET_FLAGS)
Please set the policies and update FindOpenMP.cmake
not finding openmp
The full build logs on the mac are here https://travis-ci.org/conda-forge/staged-recipes/builds/283589234?utm_source=github_status&utm_medium=notification
On mac os, openmp is found
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
...
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
But testing on my linux machine with ubuntu 16.04 with identical conda packages, it is not found
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
...
-- Could NOT find OpenMP_C (missing: OpenMP_pthread_LIBRARY OpenMP_c_LIBRARY) (found version "3.1")
-- Could NOT find OpenMP_CXX (missing: OpenMP_pthread_LIBRARY OpenMP_c_LIBRARY) (found version "3.1")
I'm not sure if this an evil linker/loader issue, or if it is due to this cmake module.
For the moment, I have to rely on the hostr gnu compiler's availability on a linux system as I can't use the conda gcc
package.