Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Yuri Timenkov
As an option you can set up all these flags manually. In my current project we don't have many compilers to support but we need fine-grained control over compiler options (due to legacy and compatibility reasons). CMake allows to set precisely required options: # Override default Compiler flags se

Re: [CMake] Can we control component package name in 2.8.8?

2012-06-27 Thread jupiter
Thanks Eric and Micha for the clarification. Jupiter On Thu, Jun 28, 2012 at 12:54 AM, Eric Noulard wrote: > 2012/6/27 hce : > > Hi, > > > > I've read some discussions posted ten months ago on > > http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html > > where Eric Noulard poi

Re: [CMake] CPack and NSIS failure

2012-06-27 Thread David Demelier
2012/6/27 Eric Noulard : > 2012/6/27 David Cole : >>> Demelier David >> >> >> You can try: >> >>  set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") >> >> before you include(CPack). >> >> This bug ( http://public.kitware.com/Bug/view.php?id=7828 ) was >> resolved by adding the CPACK_NSIS_EXECUTABLES_DIRECTO

[CMake] Supplying different debug flags during compile and link stages for libraries and executables

2012-06-27 Thread Brett Delle Grazie
Hi, On AIX using the XLC compiler I've determined the debug flag (-g) should be used for all compile stages but should only be supplied to the final link stage of an executable (not a library target), otherwise duplicate symbol errors result. For reference see: http://www.ibm.com/developerworks/fo

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread David Cole
You're welcome! Glad it worked well. On Wed, Jun 27, 2012 at 3:42 PM, Robert Dailey wrote: > Here is my final code, this seems to work for both DLL and EXE targets: > > string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_EXE_LINKER_FLAGS > "${CMAKE_EXE_LINKER_FLAGS}" ) > string( REGEX REPLACE "/STACK

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Robert Dailey
Here is my final code, this seems to work for both DLL and EXE targets: string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" ) string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" ) string( REGEX REPLACE "/STACK:[0

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Robert Dailey
Yeah certainly, especially since multicore is pretty much everywhere now and most applications are designed with parallelization in mind. Like every other compiler and linker flag out there, have the user manually set that up if they want it. CMake doesn't automatically add any other compiler flag

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread David Cole
Ah. I just read through Windows-cl.cmake again to refresh my memory Also do the same thing with these two variables: CMAKE_SHARED_LINKER_FLAGS for SHARED dll targets, and CMAKE_MODULE_LINKER_FLAGS for MODULE dll targets. That should take care of it. Whew. Maybe we should just remove it from C

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Robert Dailey
I just tried your code and unfortunately /STACK still shows up for DLL targets, although for EXE targets it seems to be gone. On Wed, Jun 27, 2012 at 2:24 PM, David Cole wrote: > Try my code, and tell us if it removes the generated /STACK from all > your linker calls or not... > > Thx, > David >

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread David Cole
Try my code, and tell us if it removes the generated /STACK from all your linker calls or not... Thx, David On Wed, Jun 27, 2012 at 3:22 PM, Robert Dailey wrote: > Apparently this won't work... /STACK doesn't show up in any of the compile > flags retrieved this way. However, CMAKE_EXE_COMPILER_F

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread David Cole
Put double quotes around the final ${flags} here, like this: string( REGEX REPLACE "/STACK:[0-9]+" "" flags "${flags}" ) Otherwise, if ${flags} is empty, string(REGEX REPLACE will complain that it doesn't have any input string. Using the "" around it tells the command it really does have 6 argu

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Robert Dailey
Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey wrote: > This flag is appended to DLL targets too, so I created this (i ha

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Robert Dailey
This flag is appended to DLL targets too, so I created this (i haven't tested it yet though): function( _remove_stack_flag target_name ) get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS ) string( REGEX REPLACE "/STACK:[0-9]+" "" flags ${flags} ) set_property( TARGET ${target_name}

Re: [CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread David Cole
You could do: string(REPLACE "/STACK:1000 " "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") after the first project command in the top level CMakeLists file. (Or "/STACK:some other number" to change it, instead of the empty string to just remove it...) The /STACK string only appears

[CMake] /STACK:10000000 being added to linker in Visual Studio?

2012-06-27 Thread Robert Dailey
This is added to every generated visual studio project from version 7.1 to 9. How can I tell CMake not to modify the stack size? -- 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 th

Re: [CMake] ctest timeout: getting backtraces

2012-06-27 Thread Leif Walsh
Never mind, I found it. SIGKILL is used. Oh well. Sent from my iPhone On Jun 27, 2012, at 14:54, Leif Walsh wrote: > Thanks. > > Who knows about kwsys? I only need this on a couple of platforms and don't > mind doing it once for each. > > Sent from my iPhone > > On Jun 27, 2012, at 14:09,

Re: [CMake] CPack and NSIS failure

2012-06-27 Thread Eric Noulard
2012/6/27 David Cole : >> Demelier David > > > You can try: > >  set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") > > before you include(CPack). > > This bug ( http://public.kitware.com/Bug/view.php?id=7828 ) was > resolved by adding the CPACK_NSIS_EXECUTABLES_DIRECTORY variable in > this commit: In addi

Re: [CMake] ctest timeout: getting backtraces

2012-06-27 Thread Leif Walsh
Thanks. Who knows about kwsys? I only need this on a couple of platforms and don't mind doing it once for each. Sent from my iPhone On Jun 27, 2012, at 14:09, David Cole wrote: > ctest uses the kwsys utilities to launch and monitor sub-processes. > > Theoretically, it goes like this, with v

Re: [CMake] ctest timeout: getting backtraces

2012-06-27 Thread David Cole
ctest uses the kwsys utilities to launch and monitor sub-processes. Theoretically, it goes like this, with variations in implementation from platform to platform: After a call to a kwsysProcessCreate function (which spawns a process asynchronously and returns control to ctest), we loop while call

Re: [CMake] CPack and NSIS failure

2012-06-27 Thread David Cole
On Wed, Jun 27, 2012 at 9:07 AM, David Demelier wrote: > 2012/6/27 David Cole : >> It's because you're using (in essence): >> >>  DESTINATION ${CMAKE_INSTALL_PREFIX} >> >> for your install rules. >> >> Try "DESTINATION ." instead. The DESTINATION is automatically under >> CMAKE_INSTALL_PREFIX when

[CMake] How to force cmake to always give color o/p

2012-06-27 Thread vivek goel
CMake currently checks if it is writing to a TTY, and if not it switch off colors. Problem is that I am piping make o/p to sed command. One way to solve this problem is I can use unbuffer command. Is there any other solution to always force color output ? regards Vivek Goel -- Powered by www.k

Re: [CMake] cache behaviour

2012-06-27 Thread Ateljevich, Eli
Hello Eric, I am a relative beginner with cmake, but I have done a lot of experimenting to try to figure out the relative precedence of things with the cache. At the very least I will bump your topic and get a real answer. On my setup (2.6), the "-D" option seems to trump other initialization. F

Re: [CMake] local and system installs that include python and shell scripts

2012-06-27 Thread Yuri Timenkov
I think it should be quite common case in KDE community, since GUI usually have resources, but I don't know if apps can run from build dir. We use custom commands for these purposes, something like this: get_filename_component(destPath "${destName}" PATH) add_custom_command(OUTPU

Re: [CMake] Can we control component package name in 2.8.8?

2012-06-27 Thread Eric Noulard
2012/6/27 hce : > Hi, > > I've read some discussions posted ten months ago on > http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html > where Eric Noulard pointed out that we could not control component package > name for the reason of unique package name. I am currently running

Re: [CMake] (no subject)

2012-06-27 Thread Michele Santullo
On 06/27/2012 03:21 PM, David Henderson wrote: http://www.referralrecord.com/wp-content/themes/twentyten/rgpas.html -- 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 F

Re: [CMake] CPack and NSIS failure

2012-06-27 Thread David Demelier
2012/6/27 David Cole : > It's because you're using (in essence): > >  DESTINATION ${CMAKE_INSTALL_PREFIX} > > for your install rules. > > Try "DESTINATION ." instead. The DESTINATION is automatically under > CMAKE_INSTALL_PREFIX when expressed as a relative path. When you > express it as a full abs

[CMake] cache behaviour

2012-06-27 Thread pellegrini
Hello CMakers, I saw this question turning around several times but I do not really understand why the explanations do not suit with my problem. Sorry in advance for the redundancy. Here is my 'problem': I have a CMakeLists.txt file that starts with:

[CMake] Using $ORIGIN as rpath for third party configure script

2012-06-27 Thread vivek goel
Currently I am setting RPATH using following syntax SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN/../lib") It is working for the binary build using cmake. Problem is that it is not working for third party binary I am building using cmake using their auto-configure script. I am using fol

Re: [CMake] CPack and NSIS failure

2012-06-27 Thread David Cole
It's because you're using (in essence): DESTINATION ${CMAKE_INSTALL_PREFIX} for your install rules. Try "DESTINATION ." instead. The DESTINATION is automatically under CMAKE_INSTALL_PREFIX when expressed as a relative path. When you express it as a full absolute path, the install rule puts it

Re: [CMake] Ninja fails, Make succeeds...

2012-06-27 Thread David Cole
On Wed, Jun 27, 2012 at 2:59 AM, Rolf Eike Beer wrote: >> Sigh, now I sent you the code from the wrong directory, but the code for >> the "Backend" component is virtually identical.  I don't know how to use >> functions with CMake, so I simply made a verbatim copy of the below code >> in >> each s

Re: [CMake] Can we control component package name in 2.8.8?

2012-06-27 Thread m.hergarden
The unspecified may come from an Install statement that does not have a component specified. Micha On 06/27/2012 01:44 PM, hce wrote: Hi, I've read some discussions posted ten months ago on http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html where Eric Noulard pointed out

[CMake] Can we control component package name in 2.8.8?

2012-06-27 Thread hce
Hi, I've read some discussions posted ten months ago on http://cmake.3232098.n2.nabble.com/Component-Package-Name-td6976896.html where Eric Noulard pointed out that we could not control component package name for the reason of unique package name. I am currently running on 2.8.8 and generated very

[CMake] How to remove symbolic link

2012-06-27 Thread Petr Kmoch
Hi all. file(REMOVE ...) does not seem to be able to remove a file which is a symbolic link (neither on NFS nor on NTFS). Is there a platform-independent way to remove a symlink from within cmake, or do I have to resort to if() and execute_process()? Thanks for any replies. Petr -- Powered by w

[CMake] CPack and NSIS failure

2012-06-27 Thread David Demelier
Hello, I try to use CPack to create a Windows package using NSIS, it fails with: [100%] Built target sd-tris Run CPack packaging tool... CPack: Create package using NSIS CPack: Install projects CPack: - Run preinstall target for: sd-tris CPack: - Install project: sd-tris CPack: Create package CPa