Re: [CMake] Multiple output directories

2011-06-28 Thread Michael Hertling
On 06/28/2011 12:36 PM, Michael Hertling wrote: On 06/28/2011 10:40 AM, pellegrini wrote: Hello everybody, I would like to know if there is a cmake command to place my generated executable in several directories in one shot. Using SET(EXECUTABLE_OUTPUT_PATHmy_path1) will allow

Re: [CMake] Dependency on library in a separate branch

2011-06-27 Thread Michael Hertling
On 06/27/2011 12:43 AM, Klaim - Joël Lamotte wrote: 2011/6/26 David Cole david.c...@kitware.com In your top level CMakeLists.txt: add_subdirectory(B) add_subdirectory(A) add_subdirectory(C) A C must come after B since they both depend on B. Does that help? Thanks for your answer.

Re: [CMake] Enabling C99 in CMake

2011-06-25 Thread Michael Hertling
On 06/24/2011 04:16 PM, Owen Shepherd wrote: On 23/06/2011 23:32, Todd Gamblin tgamb...@llnl.gov wrote: You could do this, but it seems like a lot of work for the developer AND the user compared to my suggestion of just having a variable for the compiler-specific C99 flags, or some similar

Re: [CMake] Enabling C99 in CMake

2011-06-25 Thread Michael Hertling
On 06/23/2011 06:20 PM, Jed Brown wrote: On Thu, Jun 23, 2011 at 17:50, Michael Hertling mhertl...@online.de wrote: You need to use a C99 compiler for your project This is already a problem. C99 introduces new keywords (e.g. restrict) and removes implicit int. It is entirely possible

Re: [CMake] Enabling C99 in CMake

2011-06-25 Thread Michael Hertling
On 06/24/2011 12:32 AM, Todd Gamblin wrote: Thanks to Sean and Jed for useful counterexamples. A few more points: On Jun 23, 2011, at 8:50 AM, Michael Hertling wrote: While I can understand your point, I'm of a different opinion: In the end, it's the responsibility of the user

Re: [CMake] Enabling C99 in CMake

2011-06-23 Thread Michael Hertling
On 06/23/2011 05:09 AM, Todd Gamblin wrote: On Jun 22, 2011, at 3:46 PM, Michael Hertling wrote: Wouldn't a simple CC=gcc -std=c99 cmake path/to/source for the initial configuration be an appropriate solution? I would say no, because whether or not the project is written in C99

Re: [CMake] Passing a CMake list as is to a custom target

2011-06-22 Thread Michael Hertling
On 06/22/2011 09:14 PM, Hauke Heibel wrote: Hi, My CMake version is 2.8.3 and I am trying to run a CMake script as a custom target via add_custom_target(RunFooTarget ALL COMMAND ${CMAKE_COMMAND} -DMY_VARIABLE=${ARGUMENTS} -P Foo.cmake VERBATIM ) where ${ARGUMENTS} is a

Re: [CMake] Passing a CMake list as is to a custom target

2011-06-22 Thread Michael Hertling
On 06/22/2011 10:32 PM, David Cole wrote: On Wed, Jun 22, 2011 at 4:24 PM, Hauke Heibel hauke.hei...@googlemail.comwrote: On Wed, Jun 22, 2011 at 10:09 PM, Michael Hertling mhertl...@online.de wrote: You might use -DMY_VARIABLE=${ARGUMENTS} without VERBATIM, and SEPARATE_ARGUMENTS

Re: [CMake] Output directory in Visual C++

2011-06-22 Thread Michael Hertling
On 06/22/2011 08:00 PM, Mathias Bavay wrote: Hi! In my tries to properly compile a library with Visual C++ 10 Express, I've noticed that despite setting LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib in SET_TARGET_PROPERTIES (which works perfectly fine with gcc on Linux and Xcode on

Re: [CMake] Enabling C99 in CMake

2011-06-22 Thread Michael Hertling
On 06/22/2011 09:32 PM, Todd Gamblin wrote: Is there a good cross-platform way to enable C99 in a CMake project right now? You can obviously do this: set(CMAKE_C_FLAGS -std=c99) However, that's the GNU way to enable C99, and other compilers do it differently. It would be nice if

Re: [CMake] Problem finding installed library on Windows platform

2011-06-20 Thread Michael Hertling
On 06/20/2011 02:49 PM, Stephen Torri wrote: Subject: Finding libraries on Windows platform I am using CMake 2.8 on Windows XP to create a Visual Studio 2010 solution. The problem I am having is that I cannot get CMake to find libraries on the system. These libraries were created

Re: [CMake] How to set a preprocessor define for all build configurations except one ?

2011-06-18 Thread Michael Hertling
On 06/16/2011 11:44 PM, Glenn Coombs wrote: On 16 June 2011 15:45, Michael Hertling mhertl...@online.de wrote: IMO, the default should not need to be explicitly enabled but the exception, and readability - though important - is subordinate to functionality, but probably, this is a matter

Re: [CMake] How to set a preprocessor define for all build configurations except one ?

2011-06-16 Thread Michael Hertling
On 06/16/2011 03:18 PM, Glenn Coombs wrote: On 13 June 2011 02:53, Michael Hertling mhertl...@online.de wrote: AFAIK, there's no other approach to take account of single- and multi- config generators at the same time for this purpose, but perhaps, you could design the loop a bit smarter

Re: [CMake] Examples creating exported Makefiles and correct library link order

2011-06-15 Thread Michael Hertling
On 06/15/2011 12:56 AM, Lori Pritchett-Sheats wrote: My project needs to create and install a Makefile that other client projects could import to link against our project. T I have a simple template file that generates an exported Makefile using the configure_file command, however I'm

Re: [CMake] unexpected INSTALL problems

2011-06-15 Thread Michael Hertling
On 06/15/2011 01:58 PM, Dominik Szczerba wrote: I am trying to copy all libboost* stuff from /usr/lib to CMAKE_INSTALL_PREFIX just as most users would guess: INSTALL(DIRECTORY ${BOOST_RUNTIME_DIR}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin FILES_MATCHING ...) Whatever I specify for

Re: [CMake] unexpected INSTALL problems

2011-06-15 Thread Michael Hertling
On 06/15/2011 11:43 PM, Dominik Szczerba wrote: This behavior is really strange and I tested it in the last 10 minutes. CMake says: boost libs: /usr/lib/libboost_system-mt.so Compiling and linking with verbose reveals the link command: /usr/bin/c++ CMakeFiles/test.dir/test.cpp.o -o

Re: [CMake] unexpected INSTALL problems

2011-06-15 Thread Michael Hertling
On 06/15/2011 09:52 PM, Dominik Szczerba wrote: The FILES_MATCHING option of INSTALL(DIRECTORY ...) applies to files only, i.e. with the above-noted line and BOOST_RUNTIME_DIR==/usr/lib, you'll get the *whole* directory structure under /usr/lib including symlinks to directories, but only files

Re: [CMake] Post-process compiler output

2011-06-14 Thread Michael Hertling
On 06/14/2011 11:46 AM, Michael Wild wrote: On 06/14/2011 11:36 AM, Sebastian Schaetz wrote: Hi, I'm using CMake to generate makefiles to build my C++ projects with g++. When developing code I find it useful to post-process g++ output. In particular I like to feed the output through

Re: [CMake] Managed C++/CLI, default build flags and configurations

2011-06-12 Thread Michael Hertling
On 06/07/2011 07:29 PM, David Hunter wrote: Hi, I have a number of projects which contain mostly sub-directories with standard C++. I currently build all this stuff on Linux and Windows and everything is great. However I have a couple of directories in these projects which contain managed

Re: [CMake] (no subject)

2011-06-12 Thread Michael Hertling
On 06/06/2011 10:32 PM, dfurt...@cox.net wrote: Does CMake provide a way to get the list of objects going into a given target? I need such a list for a PRE_LINK custom command. With the Makefile generators, you might use the RULE_LAUNCH_COMPILE target property combined with a shell script to

Re: [CMake] installing without building the whole project

2011-06-09 Thread Michael Hertling
On 06/09/2011 03:34 PM, Dominik Szczerba wrote: Hi, I have a big project with several subfolders. In one subfolder's cmake file I have e.g. INSTALL(TARGETS test DESTINATION ${CMAKE_INSTALL_PREFIX} CONFIGURATIONS RELEASE) Now when I call make install on linux or build INSTALL project

Re: [CMake] strange rpath with lotf of :-s

2011-06-09 Thread Michael Hertling
On 06/09/2011 01:08 PM, Rolf Eike Beer wrote: Hi, I see strange rpath in binaries inside the build tree, linked in such a way that these can run from the build tree. In some cases the rpath list contains a fairly large amount of :-s, sometimes only one at the end. Already one colon is

Re: [CMake] library path stripping

2011-06-09 Thread Michael Hertling
On 06/09/2011 08:18 AM, Andreas Naumann wrote: Am 09.06.2011 07:35, schrieb Michael Hertling: On 06/09/2011 07:13 AM, Andreas Naumann wrote: Am 08.06.2011 20:43, schrieb Andreas Pakulat: On 08.06.11 20:00:54, Andreas Naumann wrote: Am 08.06.2011 15:02, schrieb Eric

Re: [CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-09 Thread Michael Hertling
On 06/08/2011 07:26 AM, Campbell Barton wrote: There were some system headers giving warnings compiling on linux, since I like to have warnings as errors, and not edit system headers, I used: include_directories(SYSTEM dir1 dir2 ...) ... for system directories only. However this does not

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-08 Thread Michael Hertling
On 06/07/2011 02:20 PM, Bjørn Forsman wrote: Hi all, As far as I can tell, all Qt programs built with CMake must include QT_USE_FILE after find_package(). So why doesn't FindQt4.cmake simply include QT_USE_FILE itself? Is there maybe a use case where QT_USE_FILE is *not* wanted? Yes, there

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-08 Thread Michael Hertling
On 06/07/2011 06:58 PM, Michael Wild wrote: On 06/07/2011 06:23 PM, Bjørn Forsman wrote: 2011/6/7 Michael Wild them...@gmail.com: On 06/07/2011 03:38 PM, Bjørn Forsman wrote: Why not put find_package(Qt4) in the sub directories where it is actually used? And if it is used in multiple

Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?

2011-06-08 Thread Michael Hertling
On 06/07/2011 09:13 PM, Bjørn Forsman wrote: 2011/6/7 Michael Wild them...@gmail.com: If the FindXXX.cmake file called add_definitions(), include_directories() et al., that could be potentially harmful. Some sources might required that some define is not set, or a wrong header file might be

Re: [CMake] library path stripping

2011-06-08 Thread Michael Hertling
On 06/09/2011 07:13 AM, Andreas Naumann wrote: Am 08.06.2011 20:43, schrieb Andreas Pakulat: On 08.06.11 20:00:54, Andreas Naumann wrote: Am 08.06.2011 15:02, schrieb Eric Noulard: 2011/6/8 Andreas Naumannandreas-naum...@gmx.net: Am 08.06.2011 11:56, schrieb Eric Noulard:

Re: [CMake] Parallel build test problem

2011-05-31 Thread Michael Hertling
On 05/30/2011 09:30 AM, Marcel Loose wrote: Look at the following project for an example: #

Re: [CMake] using INSTALL(CODE ... for multiple configurations.

2011-05-30 Thread Michael Hertling
On 05/30/2011 12:54 PM, Campbell Barton wrote: On Mon, May 30, 2011 at 1:55 AM, Michael Hertling mhertl...@online.de wrote: On 05/30/2011 02:58 AM, Campbell Barton wrote: Checking if this is possible since its quite verbose to have the same command 4 times, one for each configuration

Re: [CMake] using INSTALL(CODE ... for multiple configurations.

2011-05-29 Thread Michael Hertling
On 05/30/2011 02:58 AM, Campbell Barton wrote: Checking if this is possible since its quite verbose to have the same command 4 times, one for each configuration. For blender3d on windows we need to extract python into the install dir since we bundle it. This command looks like this: ---

Re: [CMake] Cannot find source file: *.rc

2011-05-27 Thread Michael Hertling
On 05/27/2011 11:46 AM, Michael Wild wrote: On 05/26/2011 06:45 PM, aaron_wri...@selinc.com wrote: From: Michael Wild them...@gmail.com To: cmake@cmake.org Date: 05/25/2011 10:08 PM Subject: Re: [CMake] Cannot find source file: *.rc Sent by: cmake-boun...@cmake.org On 05/25/2011 11:40 PM,

Re: [CMake] INSTALL with RENAME

2011-05-27 Thread Michael Hertling
On 05/26/2011 09:42 PM, J Decker wrote: It's a windows XP target, so symlinks aren't doable... On Thu, May 26, 2011 at 12:12 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Thursday 26 May 2011, J Decker wrote: How do I install a single target as multiple names? (for something like

Re: [CMake] Parallel build test problem

2011-05-24 Thread Michael Hertling
On 05/23/2011 01:39 PM, Marcel Loose wrote: On Mon, 2011-05-23 at 07:21 -0400, David Cole wrote: On Mon, May 23, 2011 at 4:13 AM, Marcel Loose lo...@astron.nl wrote: Hi all, A colleague of mine reported a bug in our CMake-base build system when doing

Re: [CMake] Newbie question: Static linking

2011-05-23 Thread Michael Hertling
On 05/23/2011 05:09 PM, Sanatan Rai wrote: On 23 May 2011 16:00, Michael Wild them...@gmail.com wrote: Everything that relies on static/global initialization to register factories is an implicit scheme. An explicit scheme is where the dependent code (e.g. the main() function) calls a function

Re: [CMake] Newbie question: Static linking

2011-05-23 Thread Michael Hertling
On 05/23/2011 08:42 PM, Sanatan Rai wrote: On 23 May 2011 17:46, Michael Hertling mhertl...@online.de wrote: In summary, this whole issue is not related to C++ or even to CMake, but to the manner static libraries are handled: The linker - at least the GNU one - picks out entire object files

Re: [CMake] piping commands to executable

2011-05-20 Thread Michael Hertling
On 05/18/2011 07:46 PM, Yngve Inntjore Levinsen wrote: Dear developers, I have a bit of an issue with ctest. In our project we usually generate a binary which we pipe in scripts with the commands we want to execute (some defined parser language). Now at first I would have liked to do

Re: [CMake] Forcing CMake to never search install path

2011-05-20 Thread Michael Hertling
but complete example which demonstrates these variables' failure? Possibly, it might be considered as a bug. Regards, Michael On Thu, May 19, 2011 at 7:47 AM, Michael Hertling mhertl...@online.de wrote: Have you already tried the CMAKE_[SYSTEM_]IGNORE_PATH variables? At the first glance

Re: [CMake] Changing installation prefix triggers re-linking of all libraries

2011-05-20 Thread Michael Hertling
On 05/10/2011 11:24 AM, Pere Mato Vila wrote: To my regret, I don't see any easy solution for your concern, but if the unnecessary rebuilds due to the the RPATH placeholder mechanism are a serious issue in your project, the above-noted approach can possibly be adapted to your needs. 'hope

Re: [CMake] Fortran issue

2011-05-19 Thread Michael Hertling
On 05/19/2011 08:14 AM, AMARNATH, Balachandar wrote: Hi, I am trying to build MPF package in windows using intel compilers and i end up with the following error. ***Check for working Fortran compiler using: Visual Studio 10 Check for working C compiler

Re: [CMake] Excluding definitions for source files

2011-05-19 Thread Michael Hertling
On 05/19/2011 08:18 AM, Robert Bielik wrote: Robert Bielik skrev 2011-05-19 07:57: I have a problem where I need to be able to select Unicode build or not, but at the same time 3 files of my project MUST NOT have Unicode enabled. Is there a way to remove compile definitions for certain

Re: [CMake] --start-group, --end-group

2011-05-19 Thread Michael Hertling
On 05/19/2011 11:11 AM, Anton Sibilev wrote: Hello! I'm wondering how I can use --start-group archives --end-group linker flags with Unix Makefiles. May be somebody know the right way? You might specify these flags immediately in TARGET_LINK_LIBRARIES(): CMAKE_MINIMUM_REQUIRED(VERSION 2.8

Re: [CMake] Forcing CMake to never search install path

2011-05-19 Thread Michael Hertling
On 05/16/2011 10:08 PM, Clifford Yapp wrote: On Mon, May 16, 2011 at 4:00 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: So you basically want an opposite to HINTS and PATHS, like e.g. EXCLUDE ? Doesn't sound too bad. Yes, that would work - ideally though I'd like to EXCLUDE the

Re: [CMake] Touching files on cache var changes

2011-05-18 Thread Michael Hertling
On 05/17/2011 07:46 PM, David Cole wrote: On Tue, May 17, 2011 at 1:30 PM, Michael Hertling mhertl...@online.dewrote: On 05/17/2011 05:45 PM, Robert Bielik wrote: Hi all, I'm wondering if there's a way to touch files on cached var changes. Let's say I have an option to enable or disable

Re: [CMake] make VERBOSE=1

2011-05-18 Thread Michael Hertling
On 05/17/2011 05:00 PM, gekso wrote: Hi David, try to set ( CMAKE_VERBOSE_MAKEFILE true ) AFAIK, this just means verbose output enabled by default. 2011/5/17 David Aldrich david.aldr...@emea.nec.com: Hi I would like to see the exact g++ commands that are invoked by a makefile generated by

Re: [CMake] Touching files on cache var changes

2011-05-17 Thread Michael Hertling
On 05/17/2011 05:45 PM, Robert Bielik wrote: Hi all, I'm wondering if there's a way to touch files on cached var changes. Let's say I have an option to enable or disable a feature in my application, and depending on its setting a preprocessor macro is defined (or not defined) in the

Re: [CMake] Trying to set up a superbuild with external project and install it...

2011-05-16 Thread Michael Hertling
On 05/15/2011 05:42 PM, Alexander Neundorf wrote: On Sunday 15 May 2011, Michael Hertling wrote: On 05/14/2011 07:57 PM, Alexander Neundorf wrote: ... Indeed, RPATH-related dependencies among the intermediately installed subprojects are malicious. In order to solve the problem you outlined

Re: [CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-16 Thread Michael Hertling
On 05/13/2011 08:36 AM, Heine, Christian (EXTERN: VWGEDS) wrote: I've followed your instructions, removed the obsolete lines but no effect, the libbrOpenGL.dll which is located at ./lib is still missing on startup ... The br* stuff are my dependencies library which I've created and

Re: [CMake] Trying to set up a superbuild with external project and install it...

2011-05-15 Thread Michael Hertling
On 05/14/2011 07:57 PM, Alexander Neundorf wrote: On Thursday 12 May 2011, Michael Hertling wrote: On 05/11/2011 09:07 PM, Alexander Neundorf wrote: Hi, I'd like to set up a kind of meta super project, which builds a bunch of subprojects, which contains executable and shared libraries

Re: [CMake] Problem with pkg_check_modules and imlib2

2011-05-13 Thread Michael Hertling
On 05/12/2011 10:40 PM, David Demelier wrote: Hello, I have some trouble to link my project to the imlib2 library. The library is installed correctly and a command like : gcc test.c -o test `pkg-config --libs --cflags imlib2` works and link to imlib2. I have this CMakeLists.txt

Re: [CMake] Trying to set up a superbuild with external project and install it...

2011-05-11 Thread Michael Hertling
On 05/11/2011 09:07 PM, Alexander Neundorf wrote: Hi, I'd like to set up a kind of meta super project, which builds a bunch of subprojects, which contains executable and shared libraries. These subprojects come from different repositories, mostly git repositories. AFAIK I can basically

Re: [CMake] CMake thinks Fortran is C++ when linking statically

2011-05-10 Thread Michael Hertling
On 05/10/2011 12:19 PM, Erlend Pedersen wrote: I am having problems with Fortran linking that doesn't work when building static libraries, only when building shared libraries. I am using cmake from Ubuntu 10.04 (2.8.0-5ubuntu1). I use CMake to build a project, including project-internal

Re: [CMake] Put bin|lib folders under Debug|Release folders

2011-05-10 Thread Michael Hertling
On 05/08/2011 07:35 AM, Bo Zhou wrote: Hello all, I am dealing with a problem about the output path. At present I just do like this, set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) And in fact the full path

Re: [CMake] ProjectConfig.cmake files with both dynamic and static libraries?

2011-05-05 Thread Michael Hertling
On 05/04/2011 02:30 PM, Ben Morgan wrote: Hi, I've been working on adding ProjectConfig.cmake support to my CMake based projects, and just had a quick question regarding 'best practice' in writing these when the project builds both dynamic and (optionally) static libraries, with clients of

Re: [CMake] How to add a target link library, but only for a custom configuration ?

2011-05-05 Thread Michael Hertling
${PTHREADS_LIBRARIES}) TARGET_LINK_LIBRARIES(myLib pthreads) and that's it. Perhaps, this would be worth a feature request. Regards, Michael On 26 April 2011 15:15, Michael Hertling mhertl...@online.de wrote: There is a possibility with an intermediate empty static library which gets reimported

Re: [CMake] adding a 'make altinstall' to cmake?

2011-05-04 Thread Michael Hertling
On 05/04/2011 11:51 AM, Rolf Eike Beer wrote: hi michael, thanks for the tip, this makes a lot of sense. unfortunately, the following does not work: add_custom_command(TARGET libopenrave POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink $TARGET_FILE_NAME:libopenrave0.3

Re: [CMake] Changing installation prefix triggers re-linking of all libraries

2011-05-03 Thread Michael Hertling
On 05/03/2011 11:17 AM, Pere Mato Vila wrote: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(PREFIX C) SET(CMAKE_VERBOSE_MAKEFILE ON) ADD_LIBRARY(f SHARED f.c) INSTALL(TARGETS f RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) with

Re: [CMake] Changing installation prefix triggers re-linking of all libraries

2011-05-02 Thread Michael Hertling
On 04/29/2011 03:39 PM, Pere Mato Vila wrote: Perhaps somebody can give me some hints on this problem I have. I build a project and install it in path/install with make install. Then I do change the installation prefix with cmake -DCMAKE_INSTALL_PREFIX=path/install2 ../root_cmake/ and if

Re: [CMake] how to build a target after installing dependencies?

2011-05-02 Thread Michael Hertling
On 05/02/2011 07:05 PM, hurcan solter wrote: Hi all I have a project that depends on some contrib libraries (SDL png etc..). If I can't find the dependencies through FindXXX macros I build them myself (wrote CMakeLists for dependencies) and link to the project, also setting the include

Re: [CMake] Triggering individual steps of externalproject_add add cmake time

2011-05-02 Thread Michael Hertling
On 04/29/2011 11:52 AM, Jan Wurster wrote: Hi David, thanks for your help and suggestions! From: David Cole [mailto:david.c...@kitware.com] Sent: Donnerstag, 28. April 2011 19:57 Subject: Re: [CMake] Triggering individual steps of externalproject_add add cmake time I would strongly

Re: [CMake] Generated Source Files

2011-05-01 Thread Michael Hertling
On 05/01/2011 11:16 AM, Toralf Niebuhr wrote: Hi. I've got the following problem: I've got a CMake Project with the following directory structure: project/src project/include project/resources In the directory project/resources/ is a file res.gen. I have a command that generates

Re: [CMake] Error out on installation when there is already an installation

2011-04-28 Thread Michael Hertling
On 04/28/2011 01:51 PM, John R. Cary wrote: This is in reference to iter.cary$ cmake --version cmake version 2.8.3 iter.cary$ uname -a Linux iter.txcorp.com 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27 17:27:08 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux We have a situation where a package

Re: [CMake] SuperBuild whoes

2011-04-27 Thread Michael Hertling
On 04/26/2011 03:19 PM, Michael Wild wrote: On 04/26/2011 02:48 PM, Michael Hertling wrote: On 04/25/2011 05:15 PM, Michael Wild wrote: On 04/25/2011 04:51 PM, Michael Hertling wrote: [...] [...] The only thing that required some thinking was writing a relocatable XXXConfig.cmake file. I

Re: [CMake] SuperBuild whoes

2011-04-26 Thread Michael Hertling
On 04/25/2011 05:15 PM, Michael Wild wrote: On 04/25/2011 04:51 PM, Michael Hertling wrote: [...] I also solved my installation problem. By having all sub-projects install into a common prefix, and thanks to the wonders of RPATH and install_name which can handle relative paths and thanks

Re: [CMake] How to define datafiles?

2011-04-26 Thread Michael Hertling
On 04/26/2011 06:20 AM, Michael Wild wrote: On 04/25/2011 05:03 PM, Michael Hertling wrote: On 04/25/2011 01:53 PM, Michael Wild wrote: On 04/25/2011 12:48 PM, Michael Hertling wrote: On 04/24/2011 04:56 PM, Campbell Barton wrote: 2011/4/23 YangXi jianding...@msn.com: In my program, I have

Re: [CMake] How to add a target link library, but only for a custom configuration ?

2011-04-26 Thread Michael Hertling
On 04/26/2011 03:40 PM, Glenn Coombs wrote: I am using cmake 2.8.2 and I have added a custom configuration to my project like this: # Add configuration for debug pthreads builds based on the debug configuration #

Re: [CMake] How to define datafiles?

2011-04-25 Thread Michael Hertling
On 04/24/2011 04:56 PM, Campbell Barton wrote: 2011/4/23 YangXi jianding...@msn.com: In my program, I have several pictures and plain-text data files. Usually in a unix system, they should be placed on /usr/share/my_program/some_place. How could I define those files in CMakeLists, and make

Re: [CMake] SuperBuild whoes

2011-04-25 Thread Michael Hertling
On 04/21/2011 03:44 PM, Michael Wild wrote: On 04/21/2011 02:45 PM, David Cole wrote: On Thu, Apr 21, 2011 at 4:30 AM, Michael Wild them...@gmail.com mailto:them...@gmail.com wrote: On 04/21/2011 06:48 AM, Michael Wild wrote: Hi all I'm trying to set up a SuperBuild

Re: [CMake] How to define datafiles?

2011-04-25 Thread Michael Hertling
On 04/25/2011 01:53 PM, Michael Wild wrote: On 04/25/2011 12:48 PM, Michael Hertling wrote: On 04/24/2011 04:56 PM, Campbell Barton wrote: 2011/4/23 YangXi jianding...@msn.com: In my program, I have several pictures and plain-text data files. Usually in a unix system, they should be placed

Re: [CMake] Selecting INSTALL target in Visual Studio Configuration by default

2011-04-24 Thread Michael Hertling
On 04/24/2011 04:06 PM, Paul Baumer wrote: Thanks for your help. I have just tried this. But there is a cyclic dependency issue. install_after_all calls install which depends on ALL_BUILD and tries to build install_after_all. Possible solutions: a. break the install - ALL_BUILD

Re: [CMake] adding a 'make altinstall' to cmake?

2011-04-24 Thread Michael Hertling
On 04/24/2011 08:35 AM, Rosen Diankov wrote: Hi all, We would like to add a 'make altinstall' option similar to python's altinstall so that it doesn't install symlinks that clobber the system install's symlinks for our program. Basically, a normal install does: program0.3 program -

Re: [CMake] Post-Build commands on custom targets are always executed?

2011-04-20 Thread Michael Hertling
On 04/20/2011 08:16 AM, Oliver Buchtala wrote: Am 19.04.2011 16:10, schrieb David Cole: On Mon, Apr 18, 2011 at 11:22 PM, Michael Hertling mhertl...@online.de mailto:mhertl...@online.de wrote: On 04/19/2011 02:17 AM, Oliver Buchtala wrote: Am 18.04.2011 06:58, schrieb Michael

Re: [CMake] Use of ADD_CUSTOM_COMMAND

2011-04-20 Thread Michael Hertling
On 04/20/2011 05:40 AM, Fraser Hutchison wrote: Hi Gib, Try the following: GET_TARGET_PROPERTY(FUBAR_EXE fubar LOCATION) ADD_CUSTOM_COMMAND(TARGET fubar POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FUBAR_EXE} somepath) Cheers, Fraser. Don't use the obsolete LOCATION property

Re: [CMake] Use of ADD_CUSTOM_COMMAND

2011-04-20 Thread Michael Hertling
On 04/20/2011 11:56 PM, Gib Bogle wrote: Quoting Michael Hertling mhertl...@online.de: On 04/20/2011 05:40 AM, Fraser Hutchison wrote: Hi Gib, Try the following: GET_TARGET_PROPERTY(FUBAR_EXE fubar LOCATION) ADD_CUSTOM_COMMAND(TARGET fubar POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy

Re: [CMake] Post-Build commands on custom targets are always executed?

2011-04-18 Thread Michael Hertling
On 04/19/2011 02:17 AM, Oliver Buchtala wrote: Am 18.04.2011 06:58, schrieb Michael Hertling: On 04/16/2011 12:05 AM, Oliver Buchtala wrote: Am 15.04.2011 23:48, schrieb Michael Hertling: On 04/15/2011 11:22 PM, Oliver Buchtala wrote: Hi, I observe that a custom command attached to a custom

Re: [CMake] add_definition??

2011-04-17 Thread Michael Hertling
On 04/14/2011 06:56 AM, Michael Wild wrote: On 04/13/2011 11:50 PM, klaas.holwerda wrote: Hi, I use ADD_DEFINITIONS( ${wxWidgets_DEFINITIONS} ) to add flags for compilation like this: set( wxWidgets_CXX_FLAGS ${wxWidgets_CXX_FLAGS} -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__

Re: [CMake] Post-Build commands on custom targets are always executed?

2011-04-17 Thread Michael Hertling
On 04/16/2011 12:05 AM, Oliver Buchtala wrote: Am 15.04.2011 23:48, schrieb Michael Hertling: On 04/15/2011 11:22 PM, Oliver Buchtala wrote: Hi, I observe that a custom command attached to a custom target as POST-BUILD is launched on every build. Is that true? or is it a misconfiguration

Re: [CMake] Post-Build commands on custom targets are always executed?

2011-04-15 Thread Michael Hertling
On 04/15/2011 11:22 PM, Oliver Buchtala wrote: Hi, I observe that a custom command attached to a custom target as POST-BUILD is launched on every build. Is that true? or is it a misconfiguration on my side? Bye, Oliver A custom target is always out of date, i.e. it is always rebuilt

Re: [CMake] Executing processes as part of a COMMAND option in add_custom_command

2011-04-14 Thread Michael Hertling
On 04/14/2011 12:44 PM, J.S. van Bethlehem wrote: Dear users, As a new user CMake I've come across some things I don't fully understand yet. Here is such a thing: when I build documentation, I want to run some files from a 'demo' subdirectory and create output - suppose the (binary) file

Re: [CMake] Finding dynamic libraries with major interface revision numbers (2)

2011-04-13 Thread Michael Hertling
On 04/13/2011 09:26 PM, Brad King wrote: On 04/13/2011 02:44 PM, Jean-Christophe Fillion-Robin wrote: Is there a solution to find a library having a revision number ? You can specify the actual library file name libgfortran.so.3. AFAIK, this is not sufficient because FIND_LIBRARY() only

Re: [CMake] embedded path in shared library linked into another shared library

2011-04-13 Thread Michael Hertling
On 04/13/2011 08:52 PM, Alexander Neundorf wrote: On Tuesday 12 April 2011, Michael Hertling wrote: On 04/11/2011 11:10 PM, David Aiken wrote: That didn't work for me.. I've got it simplified down to: SET(CMAKE_SKIP_RPATH TRUE) and in the CMakeCache.txt I see: CMAKE_SKIP_RPATH:BOOL

Re: [CMake] DESTDIR behaviour with different variable name

2011-04-13 Thread Michael Hertling
On 04/12/2011 04:36 PM, Tomasz Grobelny wrote: On Tue, 12 Apr 2011 03:44:04 +0200, Michael Hertling mhertl...@online.de wrote: On 04/11/2011 10:42 PM, Tomasz Grobelny wrote: On Monday 11 April 2011 21:55:48 Alexander Neundorf wrote: On Monday 11 April 2011, Tomasz Grobelny wrote: On Mon, 11

Re: [CMake] DESTDIR behaviour with different variable name

2011-04-11 Thread Michael Hertling
On 04/11/2011 10:42 PM, Tomasz Grobelny wrote: On Monday 11 April 2011 21:55:48 Alexander Neundorf wrote: On Monday 11 April 2011, Tomasz Grobelny wrote: On Mon, 11 Apr 2011 09:01:09 -0700, Tyler ty...@cryptio.net wrote: On Mon, Apr 11, 2011 at 8:54 AM, Tomasz Grobelny

Re: [CMake] embedded path in shared library linked into another shared library

2011-04-11 Thread Michael Hertling
On 04/11/2011 11:10 PM, David Aiken wrote: That didn't work for me.. I've got it simplified down to: SET(CMAKE_SKIP_RPATH TRUE) and in the CMakeCache.txt I see: CMAKE_SKIP_RPATH:BOOL=NO That's not surprising as your SET() command doesn't write to the cache. It's the CMAKE_SKIP_RPATH

Re: [CMake] Target visibility in CMake using Xcode generator

2011-04-10 Thread Michael Hertling
On 04/09/2011 06:32 PM, Manuel Holtgrewe wrote: There're two spots in your A/CMakeLists.txt catching my eye, although I doubt that they are actually causing the difficulties you report on: 1) The DEPENDS clause of ADD_CUSTOM_TARGET() is meant for file-level dependencies only, i.e. you

Re: [CMake] Target visibility in CMake using Xcode generator

2011-04-09 Thread Michael Hertling
On 04/09/2011 01:43 PM, Manuel Holtgrewe wrote: Dear all, I have an issue with the Xcode generator and the visibility of targets in the generated project files. The problem is that in the project files generated in subdirectories, targets from the directories above are not visible.

Re: [CMake] Building CLR project OR removing COMPILE_FLAGS

2011-04-07 Thread Michael Hertling
On 04/07/2011 02:33 PM, Neil MacMullen wrote: I'm a newcomer to cmake so if I'm missing something obvious please point it out. Having said that, despite reading the online documentation and doing a fair amount of googling I haven't found a solution. Specific Questions

Re: [CMake] link static libraries to a share library

2011-04-07 Thread Michael Hertling
On 04/07/2011 07:37 PM, Jiang Xu wrote: Hi All, I am new to cmake, but I really like it after looking into it. I am in the process to make some changes to our current make file system. I wonder how can I archieve the following goal using cmake: 1. The root directory is features/ 2.

Re: [CMake] Dependencies scanning for non-c/c++ files

2011-04-05 Thread Michael Hertling
On 04/03/2011 02:25 AM, aaron_wri...@selinc.com wrote: I have some m4 files in my build that include other m4 files, so there's a dependency between m4 files that can change at any time. I can calculate the dependency at configure time, but what can I do when the files change and I need to

Re: [CMake] CMake and include only libraries

2011-04-04 Thread Michael Hertling
On 04/04/2011 07:30 PM, Theodore Papadopoulo wrote: Hi, I'm trying to use cmake to install a include only library. I'd like to use the export feature as described in http://www.itk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file and I found the idea of using

Re: [CMake] Exclude source files from build for a specific configuration with Visual Studio

2011-04-03 Thread Michael Hertling
On 04/01/2011 03:02 PM, Gaylord Charles wrote: Hello, I am migrating a project from Visual Studio 8 to CMake and I look for a way to exclude files from build for a defined configuration. I think the HEADER_FILE_ONLY source file property can suit my needs and it would be great to have a

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-04-03 Thread Michael Hertling
On 04/02/2011 10:52 AM, Rolf Eike Beer wrote: Am Donnerstag, 31. März 2011, 15:26:31 schrieb Brad King: On 03/31/2011 09:14 AM, Rolf Eike Beer wrote: See below. Looks like the only way to prevent this is to set LINK_INTERFACE_LIBRARIES to empty for every lib that uses the static lib. Which

Re: [CMake] Extra options for strip?

2011-04-01 Thread Michael Hertling
On 03/28/2011 03:08 PM, Hariharan wrote: I'm trying to build a stripped target using install/strip with the function and line information retained. I need to pass the --strip-debug and --keep-file-symbols to the system strip binary because the default is to strip all symbols. Is there any way

Re: [CMake] Replacing compiler flags for certain project subdirectories

2011-03-31 Thread Michael Hertling
On 03/30/2011 08:00 PM, Whitcomb, Mr. Tim wrote: Shortening to reduce wall-of-text: I have a Fortran project with a top-level CMakeLists.txt file with 47 add_subdirectory calls. Three of the subdirectories require a different set of preprocessor definitions and compiler flags than the

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-30 Thread Michael Hertling
On 03/29/2011 11:36 PM, Rolf Eike Beer wrote: Am Dienstag, 29. März 2011, 09:41:36 schrieb Brad King: On 03/29/2011 05:19 AM, Rolf Eike Beer wrote: The basic idea is: any symbols from those private libraries are, well, private. The user only ever sees the symbols from the public library. In

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-30 Thread Michael Hertling
On 03/25/2011 03:36 PM, David Doria wrote: Could you post the output of make VERBOSE=1? On *nix, the following CMakeLists.txt works as expected: The output of make VERBOSE=1 contains: .../c++ -DUNIX -o .../SetTargetProperties.cxx.o -c .../SetTargetProperties.cxx It is working properly

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-30 Thread Michael Hertling
On 03/30/2011 02:02 PM, Rolf Eike Beer wrote: However, I still don't understand the relation of that transitive linking and its avoidance, respectively, to your initial complaint about CMake's error message due to the missing library in another library's export set. Unless I'm mistaken,

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-30 Thread Michael Hertling
On 03/30/2011 03:14 PM, Rolf Eike Beer wrote: On 03/30/2011 02:02 PM, Rolf Eike Beer wrote: However, I still don't understand the relation of that transitive linking and its avoidance, respectively, to your initial complaint about CMake's error message due to the missing library in another

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-29 Thread Michael Hertling
On 03/28/2011 02:51 PM, Rolf Eike Beer wrote: I try to do an INSTALL(EXPORT) to allow others to link against one of my libraries. That libraries is linked against some other internal libraries the target's don't need to link to as everything in them is purely internal. I tried something

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread Michael Hertling
On 03/29/2011 04:14 PM, David Doria wrote: Most likely coming from here: /home/doriad/src/CMake/Modules/UsewxWidgets.cmake(72): SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS} ) I added: message(CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}) and the output is: CMAKE_CXX_FLAGS:

<    1   2   3   4   5   6   7   8   >