title: cmake configure error in 3.10.1 but not in 3.9.6
body: <p>I have installed cmake on a debian squeeze machine one month ago with cmake 3.9.6 and it works well.</p>
  
  <p>Now, I am installing cmake on another squeeze machine, but it doesn't work when I do <code>./configure</code>.
  It says :</p>
  
  <pre><code>------------------------------------------------------------------------------------------
  CMake 3.10.1, Copyright 2000-2017 Kitware, Inc. and Contributors
  Found GNU toolchain
  C compiler on this system is: gcc  
  ---------------------------------------------
  Error when bootstrapping CMake:
  Cannot find a C++ compiler supporting C++11 on this system.
  Please specify one using environment variable CXX.
  See cmake_bootstrap.log for compilers attempted.
  ---------------------------------------------
  Log of errors: /home/doom/things/cmake-3.10.1/Bootstrap.cmk/cmake_bootstrap.log
  ---------------------------------------------
  </code></pre>
  
  <p>And the logs :</p>
  
  <pre><code>    Checking for GNU toolchain
  Try: gcc
  Line: gcc  cmake_bootstrap_28642_test.c -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  int main() { return 0; }
  ------------------------------------------
  Test succeeded
  Try: g++
  Line: g++  cmake_bootstrap_28642_test.cpp -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  int main() { return 0; }
  ------------------------------------------
  Test succeeded
  Checking whether 'gcc  ' works.
  Try: gcc
  Line: gcc   cmake_bootstrap_28642_test.c -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #ifdef __cplusplus
  # error "The CMAKE_C_COMPILER is set to a C++ compiler"
  #endif
  
  #if defined(__sun) &amp;&amp; __STDC_VERSION__ &lt; 199901L
  #error "On Solaris we need C99."
  #endif
  
  #include &lt;stdio.h&gt;
  
  int main(int argc, char* argv[])
  {
    printf("%d%c", (argv != 0), (char)0x0a);
    return argc - 1;
  }
  
  ------------------------------------------
  1
  Test succeeded
  Checking whether 'g++  ' works.
  Try: g++
  Line: g++   cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  In file included from /usr/include/c++/4.4/unordered_map:35,
                   from cmake_bootstrap_28642_test.cxx:4:
  /usr/include/c++/4.4/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
  cmake_bootstrap_28642_test.cxx:7:2: error: #error "Compiler is not in a mode aware of C++11."
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids initialization of member ‘Member’
  cmake_bootstrap_28642_test.cxx:19: error: making ‘Member’ static
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids in-class initialization of non-const static member ‘Member’
  cmake_bootstrap_28642_test.cxx: In function ‘int main()’:
  cmake_bootstrap_28642_test.cxx:23: error: ISO C++ forbids declaration of ‘c’ with no type
  cmake_bootstrap_28642_test.cxx:23: error: ‘unique_ptr’ is not a member of ‘std’
  cmake_bootstrap_28642_test.cxx:23: error: expected primary-expression before ‘&gt;’ token
  cmake_bootstrap_28642_test.cxx:24: error: base operand of ‘-&gt;’ is not a pointer
  Test failed to compile
  Checking whether 'g++  -std=gnu++1z' works.
  Try: g++
  Line: g++  -std=gnu++1z cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  cc1plus: error: unrecognized command line option "-std=gnu++1z"
  Test failed to compile
  Checking whether 'g++  ' works.
  Try: g++
  Line: g++   cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  In file included from /usr/include/c++/4.4/unordered_map:35,
                   from cmake_bootstrap_28642_test.cxx:4:
  /usr/include/c++/4.4/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
  cmake_bootstrap_28642_test.cxx:7:2: error: #error "Compiler is not in a mode aware of C++11."
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids initialization of member ‘Member’
  cmake_bootstrap_28642_test.cxx:19: error: making ‘Member’ static
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids in-class initialization of non-const static member ‘Member’
  cmake_bootstrap_28642_test.cxx: In function ‘int main()’:
  cmake_bootstrap_28642_test.cxx:23: error: ISO C++ forbids declaration of ‘c’ with no type
  cmake_bootstrap_28642_test.cxx:23: error: ‘unique_ptr’ is not a member of ‘std’
  cmake_bootstrap_28642_test.cxx:23: error: expected primary-expression before ‘&gt;’ token
  cmake_bootstrap_28642_test.cxx:24: error: base operand of ‘-&gt;’ is not a pointer
  Test failed to compile
  Checking whether 'g++  -std=gnu++14' works.
  Try: g++
  Line: g++  -std=gnu++14 cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  cc1plus: error: unrecognized command line option "-std=gnu++14"
  Test failed to compile
  Checking whether 'g++  -std=gnu++1y' works.
  Try: g++
  Line: g++  -std=gnu++1y cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  cc1plus: error: unrecognized command line option "-std=gnu++1y"
  Test failed to compile
  Checking whether 'g++  ' works.
  Try: g++
  Line: g++   cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  In file included from /usr/include/c++/4.4/unordered_map:35,
                   from cmake_bootstrap_28642_test.cxx:4:
  /usr/include/c++/4.4/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
  cmake_bootstrap_28642_test.cxx:7:2: error: #error "Compiler is not in a mode aware of C++11."
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids initialization of member ‘Member’
  cmake_bootstrap_28642_test.cxx:19: error: making ‘Member’ static
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids in-class initialization of non-const static member ‘Member’
  cmake_bootstrap_28642_test.cxx: In function ‘int main()’:
  cmake_bootstrap_28642_test.cxx:23: error: ISO C++ forbids declaration of ‘c’ with no type
  cmake_bootstrap_28642_test.cxx:23: error: ‘unique_ptr’ is not a member of ‘std’
  cmake_bootstrap_28642_test.cxx:23: error: expected primary-expression before ‘&gt;’ token
  cmake_bootstrap_28642_test.cxx:24: error: base operand of ‘-&gt;’ is not a pointer
  Test failed to compile
  Checking whether 'g++  -std=gnu++11' works.
  Try: g++
  Line: g++  -std=gnu++11 cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  cc1plus: error: unrecognized command line option "-std=gnu++11"
  Test failed to compile
  Checking whether 'g++  -std=gnu++0x' works.
  Try: g++
  Line: g++  -std=gnu++0x cmake_bootstrap_28642_test.cxx -o cmake_bootstrap_28642_test
  ----------  file   -----------------------
  
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;unordered_map&gt;
  
  #if __cplusplus &lt; 201103L
  #error "Compiler is not in a mode aware of C++11."
  #endif
  
  #if defined(__SUNPRO_CC) &amp;&amp; __SUNPRO_CC &lt; 0x5140
  #error "SunPro &lt;= 5.13 mode not supported due to bug in move semantics."
  #endif
  
  class Class
  {
  public:
    int Get() const { return this-&gt;Member; }
  private:
    int Member = 1;
  };
  int main()
  {
    auto const c = std::unique_ptr&lt;Class&gt;(new Class);
    std::cout &lt;&lt; c-&gt;Get() &lt;&lt; std::endl;
    return 0;
  }
  
  ------------------------------------------
  cmake_bootstrap_28642_test.cxx:7:2: error: #error "Compiler is not in a mode aware of C++11."
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids initialization of member ‘Member’
  cmake_bootstrap_28642_test.cxx:19: error: making ‘Member’ static
  cmake_bootstrap_28642_test.cxx:19: error: ISO C++ forbids in-class initialization of non-const static member ‘Member’
  Test failed to compile
  </code></pre>
  
  <p>But it works well on the same machine with cmake 3.9.6.</p>
  
  <p>g++ version is <code>gcc version 4.4.5 (Debian 4.4.5-8)</code>.
  Latest available on my mirror.</p>
  
  <p>Is it really a problem with g++ version or a problem with new version of cmake ?</p>
  
  <p>If necessary, <a href="https://superuser.com/questions/1278413/how-can-i-install-g-compiler-from-sources">How can I install g++ compiler from sources?</a></p>
  
  <p>Thanks for your answers.</p>