Eigen3无法使用cmake安装:找不到RegexUtils

时间:2019-06-16 15:59:38

标签: eigen3

我尝试在ubuntu 16上使用cmake安装eigen3.3.7,但cmake失败。

我遵循INSTALL文件提示: 1)我提取tar档案 2)创建一个名为buildDir的“ build”目录 3)转到构建目录:cd buildDir 4)开始cmake:cmake ../ Eigen

然后,cmake进程以错误结束:

CMakeLists.txt中的CMake错误:1(包括):   包含找不到加载文件:

RegexUtils

CMakeLists.txt:2(test_escape_string_as_regex)的CMake错误:   未知的CMake命令“ test_escape_string_as_regex”。

请问一些提示吗? 问候 西尔万

我遵循chtz的建议,但仍然失败,请参见控制台输出:

     syl@spica:~/tmp/eigen/eigen-eigen-323c052e1731$ cat INSTALL 
Installation instructions for Eigen
***********************************
Method 2. Installing using CMake
********************************

Let's call this directory 'source_dir' (where this INSTALL file is).
Before starting, create another directory which we will call 'build_dir'.

Do:

  cd build_dir
  cmake source_dir
  make install

syl@spica:~/tmp/eigen/eigen-eigen-323c052e1731$ mkdir build && cd build

syl@spica:~/tmp/eigen/eigen-eigen-323c052e1731/build$ cmake ../
CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    RegexUtils


CMake Error at CMakeLists.txt:2 (test_escape_string_as_regex):
  Unknown CMake command "test_escape_string_as_regex".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/syl/tmp/eigen/eigen-eigen-323c052e1731/CMakeFiles/CMakeOutput.log".
syl@spica:~/tmp/eigen/eigen-eigen-323c052e1731/build$ vim ../CMakeFiles/CMakeOutput.log

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

下载后,此命令序列似乎可以正常工作(在我的情况下,是最新版本的eigen-3.3.7):

bunzip2 eigen-3.3.7.tar.bz2
tar -xvf eigen-3.3.7.tar
cd eigen-3.3.7/
mkdir build
cd build
cmake ../.
sudo make install