尝试通过CGAL_CXX_FLAGS设置 --std=c++0x 或 -std=gnu++0x 会忽略值
Trying to set --std=c++0x or -std=gnu++0x via CGAL_CXX_FLAGS ignores values
我正在尝试编译一些将使用 CGAL 但使用产生错误的包含文件的代码。该错误说使用 -std=c++0x
或 -std=gnu++0x
进行编译。
如果我将-std=c++0x
或-std=gnu++0x
添加到CGAL_CXX_FLAGS
i,e cmake -DCGAL_CXX_FLAGS='-std=c++0x or -std=gnu++0x -I
等,它只是忽略了我为CGAL_CXX_FLAGS
设置的内容。
如果我从CGAL_CXX_FLAGS
中省略-std=c++0x
或-std=gnu++0x
,它将C++编译器标志设置为正常,但在编译包含文件时失败。
语法
cmake -DCGAL_CXX_FLAGS='-std=c++0x
不正确。CMake 在没有任何警告的情况下接受这种形式的 -D 选项,但该行为不是您想要的。查看 CMake 的文档。正确的形式如下:
cmake -DCGAL_CXX_FLAGS:STRING='-std=c++0x'
相关文章:
- -std=c++0x 导致在 boost 1.64 的情况下返回对临时的引用
- Unix 宏在使用 -std=c++0x 标志编译时变得未定义
- G-WAN cc1plus:错误:无法识别的命令行选项"-std=gnu++0x"
- g++-std=c++0x及其兼容性
- g++ 不会在 Snow Leopard 下编译 std=c++0x
- "stoi"没有在此范围内声明,即使添加 -std=c++0x 和自定义函数,仍然适用
- C++11 统一初始化不适用于"g++ -std=c++0x"
- ISO C++禁止声明 .没有设置 --std=c++0x 的类型
- 将 -std=c++0x 与 gfortran 一起使用
- 如何在 eclipse makefile 项目中的编译器选项中设置 -std=c++0x
- gem install nmatrix - 你需要一个支持 -std=c++0x 或 -std=c++11 的 g++
- 尝试通过CGAL_CXX_FLAGS设置 --std=c++0x 或 -std=gnu++0x 会忽略值
- 适用于 MacOS 的"-std=gnu++0x"选项
- 在 G++ 编译命令中包含 -std=c++0x 有什么意义?
- 启用-std=c++0x或-std=gnu++0x编译器选项
- c++-std=c++0x导致分段错误(提升日志记录)
- G++ 4.6 -std=gnu++0x:静态局部变量构造函数调用计时和线程安全
- 警告:扩展初始值设定项列表仅适用于-std=c++0x或-std=gnu++0x
- g++ 4.4.7 -std=gnu++0x 应该编译"for each"结构吗?
- cc1plus:错误:无法识别的命令行选项"-std=c++0x"