cygwin上的CGAL cmake失败了

时间:2014-10-25 12:23:16

标签: cmake cygwin cgal

我正在尝试在cygwin上编译CGAL 4.5(Windows 7)。我安装了gcc-core,gcc-g ++和gmp但是当我尝试运行cmake时出现以下错误:

$ cmake .
-- The CXX compiler identification is GNU 4.8.3
CMake Error: Could not find cmake module file:/home/metalab/CGAL-4.5/CMakeFiles/2.8.11.2/CMakeCXXCompiler.cmake
-- The C compiler identification is GNU 4.8.3
CMake Error: Could not find cmake module file:/home/metalab/CGAL-4.5/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake
CMake Warning at /usr/share/cmake-2.8.11.2/Modules/Platform/CYGWIN.cmake:15 (message):
  CMake no longer defines WIN32 on Cygwin!

  (1) If you are just trying to build this project, ignore this warning or
  quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
  the CMake cache.  If later configuration or build errors occur then this
  project may have been written under the assumption that Cygwin is WIN32.
  In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

  (2) If you are developing this project, add the line

    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required

  at the top of your top-level CMakeLists.txt file or set the minimum
  required version of CMake to 2.8.4 or higher.  Then teach your project to
  build on Cygwin without WIN32.
Call Stack (most recent call first):
  /usr/share/cmake-2.8.11.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
  CMakeLists.txt:7 (project)


CMake Error: Could not find cmake module file:/home/metalab/CGAL-4.5/CMakeFiles/2.8.11.2/CMakeRCCompiler.cmake
-- Check for working CXX compiler: /usr/bin/c++.exe
CMake Error at /usr/share/cmake-2.8.11.2/Modules/CMakeTestCXXCompiler.cmake:40 (try_compile):
  Unknown extension ".cxx" for file

    /home/metalab/CGAL-4.5/CMakeFiles/CMakeTmp/testCXXCompiler.cxx

  try_compile() works only for enabled languages.  Currently these are:

    C CXX RC

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)


-- Check for working CXX compiler: /usr/bin/c++.exe -- broken
CMake Error at /usr/share/cmake-2.8.11.2/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "/usr/bin/c++.exe" is not able to compile a simple test
  program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)


-- Configuring incomplete, errors occurred!

我已经尝试过玩CMAKE_LEGACY_CYGWIN_WIN32但没有成功。

1 个答案:

答案 0 :(得分:1)

我遇到了类似的错误。 cmake似乎无法从Cygwin找到任何东西。

事实是你需要运行Cymawin版本的cmake。如果您从安装程序安装了cmake并且它位于C:\Program Files下,那么您的cmake错误,并且它找不到应该找到的大部分内容。