CMake Error at src/CMakeLists.txt:355 (target_compile_features): target_compile_features The compiler feature "cxx_variable_templates" is not known to CXX compiler "GNU" version 4.8.4. -- Configuring incomplete, errors occurred!
时间: 2024-03-20 16:44:22 浏览: 17
这个错误是由于你的编译器不支持 C++17 的变量模板特性导致的。你需要使用支持该特性的编译器或者禁用该特性。如果你使用的是 GCC 编译器,可以尝试升级到版本 5.4 或者更高版本,或者在 CMakeLists.txt 文件中添加以下代码来禁用该特性:
```cmake
target_compile_options(your_target_name PRIVATE -fno-implicit-templates)
```
这将禁止编译器隐式地生成变量模板实例化代码。
相关问题
CMake Error at src/CMakeLists.txt:355 (target_compile_features): target_compile_features The compiler feature "cxx_variable_templates" is not known to CXX compiler
这个错误是由于C++编译器不支持`cxx_variable_templates`这个编译特性导致的。您需要检查您使用的C++编译器的版本和支持的特性,然后在CMakeLists.txt文件中将这个特性从`target_compile_features`中移除,或者升级您的C++编译器以支持这个特性。您可以尝试将 `cxx_variable_templates` 替换为C++标准版本,例如 `cxx_std_11` 或 `cxx_std_14`。
Building Tests requested, but Catch2 library not found. CMake Error at components/pango_core/CMakeLists.txt:38 (target_compile_features): target_compile_features The compiler feature "cxx_decltype_auto" is not known to CXX compiler "GNU" version 4.8.4. Call Stack (most recent call first): CMakeLists.txt:93 (include) CMake Error at components/pango_geometry/CMakeLists.txt:3 (find_package): Could not find a package configuration file provided by "Eigen3" with any of the following names: Eigen3Config.cmake eigen3-config.cmake Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set "Eigen3_DIR" to a directory containing one of the above files. If "Eigen3" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:93 (include) -- Configuring incomplete, errors occurred! See also "/home/slam-learn/projects/pangolin/build/CMakeFiles/CMakeOutput.log". See also "/home/slam-learn/projects/pangolin/build/CMakeFiles/CMakeError.log".
这是一个CMake的错误。提示说在编译时使用了"Cxx_decltype_auto"这个C++11特性,但是你的编译器版本不支持。另外,还提示找不到Eigen3库的配置文件,需要将其安装,并将其路径添加到CMAKE_PREFIX_PATH或Eigen3_DIR变量中。你可以尝试升级你的编译器或者安装Eigen3库来解决这个问题。