This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem building with cmake under cygwin (need clang)




Marco Atzeri wrote:
On 27/07/2016 09:51, Csaba Raduly wrote:
On Tue, Jul 26, 2016 at 6:06 PM, Marco Atzeri  wrote:

Csaba was clear but it seems you are misunderstanding,
the call to cmake is

       cmake [options] <path-to-source>

No, not <path-to-source> but <path-to-CMakeLists.txt>

For quickhull, CMakeLists.txt is in the root of the project, the
sources are under the src directory.

Csaba,
you are 100 %right.
I just copied the cmake help

$ cmake --help |head -n 4
Usage

   cmake [options] <path-to-source>
   cmake [options] <path-to-existing-build>

where of course they consider CMakeLists.txt as part of the source
and placed in the tree root.

Regardless of where the build is performed, the path in the cmake
invocation must point to the root of the project. Copying
CMakeLists.txt into ./src and pointing cmake to ./src is unlikely to
work.

All of this is moot because the author of quickhull littered
CMakeLists.txt with clang-specific compiler switches. He made no
attempt to cater for the world's most widely used C++ compiler (GCC).

I agree on that. He made the life hard for anyone to build his software.


Csaba

Regards
Marco



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


I decided to try this on opensuse to see if that made a difference. After updating to cmake 3.6 and installing clang, the command with pdw as /build,

cmake -DCMAKE_CXX_COMPILER=clang ..

gives the following output without error,

-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is Clang 3.5.0
-- 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/clang
-- Check for working CXX compiler: /usr/bin/clang -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_LIBCXX
-- Performing Test COMPILER_SUPPORTS_LIBCXX - Success
-- Performing Test COMPILER_SUPPORTS_CXX1Z
-- Performing Test COMPILER_SUPPORTS_CXX1Z - Success
-- Wrong build type selected, default to Debug.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user1/ATomilov_quickhull/trunk/build

You can see that the above is different then the results with cygwin,

-- The CXX compiler identification is Clang 3.5.0
-- Check for working CXX compiler: /usr/bin/clang -- works

The above did not appear to build the application in that I don't see any binaries that were created. It looks like the command cmake -DCMAKE_CXX_COMPILER=clang .. just configured the build without actually compiling and building the application.

Do I need to do something different to get the application to be created? I have never used cmake before and am more than a bit out of my depth here.

At any rate, the above suggests that there is an issue with my cygwin installation here and possibly that clang isn't working. Does my output from cygcheck suggest anything?

LMH





--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]