Re: [CMake] Are CMake files aware of their path?

2009-10-20 Thread Alexander Neundorf
On Tuesday 20 October 2009, James C. Sutherland wrote: > If I add a CMake file via add_subdirectory is there a way to obtain > its absolute or relative path? Check ${CMAKE_CURRENT_LIST_FILE}, you may combine this with get_filename_component(). Alex ___

Re: [CMake] environment variables & scope

2009-10-20 Thread Alexander Neundorf
On Tuesday 20 October 2009, James C. Sutherland wrote: > How do I set an environment variable so that it is visible globally in > CMake? Specifically, I want to have it visible when I run something > like: > > #--- > # set the environment variable value > set( ENV{m

[CMake] Are CMake files aware of their path?

2009-10-20 Thread James C. Sutherland
If I add a CMake file via add_subdirectory is there a way to obtain its absolute or relative path? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-

[CMake] environment variables & scope

2009-10-20 Thread James C. Sutherland
How do I set an environment variable so that it is visible globally in CMake? Specifically, I want to have it visible when I run something like: #--- # set the environment variable value set( ENV{myVariable} ... ) # run a test through a CMake script that requ

Re: [CMake] working around rc.exe "too many -I# options"

2009-10-20 Thread David Cole
One easy way to hack around this problem would be to use add_custom_command to invoke the rc.exe directly... Not sure if you could just include a *.res file (output from rc) as a source in an add_library or add_executable call, though. Worth a shot On Tue, Oct 20, 2009 at 3:20 PM, John Dres

[CMake] Setting system environment variables through NSIS

2009-10-20 Thread James Bigler
Does CPack support setting system environment variables through the NSIS installer? Thanks, James ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topi

Re: [CMake] working around rc.exe "too many -I# options"

2009-10-20 Thread John Drescher
> I am trying to add Windows versioning information to my project. I am > using CMake 2.6.2 and VS2005. > > I have crafted a version.rc file which I use with all my libraries and > executables. This is working well except for one library which has 94 > include directories, one greater than the 93 d

[CMake] working around rc.exe "too many -I# options"

2009-10-20 Thread Tyler Roscoe
I am trying to add Windows versioning information to my project. I am using CMake 2.6.2 and VS2005. I have crafted a version.rc file which I use with all my libraries and executables. This is working well except for one library which has 94 include directories, one greater than the 93 directory li

Re: [CMake] Post install scripts for debian

2009-10-20 Thread as
Mathieu, Eric: Merci! Strangely when I searched online, I didn't find the link that Mathieu sent. The command that Eric suggested worked fine. I was able to test it only today. Thanks again. I have updated the wiki pages as well. Aravind. On 10/19/09, Eric Noulard wrote: > 2009/10/19 Mathieu M

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Steven Wilson
Sweet! Thanks much! On Tue, Oct 20, 2009 at 10:59 AM, Philip Lowman wrote: > cmake.org/Bug/view.php?id=6493 > > On Oct 20, 2009 11:29 AM, "Steven Wilson" > wrote: > > I am asking why CMake doesn't support the following: > > set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_ > "-fmyflag")

Re: [CMake] Encapsulating macros

2009-10-20 Thread Alexander Neundorf
On Tuesday 20 October 2009, Theodore Papadopoulo wrote: > Following-up a previous message "Re: [CMake] Updating cache entries on > variable modification", I would like > to encapsulate the FIND_LIBRARY. > > Taking a simple example, let's assume that I'd like to have a list of > all the calls of FIN

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Philip Lowman
cmake.org/Bug/view.php?id=6493 On Oct 20, 2009 11:29 AM, "Steven Wilson" wrote: I am asking why CMake doesn't support the following: set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_ "-fmyflag") > Would set_target_properties() work? Then you can do something like: > > set_target_prope

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Tyler Roscoe
Disregard my previous reply. On Tue, Oct 20, 2009 at 09:28:19AM -0600, Steven Wilson wrote: > I am asking why CMake doesn't support the following: > > set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_ > "-fmyflag") Ok, good question. It seems like a pretty compelling feature. Maybe you

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Steven Wilson
I am asking why CMake doesn't support the following: set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_ "-fmyflag") On Tue, Oct 20, 2009 at 10:44 AM, Tyler wrote: > Please reply to the list so others can help. > > On Mon, Oct 19, 2009 at 06:11:23PM -0600, Steven Wilson wrote: > > Yes, bu

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Tyler
Please reply to the list so others can help. On Mon, Oct 19, 2009 at 06:11:23PM -0600, Steven Wilson wrote: > Yes, but CMAKE_CXX_FLAGS_ and CMAKE_C_FLAGS_ are global in > scope. I want to be able to make changes to the compilation flags at the > target level based on the current configuration.

[CMake] Encapsulating macros

2009-10-20 Thread Theodore Papadopoulo
Following-up a previous message "Re: [CMake] Updating cache entries on variable modification", I would like to encapsulate the FIND_LIBRARY. Taking a simple example, let's assume that I'd like to have a list of all the calls of FIND_LIBRARY I did. Is there a way of creating a cmake script that

Re: [CMake] "Error in read script" when not calling CTEST_TEST in ctest script

2009-10-20 Thread winfried_mb2
Thanks for the reply, it's clear now. It's also a bit unfortunate though for some cases. The CTEST_TEST(...) call will always result in an exit code of 255 if no tests have been defined in the CMakeLists.txt. Since the script below is called from a build system it would be nice to be able to se

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Will Dicharry
Steven Wilson wrote: I am asking why CMake doesn't support the following: set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_ "-fmyflag") Ah...I see now, sorry for misunderstanding. That would indeed be a useful feature, much like how you can set flags for different variants in Boost

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Steven Wilson
I am asking why CMake doesn't support the following: set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_ "-fmyflag") Would set_target_properties() work? Then you can do something like: > > set_target_properties( ${TARGET} PROPERTIES COMPILE_FLAGS "-fmyflag" ) > > to set compile flags on a

Re: [CMake] COMPILE_FLAGS_

2009-10-20 Thread Will Dicharry
Steven Wilson wrote: -- Forwarded message -- From: *Steven Wilson* > Date: Mon, Oct 19, 2009 at 6:11 PM Subject: Re: [CMake] COMPILE_FLAGS_ To: Tyler Roscoe mailto:ty...@cryptio.net>> Yes, but CMAKE_CXX_FLAGS_ and CMAKE_C_FLAGS_ are glob

Re: [CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking alibrary

2009-10-20 Thread Bill Hoffman
Vladimir Lebedev-Schmidthof wrote: No I didn't. I just did and all compiled and linked successfully. Sorry for stupid questions then, I will remember to clean cmake-generated files in future. Thank you very much. -- You should use out of source builds in the future... :) -Bill _

Re: [CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking alibrary

2009-10-20 Thread Vladimir Lebedev-Schmidthof
Hello Hendrik, On Oct 20, 2009, at 17:50 PM, Hendrik Sattler wrote: Zitat von Vladimir Lebedev-Schmidthof : > I tried having toochain.cmake file in the same dir as CMakeLists.txt > > using > cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake . > > does not seem to even read that file. I tried to sta

Re: [CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Hendrik Sattler
Zitat von Vladimir Lebedev-Schmidthof : I tried having toochain.cmake file in the same dir as CMakeLists.txt using cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake . does not seem to even read that file. I tried to state full path, move the file away, no luck. Since you are doing an in-source b

Re: [CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Vladimir Lebedev-Schmidthof
Hello Hendrik, On Oct 20, 2009, at 15:56 PM, Hendrik Sattler wrote: > I tried. Setting CMAKE_SYSTEM_NAME to "Linux" does not seem to affect > CMAKE_SYSTEM WHERE are you try to set this? Setting this in a CMakeLists.txt file will not work. Did you read the wiki page[1] about cross-compiling? C

Re: [CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Hendrik Sattler
Zitat von Vladimir Lebedev-Schmidthof : On Oct 19, 2009, at 23:18 PM, Alexander Neundorf wrote: I set CMAKE_SYSTEM to Linux, even added "SET(APPLE 0)" but install_name option is still generating. You should set "CMAKE_SYSTEM_NAME", not "CMAKE_SYSTEM" to "Linux". If you really set CMAKE_SYSTEM

Re: [CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking a library

2009-10-20 Thread Vladimir Lebedev-Schmidthof
Hello Alexander, On Oct 19, 2009, at 23:18 PM, Alexander Neundorf wrote: > I set CMAKE_SYSTEM to Linux, even added "SET(APPLE 0)" but > install_name option is still generating. You should set "CMAKE_SYSTEM_NAME", not "CMAKE_SYSTEM" to "Linux". If you really set CMAKE_SYSTEM instead of CMAKE_S

Re: [CMake] install(FILES mylib-config.cmake DESTINATION lib/myproj)

2009-10-20 Thread Mathieu Malaterre
On Mon, Oct 19, 2009 at 9:51 PM, Brad King wrote: > Mathieu Malaterre wrote: >> >> Hi there, >> >>  I am trying some new functionalities in CMake, in particular: >> >> http://www.cmake.org/Wiki/CMake_2.6_Notes#Packaging_and_Exporting >> >>  However using cmake 2.8, I get an error: >> >> CMake Erro