[CMake] Is it a bug that cmake / cpack could not handle directory name with @?

2013-04-04 Thread hce
Hi, I have a binary directory contains subdirectories name with "@": graph3d/@graph3d/@colorbar/colorbar.m scribe/@scribe/@colorbar/colorbar.m When I run cpack -G RPM, it removed @ and put following string name in the spec: graph3d/graph3d/colorbar/colorbar.m scribe/scribe/colorbar/colorbar.m

Re: [CMake] Installing and Exporting for multiple configurations

2013-04-04 Thread J Decker
On Thu, Apr 4, 2013 at 2:25 PM, Matthew Woehlke wrote: > On 2013-04-04 17:04, J Decker wrote: > >> Also, you should install to 'lib${LIB_SUFFIX}', not 'lib'. This will allow >>> you (and distros packaging your software) to set LIB_SUFFIX to separate >>> arch-specific components of 32- and 64-bit

Re: [CMake] Explanation of the CMake INSTALL and EXPORT Commands

2013-04-04 Thread Matthew Woehlke
On 2013-04-04 15:32, Saad Khattak wrote: Thanks for the very valuable info Matthew. If Project A is installed (to a standard location), then it is available system wide, yes. However you should still use find_package(A) rather than relying on e.g. target_link_libraries(B A) I tried to use fin

Re: [CMake] Installing and Exporting for multiple configurations

2013-04-04 Thread Matthew Woehlke
On 2013-04-04 17:04, J Decker wrote: Also, you should install to 'lib${LIB_SUFFIX}', not 'lib'. This will allow you (and distros packaging your software) to set LIB_SUFFIX to separate arch-specific components of 32- and 64-bit builds. E.g. on Linux, lib_suffix is usually ''/'64' or '32'/'', and o

Re: [CMake] Installing and Exporting for multiple configurations

2013-04-04 Thread J Decker
> Also, you should install to 'lib${LIB_SUFFIX}', not 'lib'. This will allow > you (and distros packaging your software) to set LIB_SUFFIX to separate > arch-specific components of 32- and 64-bit builds. E.g. on Linux, > lib_suffix is usually ''/'64' or '32'/'', and on Windows might be > ''/'/amd64

Re: [CMake] CMakeModules repository at GitHub?

2013-04-04 Thread Mateusz Loskot
On 4 April 2013 20:14, Alexander Neundorf wrote: > On Thursday 04 April 2013, Mateusz Loskot wrote: >> On 4 April 2013 17:44, Alexander Neundorf wrote: >> > On Thursday 28 March 2013, Mateusz Loskot wrote: >> >> To CMake maintainers, >> >> what do you think about creating new repository at >> >>

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Eric Noulard
2013/4/4 Jean-Christophe Fillion-Robin > Consider looking at the implementation of PreventInSourceBuilds.cmake in > ITK > See > https://github.com/Kitware/ITK/blob/master/CMake/PreventInSourceBuilds.cmake > > May it could be generalized and integrated in CMake itself ? > Yes it could but it is n

Re: [CMake] Explanation of the CMake INSTALL and EXPORT Commands

2013-04-04 Thread Saad Khattak
Thanks for the very valuable info Matthew. If Project A is installed (to a standard location), then it is available > system wide, yes. However you should still use find_package(A) rather > than relying on e.g. target_link_libraries(B A) I tried to use find_package(A) but CMake would display a w

Re: [CMake] Installing and Exporting for multiple configurations

2013-04-04 Thread Saad Khattak
Thanks for the solution. I will try this but perhaps you are right and I should instead go with different builds for each configuration. On Thu, Apr 4, 2013 at 3:54 AM, J Decker wrote: > there is a variable that can be used... > > if( SUPPORTS_PARALLEL_BUILD_TYPE ) > INSTALL( lib/${CMAKE_

Re: [CMake] CMakeModules repository at GitHub?

2013-04-04 Thread Alexander Neundorf
On Thursday 04 April 2013, Mateusz Loskot wrote: > On 4 April 2013 17:44, Alexander Neundorf wrote: > > On Thursday 28 March 2013, Mateusz Loskot wrote: > >> To CMake maintainers, > >> what do you think about creating new repository at > >> > >> https://github.com/Kitware/CMakeModules > >> > >>

Re: [CMake] CMakeModules repository at GitHub?

2013-04-04 Thread Mateusz Loskot
On 4 April 2013 17:44, Alexander Neundorf wrote: > On Thursday 28 March 2013, Mateusz Loskot wrote: >> >> To CMake maintainers, >> what do you think about creating new repository at >> >> https://github.com/Kitware/CMakeModules >> >> as incubator for contributed CMake modules? > > we are in the pr

[CMake] How can I programmatically configure compiler for CMake via Python on Windows?

2013-04-04 Thread Mark Roden
Hi all, I've posted this question here: http://stackoverflow.com/questions/15804525/how-can-i-programmatically-configure-compiler-for-cmake-via-python-on-windows/15815937 The question is: I have a python build script I'm using to build a number of projects that are configured via CMake on windo

Re: [CMake] MinGW Link with -l instead of path?

2013-04-04 Thread J Decker
On Wed, Apr 3, 2013 at 9:12 AM, J Decker wrote: > alternate target_link_libraries. Usage is the same. Test if each library > to link is a target, get that targets path, and break it into parts and add > it to LINK_FLAGS else add with target_link_libraries... > > macro(my_target_link_libraries t

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Jean-Christophe Fillion-Robin
Consider looking at the implementation of PreventInSourceBuilds.cmake in ITK See https://github.com/Kitware/ITK/blob/master/CMake/PreventInSourceBuilds.cmake May it could be generalized and integrated in CMake itself ? Jc On Thu, Apr 4, 2013 at 12:49 PM, Andreas Stahl wrote: > > Am 04.04.2013

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Andreas Stahl
Am 04.04.2013 um 17:31 schrieb Brian Milco: > > On Thu, Apr 4, 2013 at 6:01 AM, Daniele E. Domenichelli > wrote: > One benefit is that it would allow to easily remove all cmake files when > you wrongly run cmake in the source directory instead of in the build one. > > > A while ago I found

Re: [CMake] CMakeModules repository at GitHub?

2013-04-04 Thread Alexander Neundorf
On Thursday 28 March 2013, Mateusz Loskot wrote: > Hi, > > To CMake maintainers, > what do you think about creating new repository at > > https://github.com/Kitware/CMakeModules > > as incubator for contributed CMake modules? we are in the process of setting such a "package" up within KDE, but

Re: [CMake] Redirect output from add_custom_target()

2013-04-04 Thread David Cole
Write a script and redirect from inside the script? On Apr 4, 2013, at 12:07 PM, Robert Dailey wrote: > I guess there's no way to make this work without adding a new option > to add_custom_target()? > > On Thu, Apr 4, 2013 at 7:26 AM, Rolf Eike Beer wrote: >> Micha Renner wrote: >>> >>> I wou

Re: [CMake] Redirect output from add_custom_target()

2013-04-04 Thread Robert Dailey
I guess there's no way to make this work without adding a new option to add_custom_target()? On Thu, Apr 4, 2013 at 7:26 AM, Rolf Eike Beer wrote: > Micha Renner wrote: >> >> I would try >> >> add_custom_target( ${doc_target_name} >> DEPENDS ${generated_conf} >>

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniel Carrera
On 4 April 2013 17:32, Matthew Woehlke wrote: > > cd .. > rm -rf build > mkdir build > cd build > > ...? ;-) > > (If your build directories tend to be in the same place, you could easily > write a shell function to do this, to save typing.) Done. I should have thought of that. Cheers, Daniel. -

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Matthew Woehlke
On 2013-04-04 06:30, Daniel Carrera wrote: On 4 April 2013 11:40, Ansis Māliņš wrote: What would be the benefit of such a command besides syntax? Only a small convenience, nothing big. I am used to typing "make cleann" when I want to make sure that I am starting from a clean slate. I also have

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Matthew Woehlke
On 2013-04-04 11:01, Daniel Carrera wrote: On 4 April 2013 12:41, Eric Noulard wrote: Yes I know. By suicidal I mean that the built tool will remove its own file (but not the CMakeLists.txt off course). I see what you mean. The Makefile is killing itself. It is committing suicide. Would it be

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Brian Milco
On Thu, Apr 4, 2013 at 6:01 AM, Daniele E. Domenichelli < daniele.domeniche...@gmail.com> wrote: > > One benefit is that it would allow to easily remove all cmake files when > you wrongly run cmake in the source directory instead of in the build one. > > A while ago I found the attached macro onlin

Re: [CMake] Installing and Exporting for multiple configurations

2013-04-04 Thread Matthew Woehlke
On 2013-04-03 22:06, Saad Khattak wrote: Hi, I am trying my best to understand CMake's install and export commands so that separate projects are able to find libraries easily. I am having a tremendously hard time understand what CMake is doing. After 'add_library()' where the library is called

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniel Carrera
On 4 April 2013 12:41, Eric Noulard wrote: > Yes I know. > By suicidal I mean that the built tool will remove its own file > (but not the CMakeLists.txt off course). I see what you mean. The Makefile is killing itself. It is committing suicide. Would it be a reasonable idea to delete CMakeCache.

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniele E. Domenichelli
On 04/04/13 15:34, Eric Noulard wrote: > CMake cannot currently do that and it does not seem wise > to ask for that feature. > You may search the mailing list for this discussion topic and you'll find > many answers. > > The only [reasonable] option is to do out-of-source build, > then you know fo

Re: [CMake] Potential bug to set a working directory for test

2013-04-04 Thread Klaim - Joël Lamotte
On Thu, Apr 4, 2013 at 2:53 PM, Martin Weber wrote: > If your binary dir resides on a different drive than E:, the generated > command will not work. Remember, cd on windows does not change the drive. > The generated command should be > cd /D E:/projects... > No all the file manipulations happen

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Eric Noulard
2013/4/4 Daniele E. Domenichelli > Hello, > > On 04/04/13 11:40, Ansis Māliņš wrote: > >> Is it possible to ask CMake to make another "make clean" target > >> that clears *all* the CMake generated files including the cache? I > >> am a bit annoyed that the only way to clear everything is to > >>

Re: [CMake] Potential bug to set a working directory for test

2013-04-04 Thread Martin Weber
Am 27.03.2013 17:57, schrieb Klaim - Joël Lamotte: Hi, I'm using CMake 2.10.2 the VS2012(VC11) generator. I summed-up my problem in the last paragraph. I'm trying to do this: add_test( NAME ${TEST_PROJECT_NAME} WORKING_DIRECTORY ${TEST_WORKING_DIR} COMMAND ${TEST_PROJECT_NAME} )

Re: [CMake] MinGW Link with -l instead of path?

2013-04-04 Thread Hendrik Sattler
Am 2013-04-03 17:25, schrieb J Decker: All of these articles say the way to avoid having an absolute path stored in the linked output is to use -L -l ... which is definatly not what cmake is producing.  Reflecting on this, maybe I can replace target_link_libraries with manually specified link_f

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniele E. Domenichelli
Hello, On 04/04/13 11:40, Ansis Māliņš wrote: >> Is it possible to ask CMake to make another "make clean" target >> that clears *all* the CMake generated files including the cache? I >> am a bit annoyed that the only way to clear everything is to >> basically run "rm -rf *". > > What would be the

Re: [CMake] Redirect output from add_custom_target()

2013-04-04 Thread Rolf Eike Beer
Micha Renner wrote: I would try add_custom_target( ${doc_target_name} DEPENDS ${generated_conf} COMMAND ${doxygen_exe} ${generated_conf} 2 > filename WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating documentation using

Re: [CMake] Redirect output from add_custom_target()

2013-04-04 Thread Micha Renner
I would try add_custom_target( ${doc_target_name} DEPENDS ${generated_conf} COMMAND ${doxygen_exe} ${generated_conf} 2 > filename WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating documentation using Doxygen" ) M

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Eric Noulard
2013/4/4 Daniel Carrera > On 4 April 2013 11:41, Eric Noulard wrote: > > You can perfectly add a custom target/command to do that, > > if you do out-of-source build then removing the build dir is ok. > > Thanks. Yes, I am doing out of source builds. > > > Now, this would be a one-shot suicidal t

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniel Carrera
On 4 April 2013 11:41, Eric Noulard wrote: > You can perfectly add a custom target/command to do that, > if you do out-of-source build then removing the build dir is ok. Thanks. Yes, I am doing out of source builds. > Now, this would be a one-shot suicidal target since this will > basically eras

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniel Carrera
On 4 April 2013 11:40, Ansis Māliņš wrote: > What would be the benefit of such a command besides syntax? Only a small convenience, nothing big. I am used to typing "make cleann" when I want to make sure that I am starting from a clean slate. I also have my shell configured so that it warns me whe

[CMake] cmake build matlab compiler runtime MCR

2013-04-04 Thread hce
Hi, Has anyone built MATLAB Compiler Runtime (MCR) using cmake and cpack for RPM package? I have built MCR using Cmake External Projects and installed the binary in an installation directory, but when I run cpack -G RPM, it got errors of missing many files in install directory. Why cpack created s

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Eric Noulard
2013/4/4 Daniel Carrera > Hi all, > > Is it possible to ask CMake to make another "make clean" target that > clears *all* the CMake generated files including the cache? I am a bit > annoyed that the only way to clear everything is to basically run "rm > -rf *". > You can perfectly add a custom t

Re: [CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Ansis Māliņš
What would be the benefit of such a command besides syntax? -- 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 lin

[CMake] "make superclean" target? (i.e. clear *everything*)

2013-04-04 Thread Daniel Carrera
Hi all, Is it possible to ask CMake to make another "make clean" target that clears *all* the CMake generated files including the cache? I am a bit annoyed that the only way to clear everything is to basically run "rm -rf *". Cheers, Daniel. -- Lord of the rings calendar in your Linux/Unix/Mac te

Re: [CMake] Installing and Exporting for multiple configurations

2013-04-04 Thread J Decker
there is a variable that can be used... if( SUPPORTS_PARALLEL_BUILD_TYPE ) INSTALL( lib/${CMAKE_INSTALL_CONFIG_TYPE} ) would install into # used as install_mode_dest( target_names ) macro( install_mode_dest ) install( TARGETS ${ARGV} RUNTIME DESTINATION bin/\${CMAKE_INSTALL_CONFIG_NAME} LIB