Re: [CMake] Compile project as C++ if MSVC

2011-12-22 Thread Michael Wild
On 12/23/2011 07:23 AM, Eric Noulard wrote:
> 2011/12/23 Pau Garcia i Quiles :
>> Hi,
>>
>> Visual C++ 2010 does not support C99 yet and it seems it will be a
>> long time before MSVC supports it. For now, the usual work-around is
>> to build the project as C++.
>>
>> I'd like to build as C if using mingw, and as C++ if using MSVC. How
>> can I do that? project() seems not to be valid here (I can't do
>> if(MSVC) before project()) and I cannot find a target property to say
>> "compile as language CXX"
> 
> There is a LANGUAGE property but it is for source files not target
> (which is logical because a target may contain mixed language sources)
> 
> so
> 
> set_source_files_properties( PROPERTIES LANGUAGE C)
> 
> see
> cmake --help-property LANGUAGE
> cmake --help-command set_source_files_properties
> 
> you may be interested by the SOURCE target property as well
> which makes its possible to retrieve all SOURCE file belonging to a
> target.
> 
> 

You could also fiddle around with the CMAKE__SOURCE_FILE_EXTENSION
variables. E.g:

if(MSVC)
  list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSION
${CMAKE_C_SOURCE_FILE_EXTENSION})
  set(CMAKE_C_SOURCE_FILE_EXTENSION)
endif()

Michael
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Compile project as C++ if MSVC

2011-12-22 Thread Eric Noulard
2011/12/23 Pau Garcia i Quiles :
> Hi,
>
> Visual C++ 2010 does not support C99 yet and it seems it will be a
> long time before MSVC supports it. For now, the usual work-around is
> to build the project as C++.
>
> I'd like to build as C if using mingw, and as C++ if using MSVC. How
> can I do that? project() seems not to be valid here (I can't do
> if(MSVC) before project()) and I cannot find a target property to say
> "compile as language CXX"

There is a LANGUAGE property but it is for source files not target
(which is logical because a target may contain mixed language sources)

so

set_source_files_properties( PROPERTIES LANGUAGE C)

see
cmake --help-property LANGUAGE
cmake --help-command set_source_files_properties

you may be interested by the SOURCE target property as well
which makes its possible to retrieve all SOURCE file belonging to a
target.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Compile project as C++ if MSVC

2011-12-22 Thread Pau Garcia i Quiles
Hi,

Visual C++ 2010 does not support C99 yet and it seems it will be a
long time before MSVC supports it. For now, the usual work-around is
to build the project as C++.

I'd like to build as C if using mingw, and as C++ if using MSVC. How
can I do that? project() seems not to be valid here (I can't do
if(MSVC) before project()) and I cannot find a target property to say
"compile as language CXX"

Thank you

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Problem on an "external" library depending on an "internal" one

2011-12-22 Thread Marco Corvo

Hi all,

I have a big project which can be used in two ways: either the user 
checks out all the packages and makes a big "make" or he checks out only 
a subset and build them linking against a given release, which is 
installed somewhere else on his machine.


In this last option the libraries "installed somewhere" are trated as 
"external" dependencies by the working packages. The problem I have 
comes out when I have a transitive dependency.
To make an example, I check out two packages: package A, which builds a 
static library and a binary and depends on an external library B, and a 
package C.

The cmake code to make A know where to find libB.a is the following:

add_library(B STATIC IMPORTED)
set_target_properties(B PROPERTIES IMPORTED_LOCATION 
"/path/to/external/lib/libB.a"

IMPORTED_LINK_INTERFACE_LIBRARIES "C D"
)

which is read inside my CMakeLists.txt with:

import(MyFile.cmake)
add_library(A foo.cc)
add_executable(bar bar.cc)
target_link_libraries(bar A B)

Here's the point. My library B depends on C, which I checked out with A 
and so is kind of "local" to my build, in fact I have:


add_directory(A)
add_directory(C)

in my main CMakeLists.txt, but when I build the packages I always get:

No rule to make target `../../lib/libC.a', needed by `../../bin/bar'.  Stop.

Looking into the link.txt file generated by cmake, I see that the 
dependencies are correct, that is the command is:


g++  -o bar ../../lib/libA.a /path/to/external/lib/libB.a 
../../lib/libC.a /path/to/external/lib/libD.a


So this is not a problem of how I declare my dependencies among 
packages, rather something related to the way cmake deals with the 
targets. What sounds strange to me is that package C is perfectly known 
to cmake, as I put add_directory(C) to my CMakeLists.txt. In fact libC.a 
is built, but always *after* bar, like cmake were not aware that C, on 
which bar depends, must be built before it.


I suspect that cmake thinks that, since B is "external", it's up to the 
user to provide a rule to force the build of dependencies. Put it 
another way: if you have packages A and C locally and B is an "external" 
but depends on C, then cmake has no means to write the target libC.a 
that triggers the build of C before linking A with B.


Is there a way, if any, to instruct cmake to write the targets so that 
the dependencies chain is preserved and if an external depends on an 
internal, the internal is built before the link stage?


Thanks in advance.

Marco

--
Marco Corvo
SuperB Experiment
CNRS - Orsay
c/o INFN Padova

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Problems finding the SSL library

2011-12-22 Thread Matchek
Hello everyone,

I'm attempting to build mysql-5.5. It fails while finding the OpenSSL
library, and I can't figure out why. All other problems can find
OpenSSL without any problems.

The source code:
http://ftp.heanet.ie/mirrors/www.mysql.com/Downloads/MySQL-5.5/mysql-5.5.19.tar.gz

Here's what the build attempt looks like. Note how the environment is
controlled by invoking /usr/bin/env -i which cleans the environment,
and then explicitly setting all the environment variables.

maciej@netra ~/src/opencsw/pkg/mysql5/branches/mysql-5.5.x $ mgar package
[= NOW BUILDING: mysql-5.5.19 =]
[prerequisite] complete for mysql55.
[fetch] complete for mysql55.
[checksum] complete for mysql55.
[checksum-global] complete for mysql55.
[checksum-modulated] complete for mysql55.
[= NOW BUILDING: mysql-5.5.19 MODULATION global: ISA= =]
[extract-modulated] complete for mysql55.
[= Building modulation 'isa-sparcv8plus' on host '' =]
gmake  MODULATION=isa-sparcv8plus  ISA=sparcv8plus  merge-modulated
gmake[1]: Entering directory
`/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x'
[= NOW BUILDING: mysql-5.5.19 MODULATION isa-sparcv8plus:
ISA=sparcv8plus =]
[extract-modulated] complete for mysql55.
[patch-modulated] complete for mysql55.
#   --debug-output \
#   --debug-trycompile \
(cd work/build-isa-sparcv8plus/mysql-5.5.19 && \
/usr/bin/env -i \
  
PATH="/opt/csw/gnu:/home/maciej/src/opencsw/.buildsys/v2/gar/bin/sos12-wrappers:/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/work/install-isa-sparcv8plus/opt/csw/bin:/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/work/install-isa-sparcv8plus/opt/csw/bin:/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/work/install-isa-sparcv8plus/opt/csw/sbin:/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/work/install-isa-sparcv8plus/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/sbin:/opt/studio/SOS12/SUNWspro/bin:/home/maciej/src/opencsw/.buildsys/v2/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin"
LC_ALL="C" prefix="/opt/csw" exec_prefix="/opt/csw"
bindir="/opt/csw/bin" sbindir="/opt/csw/sbin"
libexecdir="/opt/csw/libexec" datadir="/opt/csw/share/mysql/5.5"
sysconfdir="/etc/opt/csw" sharedstatedir="/opt/csw/share"
localstatedir="/var/opt/csw/mysql55" libdir="/opt/csw/lib"
infodir="/opt/csw/share/info" lispdir="/opt/csw/share/emacs/site-lisp"
includedir="/opt/csw/include" mandir="/opt/csw/share/man"
docdir="/opt/csw/share/doc" sourcedir="/opt/csw/src"
CPPFLAGS="-I/opt/csw/include" CFLAGS="-xO3 -m32 -xarch=sparc"
CXXFLAGS="-xO3 -m32 -xarch=sparc" LDFLAGS="-m32 -xarch=sparc
-L/opt/csw/lib" FFLAGS="-xO3 -m32 -xarch=sparc" FCFLAGS="-xO3 -m32
-xarch=sparc" ASFLAGS="" OPTFLAGS="-xO3 -m32 -xarch=sparc"
CC="/opt/studio/SOS12/SUNWspro/bin/cc"
CXX="/opt/studio/SOS12/SUNWspro/bin/CC"
CC_HOME="/opt/studio/SOS12/SUNWspro" CC_VERSION="Sun C 5.10
SunOS_sparc 2009/06/03" CXX_VERSION="Sun C++ 5.10 SunOS_sparc
2009/06/03" GARCH="sparc" GAROSREL="5.10" GARPACKAGE="mysql-5.5.x"
LD_OPTIONS="-R/opt/csw/lib/\$ISALIST -R/opt/csw/lib"
PKG_CONFIG_PATH="/opt/csw/lib/pkgconfig"
DESTDIR="/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/work/install-isa-sparcv8plus"
 \
cmake \
. \
-DCMAKE_INSTALL_PREFIX=/opt/csw
-DMYSQL_DATADIR=/var/opt/csw/mysql55 -DSYSCONFDIR=/etc/opt/csw
-DINSTALL_BINDIR=bin -DINSTALL_SBINDIR=libexec
-DINSTALL_MANDIR=share/man -DINSTALL_LIBDIR=lib
-DINSTALL_PLUGINDIR=lib/mysql55/./plugin -DWITH_READLINE=1
-DWITH_SSL=system -DWITH_ZLIB=system -DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci -DWITH_COMMENT='OpenCSW'
-DCMAKE_C_FLAGS="-xO3 -m32 -xarch=sparc" -DCMAKE_CXX_FLAGS="-xO3 -m32
-xarch=sparc" -DBUILD_CONFIG=mysql_release
-DOPENSSL_ROOT_DIR=/opt/csw)
-- MySQL 5.5.19
CMake Error at cmake/ssl.cmake:83 (MESSAGE):
  Cannot find appropriate system libraries for SSL.  Use WITH_SSL=bundled to
  enable SSL support
Call Stack (most recent call first):
  CMakeLists.txt:255 (MYSQL_CHECK_SSL)


-- Configuring incomplete, errors occurred!
gmake[1]: *** [configure-custom] Error 1
gmake[1]: Leaving directory
`/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x'
gmake: *** [merge-isa-sparcv8plus] Error 2


maciej@netra ~/src/opencsw/pkg/mysql5/branches/mysql-5.5.x $ glocate openssl.pc
/home/maciej/src/opencsw/pkg/mysql5/branches/mysql-5.5.x/files/64/openssl.pc
/opt/csw/lib/pkgconfig/openssl.pc
/opt/csw/lib/sparcv9/pkgconfig/openssl.pc
/usr/lib/pkgconfig/openssl.pc
/usr/lib/sparcv9/pkgconfig/openssl.pc
/zones/netra-zone1.chopin.edu.pl/root/opt/csw/lib/pkgconfig/openssl.pc
/zones/netra-zone1.chopin.edu.pl/root/opt/csw/lib/sparcv9/pkgconfig/openssl.pc
/zones/netra-zone1.chopin.edu.pl/root/usr/lib/pkgconfig/openssl.pc
/zones/netra-zone1.chopin.edu.pl/root/usr/lib/sparcv9/pkgconfig/openssl.pc
/zones/netra-zone2.chopin.edu.pl/root/opt/csw

Re: [CMake] How do I use the ExternalProject module to compile only once

2011-12-22 Thread Benjamin Eikel
Hello,

Am Donnerstag, 22. Dezember 2011, 14:58:15 schrieb Delcypher:
> Apologies. There was a silly mistake in the version posted on
> pastebin. Here is a corrected version http://pastebin.com/P95WNUP5
> 
> The problems I see with what I have written are:
> 
> * The line "FIND_PACKAGE(ITK)" when FETCH_ITK is enabled is making
> things go wrong because the ITK library hasn't been downloaded yet.
> * Even if the above point wasn't a problem. When I run "cmake ../src/"
> again this isn't going to create a makefile that does what I want. The
> ITK library will downloaded all over again and then built.
> 
> Any thoughts?

maybe have a look at the KDE SuperBuild [1]. It uses a file called 
"ThisIsASourcePackage.valid" to determine if the build is done from a source 
package, or if the source has to be downloaded.

Kind regards
Benjamin

[1] 
https://projects.kde.org/projects/kde/superbuild/repository/revisions/master/entry/SuperBuild.cmake


> 
> Thanks,
> Dan.
> 
> On 22 December 2011 13:40, Delcypher  wrote:
> > Hi,
> > 
> > I'm starting work on a project that depends on the ITK library and I'm
> > using Arch Linux as my build platform. What I'd like to be able to do
> > is the following.
> > 
> > * When the following is run
> > $ pwd
> > /home/dan/project/build-dir
> > $ cmake ../src/
> > 
> > for there to be a variable to be set it the cache (call it FETCH_ITK)
> > that allows the user to pick between building the ITK library or try
> > to use the system ITK library. Once the makefile is generated
> > I would like this to happen when make is executed.
> > 
> > - If the user picked to build the ITK library and it HAS NOT been built
> > then the ExternalProject module is used to fetch and build ITK and then
> > the rest of the project is built.
> > 
> > -If the user picked to build ITK and it HAS already been built then my
> > project is built WITHOUT attempting to rebuild the ITK library. With
> > ITK_DIR set appropriately so that FIND_PACKAGE(ITK) works.
> > 
> > -If the user picked to not build ITK then my project is built. With
> > ITK_DIR not set to anything so that FIND_PACKAGE(ITK) works.
> > 
> > I'm afraid I'm very new to cmake and I'm not quite sure how to do
> > this. I made a start which can be seen here
> > http://pastebin.com/xwiFPrY5
> > 
> > However it doesn't work. The ExternalProject() code seemed to work
> > okay in isolation but when I added everything else it didn't work.
> > 
> > Any suggestions?
> > 
> > Thanks,
> > Dan.
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How do I use the ExternalProject module to compile only once

2011-12-22 Thread Delcypher
Apologies. There was a silly mistake in the version posted on
pastebin. Here is a corrected version http://pastebin.com/P95WNUP5

The problems I see with what I have written are:

* The line "FIND_PACKAGE(ITK)" when FETCH_ITK is enabled is making
things go wrong because the ITK library hasn't been downloaded yet.
* Even if the above point wasn't a problem. When I run "cmake ../src/"
again this isn't going to create a makefile that does what I want. The
ITK library will downloaded all over again and then built.

Any thoughts?

Thanks,
Dan.

On 22 December 2011 13:40, Delcypher  wrote:
> Hi,
>
> I'm starting work on a project that depends on the ITK library and I'm
> using Arch Linux as my build platform. What I'd like to be able to do
> is the following.
>
> * When the following is run
> $ pwd
> /home/dan/project/build-dir
> $ cmake ../src/
>
> for there to be a variable to be set it the cache (call it FETCH_ITK)
> that allows the user to pick between building the ITK library or try
> to use the system ITK library. Once the makefile is generated
> I would like this to happen when make is executed.
>
> - If the user picked to build the ITK library and it HAS NOT been built then
> the ExternalProject module is used to fetch and build ITK and then the
> rest of the project is built.
>
> -If the user picked to build ITK and it HAS already been built then my
> project is built WITHOUT attempting to rebuild the ITK library. With
> ITK_DIR set appropriately so that FIND_PACKAGE(ITK) works.
>
> -If the user picked to not build ITK then my project is built. With
> ITK_DIR not set to anything so that FIND_PACKAGE(ITK) works.
>
> I'm afraid I'm very new to cmake and I'm not quite sure how to do
> this. I made a start which can be seen here
> http://pastebin.com/xwiFPrY5
>
> However it doesn't work. The ExternalProject() code seemed to work
> okay in isolation but when I added everything else it didn't work.
>
> Any suggestions?
>
> Thanks,
> Dan.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] How do I use the ExternalProject module to compile only once

2011-12-22 Thread Delcypher
Hi,

I'm starting work on a project that depends on the ITK library and I'm
using Arch Linux as my build platform. What I'd like to be able to do
is the following.

* When the following is run
$ pwd
/home/dan/project/build-dir
$ cmake ../src/

for there to be a variable to be set it the cache (call it FETCH_ITK)
that allows the user to pick between building the ITK library or try
to use the system ITK library. Once the makefile is generated
I would like this to happen when make is executed.

- If the user picked to build the ITK library and it HAS NOT been built then
the ExternalProject module is used to fetch and build ITK and then the
rest of the project is built.

-If the user picked to build ITK and it HAS already been built then my
project is built WITHOUT attempting to rebuild the ITK library. With
ITK_DIR set appropriately so that FIND_PACKAGE(ITK) works.

-If the user picked to not build ITK then my project is built. With
ITK_DIR not set to anything so that FIND_PACKAGE(ITK) works.

I'm afraid I'm very new to cmake and I'm not quite sure how to do
this. I made a start which can be seen here
http://pastebin.com/xwiFPrY5

However it doesn't work. The ExternalProject() code seemed to work
okay in isolation but when I added everything else it didn't work.

Any suggestions?

Thanks,
Dan.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Abdelrazak Younes
-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
David Cole

>On Thu, Dec 22, 2011 at 6:10 AM, Rolf Eike Beer  wrote:
>>> Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
>>> > > It would be nice if this work could be integrated in next release of
>>> > > CMake.>
>>> > I'll have a look.
>>> > It would be 2.8.8, 2.8.7 is basically done now.
>>>
>>> So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
>>> how to patch installed version of cmake... Or we can switch to the git
>>> repo... Actually, I just cloned the cmake repo, but I only see the "master"
>>> branch in there. If I wanted to maintain our RVDS port, which branch should
>>> I track?
>>
>> Master is the best idea to use. Any patches that should be merged have to 
>> made
>> against master, and master is that stuff that will show up in the next stable
>> version.

OK, thanks.

> Just as an FYI: We will be producing the final CMake 2.8.7 next week,
> and we will plan to produce the next one (presumably 2.8.8) at the end
> of March, 2012. We have been, on average, releasing CMake every
> quarter for the last year and a half now. The future is never firmly
> predictable, but we will do our best to stick to a release every 3
> months.

Good to know, thanks.
Abdel.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread David Cole
On Thu, Dec 22, 2011 at 6:10 AM, Rolf Eike Beer  wrote:
> Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
>> -Original Message-
>> From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
>> Sent: Wednesday, December 21, 2011 9:41 PM
>> To: cmake@cmake.org
>> Cc: Abdelrazak Younes
>> Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.
>>
>> > > On Wednesday 21 December 2011, Abdelrazak Younes wrote:
>> > > Hi Alexander,
>> > >
>> > > Just wanted to let you know that, thanks to your assistance, we did
>> > > some more work on this. Please refer to the issue:
>> > >
>> > > http://public.kitware.com/Bug/view.php?id=12614
>> > >
>> > > It would be nice if this work could be integrated in next release of
>> > > CMake.>
>> > I'll have a look.
>> > It would be 2.8.8, 2.8.7 is basically done now.
>>
>> So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
>> how to patch installed version of cmake... Or we can switch to the git
>> repo... Actually, I just cloned the cmake repo, but I only see the "master"
>> branch in there. If I wanted to maintain our RVDS port, which branch should
>> I track?
>
> Master is the best idea to use. Any patches that should be merged have to made
> against master, and master is that stuff that will show up in the next stable
> version.
>
> Eike
> --
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


Just as an FYI: We will be producing the final CMake 2.8.7 next week,
and we will plan to produce the next one (presumably 2.8.8) at the end
of March, 2012. We have been, on average, releasing CMake every
quarter for the last year and a half now. The future is never firmly
predictable, but we will do our best to stick to a release every 3
months.

Thx,
David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Determine 32 vs 64 bit cpu

2011-12-22 Thread Michael Wild
On 12/22/2011 12:23 PM, pellegrini wrote:
> Hi all,
> 
> I have a program that uses an external library whose path name depends
> on its version (32 or 64 bit).
> 
> Is there a direct way in cmake to test whether my cpu is 32 or 64 bit ?

You don't actually care about the CPU, but the operating system (you can
install a 32-bit OS on a 64-bit machine)

> 
> The one I found up to now is the following:
> 
> if(CMAKE_SIZEOF_VOID_P EQUAL 8)
>set(arch_64 TRUE)
> else()
> set(arch_64 FALSE)
> endif()

Yes, that's the way to go. However, remember that on Mac OS X this is
almost always the wrong thing to do when you're building universal
binaries. So, if your software is supposed to work on Mac, you will need
to take special precautions.

> 
> thanks a lot and merry Christmas !

Same to you too!

> 
> Eric
> 
> 

Michael
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Determine 32 vs 64 bit cpu

2011-12-22 Thread pellegrini

Hi all,

I have a program that uses an external library whose path name depends 
on its version (32 or 64 bit).


Is there a direct way in cmake to test whether my cpu is 32 or 64 bit ?

The one I found up to now is the following:

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(arch_64 TRUE)
else()
set(arch_64 FALSE)
endif()

thanks a lot and merry Christmas !

Eric


--
Eric Pellegrini
Calcul Scientifique
Institut Laue-Langevin
Grenoble, France

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Rolf Eike Beer
Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
> -Original Message-
> From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
> Sent: Wednesday, December 21, 2011 9:41 PM
> To: cmake@cmake.org
> Cc: Abdelrazak Younes
> Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.
> 
> > > On Wednesday 21 December 2011, Abdelrazak Younes wrote:
> > > Hi Alexander,
> > > 
> > > Just wanted to let you know that, thanks to your assistance, we did
> > > some more work on this. Please refer to the issue:
> > > 
> > > http://public.kitware.com/Bug/view.php?id=12614
> > > 
> > > It would be nice if this work could be integrated in next release of
> > > CMake.> 
> > I'll have a look.
> > It would be 2.8.8, 2.8.7 is basically done now.
> 
> So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
> how to patch installed version of cmake... Or we can switch to the git
> repo... Actually, I just cloned the cmake repo, but I only see the "master"
> branch in there. If I wanted to maintain our RVDS port, which branch should
> I track?

Master is the best idea to use. Any patches that should be merged have to made 
against master, and master is that stuff that will show up in the next stable 
version.

Eike
-- 

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Small modification of a Linux-GNU toolchain

2011-12-22 Thread Eric Noulard
Hi all,

I'd to create a very simple cross-compile toolchain in order to work
on Intel SCC (http://techresearch.intel.com/ProjectDetails.aspx?Id=1)
I do have several cross-compiler choices (2 gcc-based and 1 icc-based).

My toolchains are working but for one of them
which is gcc-based  I get
i586-scc-elf-gcc: unrecognized option '-rdynamic'

So I tried to do that:

set(CMAKE_SYSTEM_NAME Linux)
# this one not so much
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR scc)

and create a Linux-GNU-scc.cmake file which contains:

set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")

in order to get rid of "-rdynamic"
but this does not work...

how can I derive this simple toolchain?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Abdelrazak Younes
-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Wednesday, December 21, 2011 9:41 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

> > On Wednesday 21 December 2011, Abdelrazak Younes wrote:
> > Hi Alexander,
> > 
> > Just wanted to let you know that, thanks to your assistance, we did some
> > more work on this. Please refer to the issue:
> > 
> > http://public.kitware.com/Bug/view.php?id=12614
> > 
> > It would be nice if this work could be integrated in next release of CMake.
>
> I'll have a look.
> It would be 2.8.8, 2.8.7 is basically done now.

So, as 2.8.8 would be probably in more than 6 months, we'll have to find out 
how to patch installed version of cmake... Or we can switch to the git repo... 
Actually, I just cloned the cmake repo, but I only see the "master" branch in 
there. If I wanted to maintain our RVDS port, which branch should I track?

Thanks,
Abdel.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake