I have 2 compilers installed. The attached minimal CMakeLists.txt example shows 
everything OK if
using the compiler at standard place.

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX11_EXTENSION_COMPILE_OPTION = -std=gnu++11
-- Configuring done
-- Generating done
-- Build files have been written to: /usr2/kornel/tmp/cmake

But setting for alternative compiler (on clean build dir)
        env{CXX} => /usr/local/gcc6.1/bin/g++
        env{CC} =>  /usr/local/gcc6.1/bin/gcc
I get following output:

-- The C compiler identification is GNU 6.1.0
-- The CXX compiler identification is GNU 6.1.0
-- Check for working C compiler: /usr/local/gcc6.1/bin/gcc
-- Check for working C compiler: /usr/local/gcc6.1/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/gcc6.1/bin/g++
-- Check for working CXX compiler: /usr/local/gcc6.1/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX11_EXTENSION_COMPILE_OPTION = -std=gnu++11
-- Configuring done
-- Generating done
-- Build files have been written to: /usr2/kornel/tmp/cmake

I expected here "-- CMAKE_CXX11_EXTENSION_COMPILE_OPTION = -std=c++14".

My cmake version is "cmake version 3.6.20160714-ga6bd0"

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to