我試圖與cmake
一起構建一個小型的C++代碼。cmake檢查是否存在編譯器
我沒有尚未g++
(我測試在VirtualBox的操作系統)
當我打電話cmake .
我得到的討厭的錯誤信息。
-- The C compiler identification is GNU 4.7.2
**-- The CXX compiler identification is unknown**
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
**CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!**
基本上,這是可以的。它說錯誤發生了,但它說的太多而不是需要。我只是想得到一個精確和簡潔的信息,說「g ++ ist not installed,please install it please」。
有沒有辦法先檢查g++
是否已安裝,然後給出適當的信息?
請出示你,所以我們可以幫助 –
的錯誤,所以你不希望修復這個錯誤,並且不希望從項目中刪除C++的支持,你只是想更改錯誤信息?我認爲這個錯誤信息是相當準確的(: – 2013-11-02 05:21:30