[CMake] Xcode C++ linking

2011-03-02 Thread Robert Bielik
Hi, I'm trying to set Xcode to have static linking to the C++ standard libary, but I don't know how to. Also, Xcode mention that to make this work reliably, "Symbols hidden by default" must be enabled. Tips ? :) TIA /Rob ___ Powered by www.kitware.co

Re: [CMake] Select CMAKE_LIBRARY_OUTPUT_DIRECTORY_ in a CMakeLists.txt script

2011-03-02 Thread Rolf Eike Beer
> I am defining separate output paths for different configurations: > > CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= bin/win32/dbg > CMAKE_RUN TIME_OUTPUT_DIRECTORY_RELEASE = bin/win32/opt > > CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG= lib/win32/dbg > CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE = l

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Michael Wild
On 03/02/2011 09:05 AM, Robert Bielik wrote: > Hi, > > I'm trying to set Xcode to have static linking to the C++ standard > libary, but I don't know how to. Also, Xcode mention that > to make this work reliably, "Symbols hidden by default" must be enabled. > > Tips ? :) > > TIA > /Rob Probably

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Robert Bielik
Michael Wild skrev 2011-03-02 10:02: Probably this means to add -fvisibility=hidden and -static. However, -static will cause you to link everything statically, which will fail if you pass a dynamic library to target_link_libraries(). Ok, thanks, I'll try add this as target link properties in LI

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Michael Wild
On 03/02/2011 10:05 AM, Robert Bielik wrote: > Michael Wild skrev 2011-03-02 10:02: >> Probably this means to add -fvisibility=hidden and -static. However, >> -static will cause you to link everything statically, which will fail if >> you pass a dynamic library to target_link_libraries(). > > Ok,

Re: [CMake] Select CMAKE_LIBRARY_OUTPUT_DIRECTORY_ in a CMakeLists.txt script

2011-03-02 Thread David Cole
On Wed, Mar 2, 2011 at 3:31 AM, Rolf Eike Beer wrote: > > > I am defining separate output paths for different configurations: > > > >   CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG    = bin/win32/dbg > >   CMAKE_RUN TIME_OUTPUT_DIRECTORY_RELEASE = bin/win32/opt > > > >   CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEB

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Pablo Zurita
Yes, that works. Now I just need to remove the last character if it is a forward slash. How can I do that? Thanks, Pablo Zurita. Sent from my iPhone On Mar 2, 2011, at 1:47 AM, Yuri Timenkov wrote: > Does get_filename_component help? > > On Wed, Mar 2, 2011 at 6:17 AM, Pablo Zurita wrote:

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Michael Wild
string(REGEX REPLACE "/+$" "" dname "${dname}") Strips all trailing slashes. But honestly, "man cmake" would have been way faster and less embarrassing... HTH Michael On 03/02/2011 01:41 PM, Pablo Zurita wrote: > Yes, that works. > > Now I just need to remove the last character if it is a forw

Re: [CMake] Looking for advice on creating targets that use external packages

2011-03-02 Thread Michael Hertling
On 03/01/2011 04:52 PM, L. A. Pritchett-Sheats wrote: > Thanks for the reply. > > Just so I understand, is the following statement accurate: FIND_PACKAGE > for XXX sets plural XXX_INCLUDE_DIRS and XXX_LIBRARIES which include all > the needed include paths and libraries to compile and build anythin

[CMake] Function and list

2011-03-02 Thread Anton Sibilev
Hello! I have a function like FUNCTION (MY_FUNC list) MESSAGE ("..${list}") ENDFUNCTION () And I call it like: SET (list 11 22 33 44 55) MY_FUNC (list) and output is: ..11 How I can work with lists or unknown number of arguments in functions? ___ P

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Michael Jackson
On Mar 2, 2011, at 1:12, Michael Wild wrote: > On 03/02/2011 10:05 AM, Robert Bielik wrote: >> Michael Wild skrev 2011-03-02 10:02: >>> Probably this means to add -fvisibility=hidden and -static. However, >>> -static will cause you to link everything statically, which will fail if >>> you pass a

Re: [CMake] Function and list

2011-03-02 Thread Enrique Izaguirre
As far as I know, you have to use foreach( ) to print element by element in the list. BR Enrique On Wed, Mar 2, 2011 at 8:52 AM, Anton Sibilev wrote: > Hello! I have a function like > > FUNCTION (MY_FUNC list) > MESSAGE ("..${list}") > ENDFUNCTION () > > And I call it like: > SET (list 11 22

Re: [CMake] Function and list

2011-03-02 Thread Michael Wild
On 03/02/2011 03:52 PM, Anton Sibilev wrote: > Hello! I have a function like > > FUNCTION (MY_FUNC list) >MESSAGE ("..${list}") > ENDFUNCTION () > > And I call it like: > SET (list 11 22 33 44 55) > MY_FUNC (list) > > and output is: > ..11 > > How I can work with lists or unknown number of

[CMake] make didn't compile

2011-03-02 Thread Enrique Izaguirre
Hello friends, I have another problem with my build. I run Cmake and complete the building and production of a Makefile. But when I run make I get the following result: i686-unknown-linux-gnu-g++: cannot specify -o with -c or -S and multiple compilations make[2]: *** [CMakeFiles/myprj.dir/comdriv

Re: [CMake] make didn't compile

2011-03-02 Thread Michael Wild
On 03/02/2011 05:33 PM, Enrique Izaguirre wrote: > Hello friends, > > I have another problem with my build. I run Cmake and complete the building > and production of a Makefile. > But when I run make I get the following result: > > i686-unknown-linux-gnu-g++: cannot specify -o with -c or -S and m

[CMake] Need WILL_FAIL_ASSERTION or equivalent.

2011-03-02 Thread Chris Green
Hi, I find myself needing to count a test that I expect to fail an assertion (I'm using CMake 2.8.4). My first attempt, using the test property WILL_FAIL, erm, failed because apparently an abort is trapped as an exception rather than a failing execution. I have worked around this for now by writi

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Robert Bielik
Michael Jackson skrev 2011-03-02 18:14: In case you didn't happen to find this article: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/LibCPPDeployment.html Thanks! Have a vague memory of having seen that page before. But it doesn't con

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Michael Jackson
On Mar 2, 2011, at 12:05 AM, Robert Bielik wrote: > Hi, > > I'm trying to set Xcode to have static linking to the C++ standard libary, > but I don't know how to. Also, Xcode mention that > to make this work reliably, "Symbols hidden by default" must be enabled. > > Tips ? :) > > TIA > /Rob I

Re: [CMake] Xcode C++ linking

2011-03-02 Thread Michael Wild
On 02.03.2011, at 18:20, Robert Bielik wrote: > Michael Jackson skrev 2011-03-02 18:14: >> In case you didn't happen to find this article: >> >> >> http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/LibCPPDeployment.html > > Thanks! Have a v

[CMake] libdir question

2011-03-02 Thread Frans de Boer
Dear Readers, I guess that my question has been asked many time before, but I could not find it. So her it is (again): Using './configure --libdir=...' one can set the base directory where the libraries are supposed to be placed. CMake has so many options, which also need to be modified in the

[CMake] Parsing library list with keywords 'debug', 'optimized' and 'general' present

2011-03-02 Thread Lori Pritchett-Sheats
After reading the documentation, target_link_libraries allows a user to pass a list with keywords debug, optimized and general to indicate which set of libraries to use when CMAKE_BUILD_TYPE is set. Is there a command, function or macro that parses lists that have these keywords and returns the

[CMake] libdir question

2011-03-02 Thread Frans de Boer
Dear Readers, I guess that my question has been asked many time before, but I could not find it. So her it is (again): Using './configure --libdir=...' one can set the base directory where the libraries are supposed to be placed. CMake has so many options, which also need to be modified in the

[CMake] Stop substitution in passthrough list arguments?

2011-03-02 Thread Chris Green
Hi, I have a macro which takes a variety of arguments and does all the things necessary for making a test: compiling the exec (or copying the script), putting input files in the right place and setting desired properties on the test. I use the ParseArguments

Re: [CMake] Parsing library list with keywords 'debug', 'optimized' and 'general' present

2011-03-02 Thread Yuri Timenkov
Hi Lori, If you have options it's better to use imported libraries. They are far more flexible and allow specifying more than just debug and optimized configurations. If you stuck with these keywords, you can look at QT4_EXTRACT_OPTIONS macro in Qt4Macros.cmake (in CMake distribution). It contain

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Pablo Zurita
Thanks for the help guys. With that I was able to write the following function that allows me to deal with my source as I want. # create_source_group(relativeSourcePath sourceGroupName files) # # Creates a source group with the specified name relative to the relative path

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Michael Wild
On 03/03/2011 05:00 AM, Pablo Zurita wrote: > Thanks for the help guys. With that I was able to write the following > function that allows me to deal with my source as I want. > > # create_source_group(relativeSourcePath sourceGroupName files) > # > # Creates a source group with