Software installation – Avogadro does not work if you use cmake

When I tried to install Avogadro, and I was on the step using cmake, an error message appeared and when I saw the error logs, I got the following:

The C ++ SOURCE FILE test COMPILES_WITHOUT_FPERMISSIVE failed with the following output:
Change directory: / home / ysv / Documents / avogadro-1.2.0 / build / CMakeFiles / CMakeTmp

Execute build command: "/ usr / bin / make" "cmTC_ca016 / fast"
/ usr / bin / make -f CMakeFiles / cmTC_ca016.dir / build.make CMakeFiles / cmTC_ca016.dir / build
do[1]: Enter the directory "/home/ysv/Documents/avogadro-1.2.0/build/CMakeFiles/CMakeTmp"
Create CXX object CMakeFiles / cmTC_ca016.dir / src.cxx.o
/ usr / bin / c ++ –fvisibility = hidden -fvisibility-inlines-hidden -DCOMPILES_WITHOUT_FPERMISSIVE -o CMakeFiles / cmTC_ca016.dir / src.cxx.o -c /home/ysv/Documents/avogadro-1.2.0/build / CMakeFiles / CMakeTmp / src.cxx
/home/ysv/Documents/avogadro-1.2.0/build/CMakeFiles/CMakeTmp/src.cxx:6:26: Error: declaration of [-fpermissive]
auto_ptr<_Tp> auto_ptr ();
^
/home/ysv/Documents/avogadro-1.2.0/build/CMakeFiles/CMakeTmp/src.cxx:2:28: Error: Changes the meaning of [-fpermissive]
Template class auto_ptr {};
^
CMakeFiles / cmTC_ca016.dir / build.make: 65: recipe for the target & # 39; CMakeFiles / cmTC_ca016.dir / src.cxx.o & # 39; failed
do[1]: * * * [CMakeFiles/cmTC_ca016.dir/src.cxx.o] Error 1
do[1]: The directory & # 39; /home/ysv/Documents/avogadro-1.2.0/build/CMakeFiles/CMakeTmp&#39; leave
Makefile: 126: Recipe for destination & # 39; cmTC_ca016 / fast & # 39; failed
do: * * * [cmTC_ca016/fast] Error 2

Source file was:

Template class auto_ptr {};
template
struct counted_ptr
{
auto_ptr<_Tp> auto_ptr ();
};
int main () {return 0;}

Does anyone have any idea how to solve this?
Many Thanks,
Kickit