[root@localhost task-2.6.2]# c++ --version
c++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@localhost task-2.6.2]# cmake -DCMAKE_BUILD_TYPE=release .
-- Configuring C++17
-- System: Linux
CMake Error at cmake/CXXSniffer.cmake:11 (message):
C++17 support missing. Try upgrading your C++ compiler. If you have a
good reason for using an outdated compiler, please let us know at
support@gothenburgbitfactory.org.
Call Stack (most recent call first):
CMakeLists.txt:10 (include)
-- Configuring incomplete, errors occurred!
See also "/opt/task-2.6.2/CMakeFiles/CMakeOutput.log".
See also "/opt/task-2.6.2/CMakeFiles/CMakeError.log".
[root@localhost task-2.6.2]# cmake . -DCMAKE_CXX_STANDARD=17 /opt/rh/devtoolset-7/
CMake Warning:
Ignoring extra path from command line:
"/opt/rh/devtoolset-7/"
-- Configuring C++17
-- System: Linux
CMake Error at cmake/CXXSniffer.cmake:11 (message):
C++17 support missing. Try upgrading your C++ compiler. If you have a
good reason for using an outdated compiler, please let us know at
support@gothenburgbitfactory.org.
Call Stack (most recent call first):
CMakeLists.txt:10 (include)
去掉路径也不行:
-- Configuring C++17
-- System: Linux
CMake Error at cmake/CXXSniffer.cmake:11 (message):
C++17 support missing. Try upgrading your C++ compiler. If you have a
good reason for using an outdated compiler, please let us know at
support@gothenburgbitfactory.org.
Call Stack (most recent call first):
CMakeLists.txt:10 (include)
-- Configuring incomplete, errors occurred!
See also "/opt/task-2.6.2/CMakeFiles/CMakeOutput.log".
See also "/opt/task-2.6.2/CMakeFiles/CMakeError.log".
root@localhost task-2.6.2]# cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring C++17
-- System: Linux
-- Performing Test _HAS_CXX17
-- Performing Test _HAS_CXX17 - Failed
CMake Error at cmake/CXXSniffer.cmake:11 (message):
C++17 support missing. Try upgrading your C++ compiler. If you have a
good reason for using an outdated compiler, please let us know at
support@gothenburgbitfactory.org.
Call Stack (most recent call first):
CMakeLists.txt:10 (include)
-- Configuring incomplete, errors occurred!
See also "/opt/task-2.6.2/CMakeFiles/CMakeOutput.log".
See also "/opt/task-2.6.2/CMakeFiles/CMakeError.log".
[xxx@localhost ~]$ cmake -DCMAKE_BUILD_TYPE=release .
CMake Warning:
Ignoring extra path from command line:
"."
CMake Error: The source directory "/home/xxx" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.