yrnkrn / zapcc

zapcc is a caching C++ compiler based on clang, designed to perform faster compilations
Other
1.25k stars 60 forks source link

C++17 support #32

Closed v1993 closed 5 years ago

v1993 commented 5 years ago

I try to build C++17 project with cmake using zapcc but get this:

cmake -DCMAKE_CXX_COMPILER=zapcc++ ..
-- The CXX compiler identification is Clang 5.0.0
-- Check for working CXX compiler: /usr/bin/zapcc++
-- Check for working CXX compiler: /usr/bin/zapcc++ -- broken
CMake Error at /usr/share/cmake-3.12/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/usr/bin/zapcc++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/v/tmp/cubosphere-code/build/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/make" "cmTC_e7b3f/fast"
    /usr/bin/make -f CMakeFiles/cmTC_e7b3f.dir/build.make CMakeFiles/cmTC_e7b3f.dir/build
    make[1]: вход в каталог «/home/v/tmp/cubosphere-code/build/CMakeFiles/CMakeTmp»
    Building CXX object CMakeFiles/cmTC_e7b3f.dir/testCXXCompiler.cxx.o
    /usr/bin/zapcc++    -std=gnu++17 -o CMakeFiles/cmTC_e7b3f.dir/testCXXCompiler.cxx.o -c /home/v/tmp/cubosphere-code/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    error: invalid value 'gnu++17' in '-std=gnu++17'
    note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
    note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
    note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
    note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
    note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
    note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
    note: use 'c++1z' for 'Working draft for ISO C++ 2017' standard
    note: use 'gnu++1z' for 'Working draft for ISO C++ 2017 with GNU extensions' standard
    make[1]: *** [CMakeFiles/cmTC_e7b3f.dir/build.make:66: CMakeFiles/cmTC_e7b3f.dir/testCXXCompiler.cxx.o] Ошибка 1
    make[1]: выход из каталога «/home/v/tmp/cubosphere-code/build/CMakeFiles/CMakeTmp»
    make: *** [Makefile:121: cmTC_e7b3f/fast] Ошибка 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:8 (project)

-- Configuring incomplete, errors occurred!
See also "/home/v/tmp/cubosphere-code/build/CMakeFiles/CMakeOutput.log".
See also "/home/v/tmp/cubosphere-code/build/CMakeFiles/CMakeError.log".

Is there any chance that C++17 will be supported?

P.S.: happy NY!

yrnkrn commented 5 years ago

Hi, not sure when I'll have time to update zapcc for -std=gnu++17, sorry.