cmake mingw build 找不到 openmp (FindOpenMP)

问题描述

我正在尝试在 ubuntu linux 20.04 上使用 mingw 构建一个 cmake 项目,但是遇到了 cmake 和 openmp 的问题,奇怪的是它可以在 ubuntu 16.04 上运行,但现在不行。我应该尝试调试它的任何想法(也尝试过不同的 cmake 版本)?

CMake Error at /usr/share/cmake-3.20/Modules/FindOpenMP.cmake:394 (try_compile):
  Cannot copy output executable

    ''

  to destination specified by copY_FILE:

    '/tmp/build/CMakeFiles/FindOpenMP/ompver_C.bin'

  Unable to find the executable at any of:

    /tmp/build/CMakeFiles/CMakeTmp/cmTC_3bee9
    /tmp/build/CMakeFiles/CMakeTmp/Debug/cmTC_3bee9
    /tmp/build/CMakeFiles/CMakeTmp/Development/cmTC_3bee9

Call Stack (most recent call first):
  /usr/share/cmake-3.20/Modules/FindOpenMP.cmake:522 (_OPENMP_GET_SPEC_DATE)
  cmake/geogram.cmake:63 (find_package)
  CMakeLists.txt:91 (include)

-- Found OpenMP_C: -fopenmp
CMake Error at /usr/share/cmake-3.20/Modules/FindOpenMP.cmake:394 (try_compile):

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)