Re: [eigen] CMake - I think I'm still doing it wrong |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] CMake - I think I'm still doing it wrong
- From: Aron Ahmadia <aja2111@xxxxxxxxxxxx>
- Date: Fri, 22 Jan 2010 20:59:59 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=QWVyfQC0sSYoUW2AQ3ZwWC9atKmbwSglDC0SRyzQG/E=; b=FaNLlui6Ls4X09C9MKzLS2TYrRhu69Z88IN/A8BIJs1zyix2fQkvDGx+mN7VM1A1TU lMbN1TQ4Y48S+cBr4Z+z5uMR5f3RnGuWkIoZKX3/mAgwZ8G3PzdzlWoR7QULUnbcxdh1 Zw3Z6u+RzJgKyVxko2DZEcWpwjXnwQnMiPDos=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Xca33tJv2rZbAPW2ybEMG1JQ0iqkEd51XFi/HDbnWswUoXzucAjJuqfkmpYKUfLa1H 5yenIN/jmw4DApAjDm//H+ace+3MWngTOxsVF/5ZkHxVJ6GLYw2i/sl8M/tbesRIw0su 1qoRrqR3cNyDbvzTShWS+PUyOoR/K10tXV78g=
Thanks,
That link is helpful :)
A
On Fri, Jan 22, 2010 at 8:24 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> 2010/1/22 Aron Ahmadia <aja2111@xxxxxxxxxxxx>:
>> Hi Everybody,
>>
>> In the process of writing this email, I tried 'make test', which fails
>> because it doesn't try to build the tests first, then 'make check',
>> which appears to be doing what I want.
>
> Yes, have you read
> http://eigen.tuxfamily.org/index.php?title=Tests
>
> Normally, on makefiles-based platforms, cmake should print a nice
> message explaining this:
>
> Some things you can do now:
> --------------+----------------------------------------------------------------
> Command | Description
> --------------+----------------------------------------------------------------
> make install | Install to /usr/local
> | To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath
> make doc | Generate the API documentation, requires Doxygen & LaTeX
> make check | Build and run the unit-tests. Read this page:
> | http://eigen.tuxfamily.org/index.php?title=Tests
> make blas | Build BLAS library (not the same thing as Eigen)
> --------------+----------------------------------------------------------------
>
> If it didn't, this is something we must fix!
> The current test for printing this message is:
>
> string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)
> if(cmake_generator_tolower MATCHES "makefile")
>
> Could you check what ${CMAKE_GENERATOR} is on your platform? Just put
> this in some CMakeLists.txt:
>
> message(${CMAKE_GENERATOR})
>
>> Feel free to browse in case
>> you'd like to help me figure out any other things I'm doing wrong in
>> using CMake.
>>
>> Thanks for your help so far, I think I still don't 'get' CMake and how
>> to use it to do what I want, which is this:
>>
>> :: try to build some c++ code that uses Eigen configured for my
>> environment as well as possible (custom compilers
>
> For custom C++ compilers, first erase your builddir, and do:
>
> CXX=/path/to/compiler cmake ....
>
>>, command line
>> options,
>
> To pass additional compile flags for a target, see
> set_target_properties. To do that globally, use the CMAKE_CXX_FLAGS
> variable and/or the variables specific to build types, see our root
> CMakeLists.
>
> To just add preprocessor definitions, see add_definitions.
>
> etc...)
>>
>> So Eigen represents maybe the third CMake project I've actually worked
>> on, and I'm still learning how to specify options using cmake and the
>> process of setting variables, reconfiguring, etc...
>
> Good luck :)
>
>>
>> Right now, I have the development branch of Eigen checked out into
>> sub-directory hg/, and I'm trying to get CMake to generate a Makefile
>> to build some examples. Sorry for the play by play but I'm not sure
>> what I'm doing wrong here.
>>
>> So I type ccmake hg/
>
> Can I just point you to our wiki page:
> http://eigen.tuxfamily.org/index.php?title=CMake
>
>>
>> I hit 't' to get into advanced mode.
>>
>> I set:
>> CMAKE_CXX_COMPILER /bgsys/drivers/ppcfloor/comm/bin/mpixlcxx_r
>> CMAKE_C_COMPILER /bgsys/drivers/ppcfloor/comm/bin/mpixlc_r
>>
>> (These are the IBM-installed wrappers that summon the BlueGene C/C++
>> compilers with threaded support)
>>
>> I hit 'c' to configure the files.
>>
>> I can't write to the default install prefix but I assume that it is
>> not important.
>
> Indeed, you only need write access to the install prefix when you do
> "make install" which for that reason you usually do as root.
>
>> I hit 'g' to generate the files and quit.
>>
>> If I type 'make' nothing happens.
>
> That's normal. Eigen is a pure template library, there's nothing in it
> to build. See above link for tests.
>
>>
>> In the process of writing this email, I tried 'make test', which fails
>> because it doesn't try to build the tests first, then 'make check',
>> which appears to be doing what I want.
>
> Yep :)
>
>>
>> Is any of this documented anywhere besides general info on cmake from
>> the CMake website?
>
> Yes see link at the beginning of my reply :)
>
> Good luck
> Benoit
>
>
>