[CMake] Cross compiling and linking

2011-08-09 Thread Christian Lees
I'm trying to compile code for an ARM processor on an x86-64 Ubuntu machine. I'm using scratchbox, compiling programes with the standard autoconf/configure scripts work fine so the cross compiler works. When I use Cmake I runinto problems, the following is my arm_cross.cmake file INCLUDE(CM

Re: [CMake] exclude build project from solution

2011-08-09 Thread Johan Björk
Dave, Bill? Anyone know what the difference is intended to be between EXLUDE_FROM_ALL vs EXCLUDE_FROM_DEFAULT_BUILD? /Johan On Mon, Aug 1, 2011 at 6:57 PM, Johan Björk wrote: > And another update while at it. > > The following cmake file illustrates the issue: > > FILE(WRITE foo.c "") > add_li

Re: [CMake] Fwd: access absolute path of parent directory

2011-08-09 Thread Vinay Raj Hampapur
Thanks, John. I'm pretty sure I tried that earlier and it failed. It's working now! Cheers, Vinay On Tue, Aug 9, 2011 at 1:57 PM, John Drescher wrote: > -- Forwarded message -- > From: John Drescher > Date: Tue, Aug 9, 2011 at 4:56 PM > Subject: Re: [CMake] access absolute path

[CMake] Weird behaviour with CPackComponent and NSIS

2011-08-09 Thread Mathias Gaunard
I've recently upgraded to CMake 2.8.5 to try out the new CPack/CPackComponent separation, which allows me to include CPackComponent to get the various cpack component macros, but only include CPack later. I end up with very strange things happening, which I haven't been able to debug. What

[CMake] Fwd: access absolute path of parent directory

2011-08-09 Thread John Drescher
-- Forwarded message -- From: John Drescher Date: Tue, Aug 9, 2011 at 4:56 PM Subject: Re: [CMake] access absolute path of parent directory To: Vinay Raj Hampapur On Tue, Aug 9, 2011 at 4:24 PM, Vinay Raj Hampapur wrote: > Sure. > Here is what I have(I've tried it with double q

Re: [CMake] access absolute path of parent directory

2011-08-09 Thread Vinay Raj Hampapur
Sure. Here is what I have(I've tried it with double quotes as well): set(Bob /..) set(Dave ${Bob}/Dave) set(D_src ${Dave/Dave.cpp) ... and corresponding add executable command at which point the following error is produced: CMake Error at CMakeLists.txt:100 (add_executable): Canno

Re: [CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread Michael Jackson
On Aug 9, 2011, at 3:30 PM, David Partyka wrote: > Very cool! > > +1 > > On Tue, Aug 9, 2011 at 3:28 PM, David Cole wrote: > On Tue, Aug 9, 2011 at 3:27 PM, wrote: > > > > Here's my (not so complete) understanding... > > Public assemblies are searched before private ones. > > http://msdn.m

Re: [CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread David Partyka
Very cool! +1 On Tue, Aug 9, 2011 at 3:28 PM, David Cole wrote: > On Tue, Aug 9, 2011 at 3:27 PM, wrote: > > > > Here's my (not so complete) understanding... > > Public assemblies are searched before private ones. > > http://msdn.microsoft.com/en-us/library/aa374224(v=vs.85).aspx > > > > So,

[CMake] append command

2011-08-09 Thread Alan W. Irwin
On 2011-08-09 17:19+0100 Glenn Coombs wrote: Probably too late now and there isn't a bug filed so far as I know, but one thing I would love to see added to cmake is an append command so that lines like this:     set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /INCREMENTA

Re: [CMake] access absolute path of parent directory

2011-08-09 Thread John Drescher
>   I've been trying to access the parent directory by using > CMakeLists.txt. However, the  "../" or ".." or "/../" notations don't access > said parent directory. Can you show a small example? I know this has worked for me. John ___ Powered by ww

Re: [CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread David Cole
On Tue, Aug 9, 2011 at 3:27 PM, wrote: > > Here's my (not so complete) understanding... > Public assemblies are searched before private ones. > http://msdn.microsoft.com/en-us/library/aa374224(v=vs.85).aspx > > So, on your machine, you have the required CRT libraires in the winsxs folder. > You a

[CMake] access absolute path of parent directory

2011-08-09 Thread Vinay Raj Hampapur
Hello, I've been trying to access the parent directory by using CMakeLists.txt. However, the "../" or ".." or "/../" notations don't access said parent directory. Thank you, Vinay ___ Powered by www.kitware.com Visit other Kitware open-source proj

Re: [CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread clinton
Here's my (not so complete) understanding... Public assemblies are searched before private ones. http://msdn.microsoft.com/en-us/library/aa374224(v=vs.85).aspx So, on your machine, you have the required CRT libraires in the winsxs folder. You also have a redirection that says to use a newer CRT l

Re: [CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread Michael Jackson
Yes, I think part of the issue is what is mentioned and I do have plugins (Qt based) and have taken the steps he lays out. But I am still curious as to why Dependency Walker says it is using one version of the runtime libraries when the Manifest (both external and embedded) says to use another.

Re: [CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread Michael Wild
On Tue 09 Aug 2011 06:48:34 PM CEST, Michael Jackson wrote: > Not sure if this is a CMake issue or not but I'll give it a shot. I am > packaging up my application using CPack (zip) and all seems fine. I get the > MSVC runtime libraries copied and the manifest file created and all seems to > run

Re: [CMake] FindThreads.cmake for Android

2011-08-09 Thread David Cole
Please do not submit an entry to the bug tracker. It's a duplicate of these two existing entries: http://public.kitware.com/Bug/view.php?id=7830 http://public.kitware.com/Bug/view.php?id=11333 Monitor those to see when they're fixed. Presently, they're on the roadmap for the upcoming CMake 2.

[CMake] FindThreads.cmake for Android

2011-08-09 Thread Gregory Peele ARA/CFD
Hi all, I noticed that FindThreads.cmake does not detect that Bionic (the Android C library) has pthreads built-in. Adding the following snippet to the front of the pthreads section (after pthread.h is found) in FindThreads.cmake seems to handle this case correctly. CHECK_SYMBOL_EXISTS

[CMake] Not matching versions of MSVC Runtime Libraries in Manifest

2011-08-09 Thread Michael Jackson
Not sure if this is a CMake issue or not but I'll give it a shot. I am packaging up my application using CPack (zip) and all seems fine. I get the MSVC runtime libraries copied and the manifest file created and all seems to run just fine. If I use Dependency Walker to look at exactly _which_ C/C

[CMake] how to add additional linker options

2011-08-09 Thread Vinay Raj Hampapur
Hello, I need to add to provide additional linker options to the program from within my CMakeLists.txt targeted at MSVC platform. In particular, I would like to add the /FORCE:Multiply option to the linker. How would I go about doing this? Also, how would I set the options to suppress any (all)

Re: [CMake] Bug fix requests for the *next* release of CMake...

2011-08-09 Thread Glenn Coombs
Probably too late now and there isn't a bug filed so far as I know, but one thing I would love to see added to cmake is an append command so that lines like this: set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /INCREMENTAL:NO") become shorter and easier to understand:

Re: [CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Michael Hertling
On 08/09/2011 04:43 PM, Michael Wild wrote: > Well, directory properties are used by _targets_ defined in that > directory. It doesn't matter where the sources are located. > > Michael Additionally, setting a source property in the leaf CMakeLists.txt files as it has been suggested in this thread

[CMake] Wiki spam

2011-08-09 Thread Johannes Zarl
Hi, I just noticed that some spam pages seem to have been inserted into the wiki using these user accounts: http://www.cmake.org/Wiki/Special:Contributions/Carinsurancecarinsurancequotes http://www.cmake.org/Wiki/Special:Contributions/Sarawilliam30 http://www.cmake.org/Wiki/Special:Contributions

Re: [CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Michael Wild
Well, directory properties are used by _targets_ defined in that directory. It doesn't matter where the sources are located. Michael On 08/09/2011 04:36 PM, Tim Gallagher wrote: > Interesting -- I guess this is sort of off topic from the original post, but > that brings up a question: > > How d

Re: [CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Tim Gallagher
Interesting -- I guess this is sort of off topic from the original post, but that brings up a question: How does setting the COMPILE_DEFINITIONS on the directory work then? I was under the impression (not having tried it) that those definitions would only be added when compiling files contained

Re: [CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Michael Wild
On Tue 09 Aug 2011 04:28:51 PM CEST, Tim Gallagher wrote: > In your leaf CMakeLists.txt, try doing: > > set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS > ${LOCAL_COMPILE_FLAGS}) > > where ${SOURCE_FILES} is a list of the files in the directory and > ${LOCAL_COMPILE_FLAGS} is

Re: [CMake] CMAKE_ROOT issue in scratchbox, N9(50)

2011-08-09 Thread Michael Wild
On Tue 09 Aug 2011 04:04:59 PM CEST, Laszlo Papp wrote: > Hi Alex, > >> Which version of cmake is this ? >> Is this 2.8.5rcX or trunk ? >> Then it might be the new multiarch support feature maybe. > > 2.8.4 and it will probably not even change on Harmattan > >> Uh. >> The part where you install

Re: [CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Tim Gallagher
In your leaf CMakeLists.txt, try doing: set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS}) where ${SOURCE_FILES} is a list of the files in the directory and ${LOCAL_COMPILE_FLAGS} is the list of flags for those files. Ideally you would want to set t

Re: [CMake] CMAKE_ROOT issue in scratchbox, N9(50)

2011-08-09 Thread Laszlo Papp
Hi Alex, > Which version of cmake is this ? > Is this 2.8.5rcX or trunk ? > Then it might be the new multiarch support feature maybe. 2.8.4 and it will probably not even change on Harmattan > Uh. > The part where you install *.cmake files into ${CMAKE_ROOT}/Modules/ is really > bad. Remove it. Y

[CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Andrei Buzgan
Hello, I'm trying to compile out-of-source an embedded C application using CMake and MinGW and to use specific compiler flags for some source files. I tried the approach described in http://www.cmake.org/pipermail/cmake/2011-April/043703.html but it didn't work for me. I'm describing below what i'