未知的CMake命令“BISON_TARGET”

时间:2014-03-05 21:55:13

标签: visual-studio-2010 cmake bison

我正在尝试在Cmake中配置和生成源代码,以便能够在MS Visual Studio 2010中运行,但我得到的只是这个错误-Unknown CMake命令“BISON_TARGET” - 。以下是输出和错误列表。我安装了BISON。有没有人知道如何解决它?

The C compiler identification is MSVC 16.0.30319.1
The CXX compiler identification is MSVC 16.0.30319.1
Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done
Could NOT find BISON (missing:  BISON_EXECUTABLE)  CMake Error at
src/parameters/CMakeLists.txt:16 (BISON_TARGET):   Unknown CMake command "BISON_TARGET".

2 个答案:

答案 0 :(得分:3)

将CMake GUI中的BISON_EXECUTABLE设置为正确的可执行路径并重新配置缓存。

答案 1 :(得分:0)

在Windows 1o环境中,必须重命名文件:

win_flex.exe-> flex.exe win_bison.exe-> bison.exe