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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 22 Jan 2010 12:24:50 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=6OXikUUrK28lRfSxzOsxCb2xBm73ie61ItU0bx5eLFQ=; b=CLvQF/Jz314AYEFEg98N4ZKCKGm9XF2u8OFDaOVNA4MLUFQlfjCCsLej26wIRMFlXN jsW5Kw75rH/KFFJa6y3ADe9b8WehINomhSUkfMJ5seOknS6l/1zvbdtJzveM7D6Vnk05 5JWai73e7O1VhLjrTfvCqfFCGpvHc5/iUaIAs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CLkdtHTpiaBEItsWyc/Wy+C/UsCFSrWUjXYEEvTWG1t6jCJdvKAQUBD0aLq1hi5PA9 kHvFajj+z9inHDSLsSBOFghAO2KGFoJztcpalJzb5u2j2/4F8xZXkLUVRoFcvJJVAi0d JG4uZ8dmNpJruMk+0Le59ZopK03X7Drsq0r6I=
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