[CMake] Compiling clang with cmake
Nicolas Desprès
nicolas.despres at gmail.com
Wed Mar 16 14:32:39 EDT 2011
Hi there,
Does someone have tried to compiled cmake master branch with clang?
I got this error:
Scanning dependencies of target cmsys
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.c.o
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Base64.c.o
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/MD5.c.o
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Terminal.c.o
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/System.c.o
[ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/String.c.o
[ 2%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Directory.cxx.o
[ 2%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/DynamicLoader.cxx.o
[ 2%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Glob.cxx.o
[ 2%] Building CXX object
Source/kwsys/CMakeFiles/cmsys.dir/RegularExpression.cxx.o
[ 3%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/SystemTools.cxx.o
In file included from /home/despre_n/src/cmake/Source/kwsys/SystemTools.cxx:26:
/home/despre_n/src/cmake/_build-clang/Source/cmsys/ios/sstream:176:29: error:
cannot initialize a parameter of type 'iostate' (aka 'std::_Ios_Iostate')
with an lvalue of type 'int'
this->IStrStream::clear(flags);
^~~~~
In file included from /home/despre_n/src/cmake/Source/kwsys/SystemTools.cxx:24:
In file included from
/home/despre_n/src/cmake/_build-clang/Source/cmsys/ios/iostream:24:
In file included from /usr/include/c++/4.4/iostream:39:
In file included from /usr/include/c++/4.4/ostream:39:
In file included from /usr/include/c++/4.4/ios:44:
/usr/include/c++/4.4/bits/basic_ios.h:137:21: note: passing argument to
parameter '__state' here
clear(iostate __state = goodbit);
^
1 error generated.
make[2]: *** [Source/kwsys/CMakeFiles/cmsys.dir/SystemTools.cxx.o] Error 1
make[1]: *** [Source/kwsys/CMakeFiles/cmsys.dir/all] Error 2
make: *** [all] Error 2
Here my configuration option:
cmake ..
-DCMAKE_INSTALL_PREFIX="$HOME/usr/stow/cmake"
-DCTEST_TEST_CTEST=ON
-DCTEST_TEST_CPACK=ON
-DCPACK_BINARY_DEB=ON
-DCPACK_BINARY_RPM=ON
-DCPACK_BINARY_TBZ2=ON
-DCPACK_SOURCE_ZIP=ON
-DBUILD_DOCUMENTATION=ON
-DBUILD_QtDialog=ON
-DBUILD_CursesDialog=ON
I don't know if it is a cmake issues or a clang issues.
My version of clang:
clang version 2.8 (branches/release_28)
Target: i386-pc-linux-gnu
Thread model: posix
Installed with apt-get on an Ubuntu 10.10.
Cheers,
--
Nicolas Desprès
More information about the CMake
mailing list