This is the mail archive of the
mailing list for the Cygwin project.
Re: problem building with cmake under cygwin (need clang)
On 16-07-26 06:52 PM, LMH wrote:
Thanks you for the clarification.
I implemented your steps,
$ ls src/
CMakeLists.txt include README.md src test
$ mkdir build
$ cd build/
$ cmake -DCMAKE_CXX_COMPILER=clang ../src
Stop doing that-----------------------^^^^^^
CMakeLists.txt is in the root of the project. Point cmake to it, like this:
$ cmake -DCMAKE_CXX_COMPILER=clang++ ..
I get the following output, which is the same error output I was getting
before. It is different then the errors you are specifying.
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is unknown
It looks like it is still using gnu for the compiler and not clang.
There are two different compilers cmake knows about: the C compiler
(CMAKE_C_COMPILER) and the C++ compiler (CMAKE_CXX_COMPILER). You only
set the C++ compiler; cmake is using its default for the C compiler.
For quickhull, CMAKE_C_COMPILER probably doesn't matter.
looks like it can't identify the c++ compiler at all. I tried this,
cmake -DCMAKE_CXX_COMPILER=clang++ ../src
For clang, it makes no difference (clang++ is usually a symlink to clang).
because I think that CXX is the c++ compiler, but this doesn't make any
difference. I have attached the cmake error and output logs in case that
It just looks like there is something missing or misconfigured in my
installation. The which clang and which clang++ commands return the
expected values. If cmake isn't able to build a test app, then there is
something wrong at that end I think.
This is what cmake tried:
Run Build Command:"/usr/bin/make.exe" "cmTC_29d2e/fast"
/usr/bin/make -f CMakeFiles/cmTC_29d2e.dir/build.make
make: Entering directory
Building CXX object CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o
/usr/bin/clang++ -o CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o
CMakeFiles/cmTC_29d2e.dir/build.make:65: recipe for target
make: Leaving directory
Makefile:126: recipe for target 'cmTC_29d2e/fast' failed
make: *** [CMakeFiles/cmTC_29d2e.dir/testCXXCompiler.cxx.o] Error 127
make: *** [cmTC_29d2e/fast] Error 2
Try to run those commands manually:
$ /usr/bin/clang++ -o
What is the output?
Life is complex, with real and imaginary parts.
The Tao of math: The numbers you can count are not the real numbers.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple