Re: [CMake] Code and API review request for Qt5 CMake files

2012-03-13 Thread Michael Hertling
On 03/05/2012 01:35 AM, Stephen Kelly wrote: > Michael Hertling wrote: > >> Suppose the Qt folks decide that Qt5's core module doesn't need to >> be explicitly requested because it is prerequisite for everything >> else. > > Just to disseminate in

Re: [CMake] Code and API review request for Qt5 CMake files

2012-03-13 Thread Michael Hertling
On 03/10/2012 02:25 PM, Alexander Neundorf wrote: > On Friday 09 March 2012, Michael Hertling wrote: >> On 03/05/2012 02:04 AM, Stephen Kelly wrote: > ... >>> I don't actually see the problem with checking Qt5_XYZ_FOUND. Unset >>> variables are well defined as

Re: [CMake] Using cmake to build & link to autotools based project

2012-03-13 Thread Michael Hertling
On 03/13/2012 10:10 AM, Kurien Mathew wrote: > Hello, > > I have a solution (collection of projects) that is built using cmake. In this > solution some projects depend on 3rd party projects that use gnu autotools. I > would like to build and link to these autotools based projects from the cmake

Re: [CMake] CMake Linking Error

2012-03-12 Thread Michael Hertling
On 03/08/2012 05:40 PM, buzz clay wrote: > Hi, > > I have not been able to find the answer to my current problem so I thought > I'd try a new post. Before diving into the details, please be aware that > the code I am writing compiles/runs perfectly with a personal Makefile I > wrote. > > My code

Re: [CMake] Operator Precedence

2012-03-12 Thread Michael Hertling
On 03/12/2012 07:32 PM, Robert Dailey wrote: > What is the precedence for logical operators (specifically in IF > conditions)? > > Consider: STREQUAL, AND, OR (plus any others) Documentation of IF(): "...there is a traditional order of precedence. Parenthetical expressions are evaluated first fo

Re: [CMake] top level make

2012-03-11 Thread Michael Hertling
On 03/11/2012 10:27 PM, Totte Karlsson wrote: > Hi, > My project depends on several third party libraries, e.g. vtk. I wonder, if > it > is possible to setup using CMake so that when building my project, necessary > third party libs are built as well. > > Or is it advisable to keep it separate?

Re: [CMake] Code and API review request for Qt5 CMake files

2012-03-09 Thread Michael Hertling
On 03/05/2012 02:04 AM, Stephen Kelly wrote: > > Michael Hertling wrote: > >>>> * Currently there is no Qt5Config.cmake. >>>> Such a thing could probably exist and use the FIND_COMPONENTS to find >>>> what was requested. [...] > > Hi there, >

Re: [CMake] Forcibly run 'moc' on Qt files that are NOT part of the build

2012-03-07 Thread Michael Hertling
On 03/07/2012 04:10 PM, Michael Jackson wrote: > In an effort to speed up the build of a project that uses Qt (and moc) I > tried an alternate approach with the moc files. Normally I use the basic idea > of gathering the headers that need to be "moc'ed" and feed those to moc with > this type of

Re: [CMake] transitive linking with separate projects

2012-03-07 Thread Michael Hertling
On 03/07/2012 11:29 AM, Alexander Dahl wrote: > Hello Michael, > > Am 2012-03-06 16:46, schrieb Michael Hertling: >> or possibly better: >> >> # libbar/bar-config.cmake.in: >> FIND_PACKAGE(FOO PATHS @FOO_DIR@ NO_DEFAULT_PATH) > > I used > > FIND_PA

Re: [CMake] transitive linking with separate projects

2012-03-06 Thread Michael Hertling
On 03/06/2012 02:47 PM, Alexander Dahl wrote: > Hei hei, > > we faced a build problem with transitive linking of separate projects > where I can't find the right solution on my own. I hope someone can give > me a hint. I prepared a test case with two libraries libfoo and libbar > and an applicati

Re: [CMake] failing target

2012-03-06 Thread Michael Hertling
On 03/06/2012 02:47 PM, Andrea Crotti wrote: > On 03/06/2012 01:45 PM, Michael Hertling wrote: >> >> Could you post the lines which define those targets psi.utility_install >> and install_all_eggs, or is this quite tricky, too? Do these lines stem >> from the same CM

Re: [CMake] failing target

2012-03-06 Thread Michael Hertling
On 03/06/2012 12:21 PM, Andrea Crotti wrote: > On 03/06/2012 07:23 AM, Michael Hertling wrote: >> On 03/05/2012 05:59 PM, Andrea Crotti wrote: >>> I'm having the following behaviour, and I can't quite understand the >>> error message: >>> >>>

Re: [CMake] POST_BUILD & ALL_BUILD

2012-03-06 Thread Michael Hertling
On 03/06/2012 02:34 AM, Christopher Piekarski wrote: > Hello All, > > I am trying to attach a custom POST_BUILD command to the ALL_BUILD target. > I've tried adding the following at the bottom of my root CMakeLists.txt > file but the Post Event never shows up in Visual Studio. I have been able > t

Re: [CMake] How to make package depend on tests?

2012-03-06 Thread Michael Hertling
On 03/06/2012 12:36 AM, Oliver kfsone Smith wrote: > I have test and package configurations on my project, I want: > > cmake . > make package > > to run force injection of the "test" target prior to building the > package target. > > Can it be done? How? :) By filing a solution to [1

Re: [CMake] failing target

2012-03-05 Thread Michael Hertling
On 03/05/2012 05:59 PM, Andrea Crotti wrote: > I'm having the following behaviour, and I can't quite understand the > error message: > > .. > Built target psi.utility_install > .. > make[3]: *** No rule to make target `psi.utility_install', needed by > `CMakeFiles/install_all_eggs'. Stop. > mak

Re: [CMake] Functions inherit parent variables?

2012-03-05 Thread Michael Hertling
On 03/05/2012 10:43 AM, Johannes Zarl wrote: > On Saturday 03 March 2012, 02:29:05, Robert Dailey wrote: >> Well you're really comparing apples to oranges. C++ nested scoping rules >> really have nothing to do with two separate functions sharing scoped >> variables. It doesn't even really serve as

Re: [CMake] Question regarding source tree structure and how to find libraries easily within that structure

2012-03-05 Thread Michael Hertling
On 03/04/2012 11:01 AM, Andreas Guther wrote: > Hello, > > thanks for the responses. The problem I have is, that we have more than one > application in the directory. So if I put an CMakeLists.txt in the Src > directory I do not have the choice (only by options). I would prefer a > solution whe

Re: [CMake] avoid rebuilding targets depending on generated source files

2012-03-04 Thread Michael Hertling
gt; Sorry. I did not realize that. I use gmail and when I checked my sent > emails, > quoted text appears to be clearly marked. Is the quoted text in this email > marked properly. Yes, it is. Regards, Michael > On Sun, Mar 4, 2012 at 4:05 PM, Michael Hertling wrote: > >> O

Re: [CMake] avoid rebuilding targets depending on generated source files

2012-03-04 Thread Michael Hertling
src". Issuing "make >> X=0" again reveals that the copied files aren't rewritten as it happens >> after "make X=1". Thus, AFAICS, everything works as expected. Could you >> check if the above-noted example also works on your system? >> >>

Re: [CMake] avoid rebuilding targets depending on generated source files

2012-03-04 Thread Michael Hertling
do you determine that they have been copied? Do you check the timestamps? With --full-time? Regards, Michael PS: Does org.antlr.Tool write to the source tree? If so: Don't do that. > On Sat, Mar 3, 2012 at 3:54 PM, Michael Hertling wrote: > >> On 03/04/2012 12:14 AM,

Re: [CMake] Transitive library dependencies with parallel builds

2012-03-03 Thread Michael Hertling
On 02/29/2012 05:35 PM, Number Cruncher wrote: > Do transitive dependencies reduce number of jobs that can be compiled in > parallel? > > If I have two libraries A and B, with an executable C, whose > dependencies are described by: > >add_library(A ${A_SRC}) > >add_library(B ${B_SRC})

Re: [CMake] avoid rebuilding targets depending on generated source files

2012-03-03 Thread Michael Hertling
h a diff. > > Any idea what might be happening here ? Please provide a minimal but complete example for this issue. Regards, Michael > On Sat, Mar 3, 2012 at 2:47 PM, Michael Hertling wrote: > >> On 03/03/2012 10:36 PM, Ajay Panyala wrote: >>> Try "cmake

Re: [CMake] Problems with CMake and static Qt plugins

2012-03-03 Thread Michael Hertling
On 03/02/2012 02:48 PM, NoRulez wrote: > Hello, > > I use Qt 4.8.0 from the QtSDK and Iwant to generate a static qt plugin. > In my main.cpp I have the following: > > > #include > #include > > Q_IMPORT_PLUGIN(Local) > > intmain(intargc,char*argv[]){ > QApplicationapp(argc,argv); > > . >

Re: [CMake] avoid rebuilding targets depending on generated source files

2012-03-03 Thread Michael Hertling
On 03/03/2012 10:36 PM, Ajay Panyala wrote: > Try "cmake -E copy_if_different ..." > > cmake -E copy_if_different build/test1.c build/tests/test1.c > > That would work when make is run atleast once. > When running make for the 1st time test1.c was never > copied to build/tests before. So I would

Re: [CMake] Functions inherit parent variables?

2012-03-02 Thread Michael Hertling
$value = 321; } outer(); outer(); but Perl 6, in turn, is said to do it like Python. We're getting off-topic, I guess. Regards, Michael > On Fri, Mar 2, 2012 at 6:53 PM, Michael Hertling wrote: > >> On 03/01/2012 06:01 PM, Robert Dailey wrote: >>> No, the print statem

Re: [CMake] Functions inherit parent variables?

2012-03-02 Thread Michael Hertling
s a rather bad idea to compare C/C++'s static block scoping with CMake's dynamic function scoping. Sorry about that. Regards, Michael > On Wed, Feb 29, 2012 at 9:54 PM, Michael Hertling wrote: > >> On 03/01/2012 01:38 AM, Robert Dailey wrote: >>> I ran a qui

Re: [CMake] Code and API review request for Qt5 CMake files

2012-03-01 Thread Michael Hertling
On 03/01/2012 10:08 PM, Alexander Neundorf wrote: > On Thursday 01 March 2012, Michael Hertling wrote: >> On 02/28/2012 10:03 PM, Alexander Neundorf wrote: >>> ...will reply later in detail. >>> >>> Could you please go through the existing find-modules

Re: [CMake] Functions inherit parent variables?

2012-02-29 Thread Michael Hertling
On 03/01/2012 01:38 AM, Robert Dailey wrote: > I ran a quick test: > > > function( test ) > message( "SOME_TEST: ${SOME_TEST}" ) > endfunction() > > function( start ) > set( SOME_TEST "HELLO WORLD" ) > test() > endfunction() > > start() > > > Seems like a function has access to the calling sc

Re: [CMake] Code and API review request for Qt5 CMake files

2012-02-29 Thread Michael Hertling
On 02/28/2012 10:03 PM, Alexander Neundorf wrote: > ...will reply later in detail. > > Could you please go through the existing find-modules shipped with cmake > which > support COMPONENTS and make a summary of how they handle them ? > > At least FindQt4.cmake be default searches all components

Re: [CMake] Code and API review request for Qt5 CMake files

2012-02-27 Thread Michael Hertling
On 02/26/2012 11:24 AM, Alexander Neundorf wrote: > On Sunday 26 February 2012, Michael Hertling wrote: >> On 02/25/2012 09:43 AM, Alexander Neundorf wrote: >>> On Friday 24 February 2012, Michael Hertling wrote: >>>> On 02/24/2012 03:34 PM, Stephen Kelly wrote: >

Re: [CMake] Code and API review request for Qt5 CMake files

2012-02-25 Thread Michael Hertling
On 02/25/2012 09:43 AM, Alexander Neundorf wrote: > On Friday 24 February 2012, Michael Hertling wrote: >> On 02/24/2012 03:34 PM, Stephen Kelly wrote: > ... >>>> [...] (that is, find_package(Qt5 REQUIRED >>>> Gui Xml) might not find QtXml, but Qt5_FOUND would

Re: [CMake] How to recursively copy directories and subdirectories...

2012-02-24 Thread Michael Hertling
On 02/25/2012 03:16 AM, Sumit Kumar wrote: > Hello > > I would like to recursively copy folders/subfolders when I do a make install. > In addition, I would like to copy certain file patterns (typically *.h) files > that may be in these folders. I can do this for individual files (by doing a >

Re: [CMake] add_executable and extension of source file

2012-02-24 Thread Michael Hertling
On 02/24/2012 06:16 PM, Kris Thielemans wrote: > Hi > > I have a project where I have C++ and C source files. I'm adding executables > for this (via macros) like this > > foreach(executable ${SOURCES}) >add_executable(${executable} ${executable} ) >target_link_libraries(${executable} ${ST

Re: [CMake] Code and API review request for Qt5 CMake files

2012-02-24 Thread Michael Hertling
On 02/24/2012 03:34 PM, Stephen Kelly wrote: > > Just forwarding to the cmake users list. > > > > Stephen Kelly wrote: > >> >> Hi there, >> >> Qt5 generates its own CMake files, which you will be able to use to find >> Qt5 and build with it. >> >> That is, you will port from, eg >> >> find_pac

Re: [CMake] passing arguments to the final make

2012-02-23 Thread Michael Hertling
On 02/23/2012 11:11 AM, Andrea Crotti wrote: > On 02/23/2012 06:20 AM, Michael Hertling wrote: >> >> The point is that ${SCRIPT} is substituted in the Makefile by >> >> (1) a macro specified on the command line >> (2) a macro specified in the Makefile >> (3

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/23/2012 12:04 AM, John Drescher wrote: >> And another thing, is it actually \${SCRIPT} a portable solution that works >> on all the generators? >> > > This is not about generators but about what shell you are running > cmake from. For example that would not work on windows since the > comman

Re: [CMake] delayed target

2012-02-22 Thread Michael Hertling
On 02/22/2012 11:55 PM, Andrea Crotti wrote: > On 02/22/2012 09:37 PM, Michael Hertling wrote: >> >> In order to define one target per egg, you'd need to know the eggs at >> configuration time since you cannot define targets at build time. So, >> gathering the e

Re: [CMake] Shared intermediary files

2012-02-22 Thread Michael Hertling
On 02/20/2012 10:07 PM, Kevin Schmidt wrote: > Hello, > I'm in the process of converting over a large, monolithic tree with many > libraries from a custom build solution over to cmake. So far, we've loved > it. I am wondering about others' solutions to a problem we have encountered. > > We h

Re: [CMake] delayed target

2012-02-22 Thread Michael Hertling
On 02/22/2012 07:21 PM, Andrea Crotti wrote: > On 02/22/2012 05:14 PM, Michael Hertling wrote: >> On 02/22/2012 05:02 PM, Andrea Crotti wrote: >>> Again I'm having some troubles with the different building stages: >>> >>> I would like to have a target t

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/22/2012 06:56 PM, Andrea Crotti wrote: > On 02/22/2012 05:32 PM, Andrea Crotti wrote: >> >> Ah that's nice thanks, I'm not sure though that I can rely on being >= >> 2.8 always, >> and that's probably a requirement, right? >> > > I tried what you suggested and with this: > add_custom_target

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/22/2012 06:32 PM, Andrea Crotti wrote: > On 02/22/2012 05:25 PM, Michael Hertling wrote: >> On 02/22/2012 04:43 PM, Andrea Crotti wrote: >>> I would like to be able to pass arguments to my generated Makefile. >>> >>> Suppose I use an environment variable

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/22/2012 04:43 PM, Andrea Crotti wrote: > I would like to be able to pass arguments to my generated Makefile. > > Suppose I use an environment variable like this: > > add_custom_target(run_dev_script >COMMAND ${PYTHON_EXECUTABLE} ${PREREQUISITE} >COMMAND ${PYTHON_EXECUTABLE} ${SCRIPT

Re: [CMake] delayed target

2012-02-22 Thread Michael Hertling
On 02/22/2012 05:02 PM, Andrea Crotti wrote: > Again I'm having some troubles with the different building stages: > > I would like to have a target that simply unzips all the files contained > in a directory, > which can be found with a simple globbing. > > add_custom_target(unzip_all_eggs >

Re: [CMake] External projects and make clean

2012-02-20 Thread Michael Hertling
On 02/17/2012 10:16 AM, Oliver Boesche wrote: > Hi, > > I use external projects e.g. to build BOOST for my own project. In that > case I want to prevent the project to be system or version dependent. > > So I build my dependencies successful with external project (and its > great), but if use m

Re: [CMake] find both shared and static versions?

2012-02-17 Thread Michael Hertling
On 02/17/2012 01:36 AM, Dougal Sutherland wrote: > I have an application where I want to link some targets against shared > versions of Boost and some against static versions. > > (I'd prefer shared in general, but I need to link against the static > version of boost for my matlab mex interface, t

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-16 Thread Michael Hertling
On 02/16/2012 03:14 PM, Barth wrote: > Hi again, > > I have understood what you meant :) Hhm, actually, I talked nonsense w.r.t. DIM_USE_STATIC. ;) > For records here is what I did : > > # (1) Use FIND_LIBRARY() to look for the shared and the static library > # and define DIM_SHARED_LIBRARY

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-16 Thread Michael Hertling
On 02/16/2012 11:10 AM, Barth wrote: > Hello again, > > A short question about your proposal : > > Michael Hertling wrote >> >> (4) DIM_USE_STATIC decides if DIM_LIBRARIES receives DIM_STATIC_LIBRARY >> or DIM_SHARED_LIBRARY, and because DIM_LIBRARIES is

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-15 Thread Michael Hertling
On 02/15/2012 03:48 PM, Barth wrote: > Hello, > > I am trying to write a Find script for a library called DIM. It is something > basic but I have a problem with caching. I have an option to force choosing > the static library over the shared one : > > Then, I decide what is the name of the libr

Re: [CMake] MSBuild and automatic project file regenation

2012-02-13 Thread Michael Hertling
On 02/09/2012 05:35 PM, Bill Hoffman wrote: > I took a look at this, and it is behaving as expected with VS. VS does > NOT have a depend on compile flags. You can change a .vcproj file and > the flags it uses all you want, and VS will NOT rebuild any files > because of that. OK, I see. So, it

Re: [CMake] External project source

2012-02-13 Thread Michael Hertling
On 02/13/2012 09:02 AM, Nicholas Yue wrote: > On 13/02/12 6:47 PM, Eric Noulard wrote: >> 2012/2/13 Nicholas Yue: >>> Hi, >>> >>> There is an existing project I have access to that already have CMake >>> configuration file but the way it is written requires alot of preprocessing >>> steps (pyth

Re: [CMake] How to use CMake with icc via configuration options when needing interprocedural optimization?

2012-02-10 Thread Michael Hertling
possible, but only meaningful for single-configuration generators. The CMAKE_CXX_FLAGS_ variables are definitely the way to go. Regards, Michael > 2012/2/9 Michael Hertling > >> On 02/07/2012 02:43 PM, janitor 048 wrote: >>> Hello, >>> >>> this is a question

Re: [CMake] ansi color

2012-02-10 Thread Michael Hertling
On 02/10/2012 09:15 AM, Matt Fair wrote: > I'd like to be able to pipe cmake output and still have the ansi color > codes when the output is not TTY, is there a way to do this? > Thanks, > Matt You might do this by yourself using sed/awk/perl/... and the ANSI CSIs; refer to [1] for a similar examp

Re: [CMake] PARENT_SCOPE for unset()?

2012-02-10 Thread Michael Hertling
On 02/10/2012 03:59 PM, Robert Dailey wrote: > I actually found that using the following worked the exact same for me: > > set( var "" PARENT_SCOPE ) > > It passed the "NOT" test in my if condition: > > if( NOT var ) > ... > endif() Does it pass the "NOT DEFINED" test, too? There's a difference

Re: [CMake] Copying Files into build-dir under Visual Studio vs. Codeblocks/Win32 vs. Codeblocks/Linux

2012-02-10 Thread Michael Hertling
On 02/10/2012 09:41 AM, Eric Noulard wrote: > 2012/2/10 Stefan Fendt : >> Hi, >> >> I'm (still) quite unsure if this isn't an FAQ (or if not maybe should be >> one), but I have read through everything I could google-up regarding >> this topic and found nothing usable... >> >> I'm writing an x-platf

Re: [CMake] MSBuild and automatic project file regenation

2012-02-09 Thread Michael Hertling
On 01/13/2012 08:02 PM, Michael Hertling wrote: > On 01/13/2012 03:42 PM, Bill Hoffman wrote: >> On 1/13/2012 9:10 AM, Michael Hertling wrote: >> >>> With CMake 2.8.7 and VS 2008, I can report the following findings: >>> >>> (1) Starting out fr

Re: [CMake] Making a variable a dependency...

2012-02-09 Thread Michael Hertling
On 02/08/2012 11:13 PM, Oliver kfsone Smith wrote: > Michael Hertling said the following on 2/6/2012 6:39 PM: >> On 02/06/2012 10:56 PM, Alexander Neundorf wrote: >>> On Saturday 04 February 2012, Oliver Smith wrote: >>>> My CMakeLists uses the Subversion reposit

Re: [CMake] How to use CMake with icc via configuration options when needing interprocedural optimization?

2012-02-09 Thread Michael Hertling
On 02/07/2012 02:43 PM, janitor 048 wrote: > Hello, > > this is a question I recently asked on stackoverflow ( > http://stackoverflow.com/questions/9129233/recommended-ways-to-use-cmake-with-icc-via-configuration-options) > but that has not received any response since then. Maybe this mailing list

Re: [CMake] Making a variable a dependency...

2012-02-06 Thread Michael Hertling
On 02/06/2012 10:56 PM, Alexander Neundorf wrote: > On Saturday 04 February 2012, Oliver Smith wrote: >> My CMakeLists uses the Subversion repository information in a couple of >> places (it configures a file revision.h and it uses it for the CPack >> package name). >> >> The problem is that this v

Re: [CMake] runtime dependencies for tests

2012-01-31 Thread Michael Hertling
On 01/31/2012 02:43 PM, Massaro Alessio wrote: > Hi There > > I googled near and far, but could not find a way to tell CTest where to find > the 3rd-party DLLs required to run the test executables. > In particular my executable targets link with a few Boost DLLs/SOs and > obviously require them

Re: [CMake] cmake can't find some crtbegin.so, libgcc, libgcc_s under certain conditions

2012-01-31 Thread Michael Hertling
On 01/31/2012 09:14 PM, Jim Galarowicz wrote: > > Hi all, > > I'm running into issues with cmake or likely our set-up/usage of cmake, when > trying to build the component based tool framework (CBTF) with cmake. > The issue I'm seeing only occurs on machines where binutils-devel is not > install

Re: [CMake] Adding a generated file as a dependency to a target

2012-01-27 Thread Michael Hertling
On 01/27/2012 07:15 PM, Michael Hertling wrote: > On 01/27/2012 06:41 PM, Schuchard, Matthew wrote: >> Contrary to the CMake FAQ, but consistent with what I have been reading >> elsewhere, it does not seem possible for me with CMake 2.8.6 to add a >> generated file as a d

Re: [CMake] Adding a generated file as a dependency to a target

2012-01-27 Thread Michael Hertling
On 01/27/2012 06:41 PM, Schuchard, Matthew wrote: > Contrary to the CMake FAQ, but consistent with what I have been reading > elsewhere, it does not seem possible for me with CMake 2.8.6 to add a > generated file as a dependency to a target, even in the same directory. > > I have done something

Re: [CMake] Custom configuration types in Visual Studio

2012-01-26 Thread Michael Hertling
ure request. Regards, Michael > On Fri, Jan 13, 2012 at 4:52 PM, Michael Hertling wrote: > >> On 01/13/2012 05:06 PM, David Cole wrote: >>> On Fri, Jan 13, 2012 at 10:22 AM, Michael Hertling >> wrote: >>>> On 01/12/2012 10:23 PM, Robert Dailey wrote: >

Re: [CMake] execute a script before and after configuration

2012-01-25 Thread Michael Hertling
On 01/21/2012 11:28 AM, Dominik Szczerba wrote: > On Sat, Jan 21, 2012 at 10:50 AM, Dominik Szczerba > wrote: > You might use an EXECUTE_PROCESS() command at the beginning of your > CMakeLists.txt to unload the modules, and another EXECUTE_PROCESS() > at the end to reload them. >> >>

Re: [CMake] Revision header

2012-01-23 Thread Michael Hertling
On 01/21/2012 10:51 PM, Oliver Smith wrote: > I have a script that generates a revision.h file, I've spent the morning > trying to figure out how to make it so that ... any time CMake rebuilds > any of the other targets, it starts by running the make-new-revision script. > > The idea is, I use t

Re: [CMake] Fwd: building libs and specifying addition folders

2012-01-20 Thread Michael Hertling
On 01/19/2012 08:15 AM, Dev Guy wrote: > On Thu, Jan 19, 2012 at 1:01 AM, John Drescher wrote: >> -- Forwarded message -- >> From: John Drescher >> Date: Thu, Jan 19, 2012 at 1:00 AM >> Subject: Re: [CMake] building libs and specifying addition folders >> To: Dev Guy >> >> >> On

Re: [CMake] Compile multiple-sources at a time?

2012-01-20 Thread Michael Hertling
On 01/19/2012 11:09 PM, Oliver kfsone Smith wrote: > I realize not every build environment supports the option, but is there > a way to get CMake to generate Makefiles which aggregate source files, e.g. > > $ g++ -pipe -o library.a lib1.cpp lib2.cpp lib3.cpp > $ g++ -pipe -o exeutable file1.cpp f

Re: [CMake] execute a script before and after configuration

2012-01-20 Thread Michael Hertling
On 01/20/2012 01:57 PM, Dominik Szczerba wrote: > Hi, > > I am building a big software framework on a cray system whereby during > cmake "configuration" phase I need to unload certain system modules > (so that some small test programs are allowed to run without > scheduler) and afterwards, before

Re: [CMake] shared library with CMake in kdevelop4

2012-01-16 Thread Michael Hertling
thanks again > pascal Regards, Michael PS: Please don't drop the ML. > Message d'origine > >De : "Michael Hertling" > >À : cmake@cmake.org > >Objet : Re: [CMake] shared library with CMake in kdevelop4 > >Date : 16/01/2012 15:39:29 CET >

Re: [CMake] shared library with CMake in kdevelop4

2012-01-16 Thread Michael Hertling
On 01/16/2012 02:38 PM, paspa...@noos.fr wrote: > > I am new with kdevelop and cmake so apologize for this pretty naive question, > I > create in kdevelop a proj3 project and want to link a library so I create a > second project projA within the proj3 directory > > the projA CMakelist is > >

Re: [CMake] Custom configuration types in Visual Studio

2012-01-13 Thread Michael Hertling
On 01/13/2012 05:06 PM, David Cole wrote: > On Fri, Jan 13, 2012 at 10:22 AM, Michael Hertling > wrote: >> On 01/12/2012 10:23 PM, Robert Dailey wrote: >>> I see there is documentation for this but it doesn't have an implementation >>> for VS generators: >&

Re: [CMake] MSBuild and automatic project file regenation

2012-01-13 Thread Michael Hertling
On 01/13/2012 03:42 PM, Bill Hoffman wrote: > On 1/13/2012 9:10 AM, Michael Hertling wrote: > >> With CMake 2.8.7 and VS 2008, I can report the following findings: >> >> (1) Starting out from within an empty build directory: "cmake .." >> followed b

Re: [CMake] Custom configuration types in Visual Studio

2012-01-13 Thread Michael Hertling
On 01/12/2012 10:23 PM, Robert Dailey wrote: > I see there is documentation for this but it doesn't have an implementation > for VS generators: > http://www.cmake.org/Bug/view.php?id=5811 > > Any status updates on this bug? I'd like to be able to create my own debug > configuration called DebugSta

Re: [CMake] MSBuild and automatic project file regenation

2012-01-13 Thread Michael Hertling
On 01/10/2012 07:09 PM, Óscar Fuentes wrote: > Michael Hertling > writes: > >> But aren't the issues related at least? > > Dunno. > >> If I understand >> correctly, "cmake --build" invokes MSBuild which >> >> - loads the so

Re: [CMake] How not to copy a link

2012-01-12 Thread Michael Hertling
On 01/11/2012 04:52 PM, David Cole wrote: > On Wed, Jan 11, 2012 at 10:10 AM, Michael Hertling > wrote: >> On 01/07/2012 03:52 PM, David Cole wrote: >>> On Sat, Jan 7, 2012 at 9:47 AM, David Cole wrote: >>>> On Fri, Jan 6, 2012 at 10:54 PM, Michael Hertling &

Re: [CMake] How not to copy a link

2012-01-11 Thread Michael Hertling
On 01/07/2012 03:52 PM, David Cole wrote: > On Sat, Jan 7, 2012 at 9:47 AM, David Cole wrote: >> On Fri, Jan 6, 2012 at 10:54 PM, Michael Hertling >> wrote: >>> On 01/06/2012 07:51 PM, Kevin Burge wrote: >>>> Thanks David. These are external libraries built

Re: [CMake] Cmake coloring gcc output on errror

2012-01-11 Thread Michael Hertling
On 01/10/2012 07:17 PM, vivek goel wrote: > Is there a way to color warning/error of gcc with cmake ? AFAIK, no, but you might remember the power of *nix, feed the output of "make VERBOSE=1 2>&1" into sed/awk/perl/ and use ANSI Control Sequence Initiators: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL

Re: [CMake] MSBuild and automatic project file regenation

2012-01-09 Thread Michael Hertling
On 01/09/2012 07:56 PM, Óscar Fuentes wrote: > Michael Hertling > writes: > >> On 01/09/2012 02:34 PM, David Cole wrote: >>> No trick, but to avoid this, perhaps we should change the "--build" >>> handler to run the cmake configure & generate

Re: [CMake] Copying of 3rd party DLLs in a POST-BUILD step

2012-01-09 Thread Michael Hertling
On 01/09/2012 10:05 AM, Michael Stürmer wrote: > I have found some topics related to my issue on the web, but none so far > helped me to fix it: > > I use Visual Studio 2010 on Windows 7 64Bit. > > During my build, all binaries are collected in one folder, which makes it > easier for me to de

Re: [CMake] MSBuild and automatic project file regenation

2012-01-09 Thread Michael Hertling
On 01/09/2012 02:34 PM, David Cole wrote: > On Sun, Jan 8, 2012 at 11:59 PM, Óscar Fuentes wrote: >> When MSBuild.exe is used (typically by "cmake --build") for building a >> VS2010 project generated by cmake, it correctly invokes cmake for >> regenerating the project files if changes to the CMake

Re: [CMake] How not to copy a link

2012-01-06 Thread Michael Hertling
On 01/06/2012 07:51 PM, Kevin Burge wrote: > Thanks David. These are external libraries built outside of CMake, > without CMake, not imported via any of the import capabilities of cmake, > and that need to be installed alongside my CMake built files. I think > I'm just going to do the install

Re: [CMake] how to setup cmake_c/xx_flags per toolchain?

2012-01-06 Thread Michael Hertling
On 01/07/2012 12:56 AM, Paweł Sikora wrote: > Hi, > > i'm trying to setup a toolchain file for cross-compilation with target specfic > options and afaics cmake dosen't use flags from such file: > > $ cat CMakeLists.txt > cmake_minimum_required( VERSION 2.8.7 ) > project( test CXX ) > add_executa

Re: [CMake] How to "install" then "test"?

2012-01-05 Thread Michael Hertling
On 12/29/2011 08:01 PM, Denis Scherbakov wrote: > Dear All! > > Maybe someone can help me: I have a project, we compile binaries and then > using various INSTALL directives finish the job by copying files where they > belong: to "bin", "man", "libexec", etc. The point is, we need to run > executa

Re: [CMake] Interrupt problems in cmake-gui

2012-01-05 Thread Michael Hertling
On 12/31/2011 02:10 AM, Robert Dailey wrote: > I'd like to introduce boost into CMake for this. Whenever I've advocated CMake as build system, one of the strongest selling points has been its self-sufficiency, i.e. the fact that it does not have any external dependencies except for a C++ environm

Re: [CMake] Problem with set_source_files_properties

2012-01-05 Thread Michael Hertling
On 01/05/2012 02:42 PM, Mateusz Loskot wrote: > On 5 January 2012 12:31, vivek goel wrote: >> I am using code >> where f contains the file name >> >> >> set(MY_PATH "-D__RELATIVE_PATH__=\\\"ab\\\"") >> set_source_files_properties(${f} PROPERTIES >> COMPILE_FLAGS ${MY_PATH}) >> >> I am not able t

Re: [CMake] Add Custom COmmand and CMAKE_CFG_INTDIR

2012-01-04 Thread Michael Hertling
On 01/04/2012 10:11 PM, Bill Hoffman wrote: > On 1/4/2012 4:03 PM, Michael Jackson wrote: >> I robbed this from the HDF5 project which does something very similar to >> what I am doing: >> >> SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT}) >> >> That "seems" to at least p

Re: [CMake] RC compiler on Linux - new problem

2012-01-04 Thread Michael Hertling
ENDIF() PROJECT(... RC) (2) Have you already complaint to the Winteracter people w.r.t. their RC's behavior? ;-) IMO, forcing the output into the same location as the input is hardly acceptable, as source trees might be read- only. Regards, Michael > Michael Hertlin

Re: [CMake] Trying to get build info for a target

2012-01-01 Thread Michael Hertling
On 01/01/2012 07:47 AM, Gary Kramlich wrote: > On 12/31/2011 05:03 PM, Robert Dailey wrote: >> Storing the source directory will require the exact idea you had >> mentioned. Use an internal cache variable or, even better, a target >> property. This is how I have done it. Each target that I create >

Re: [CMake] [EXTERNAL] Re: execute_process appending redirected output

2011-12-30 Thread Michael Hertling
On 12/28/2011 05:39 PM, Belcourt, K. Noel wrote: > Hi Aaron, > > On Dec 27, 2011, at 11:04 PM, Aaron Ten Clay wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 12/27/11 16:16, Belcourt, Kenneth wrote: >>> I'm trying to get CMake to execute this command >>> >>> INSTALL(CODE >>>

Re: [CMake] 2D arrays

2011-12-16 Thread Michael Hertling
ave PARENT_SCOPE show the desired effect. Regards, Michael > On Thu, Dec 1, 2011 at 11:04 AM, Robert Dailey wrote: > >> On Wed, Nov 30, 2011 at 7:18 PM, Michael Hertling wrote: >> >>> On 11/30/2011 03:29 AM, Robert Dailey wrote: >>>> I use macros so the _arra

Re: [CMake] 2D arrays

2011-12-16 Thread Michael Hertling
On 12/01/2011 06:04 PM, Robert Dailey wrote: > On Wed, Nov 30, 2011 at 7:18 PM, Michael Hertling wrote: > >> On 11/30/2011 03:29 AM, Robert Dailey wrote: >>> I use macros so the _array2d_ variables fall through the scope of the >> macro >>> and are available

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-16 Thread Michael Hertling
On 12/13/2011 11:19 PM, Michael Hertling wrote: > On 12/13/2011 09:21 PM, David Cole wrote: >> On Tue, Dec 13, 2011 at 2:09 PM, Robert Dailey wrote: >>> Thanks for the info. It's a bit disappointing that it doesn't work like I >>> expect. The CMAKE_MFC_FLAG

Re: [CMake] How to find list of directories

2011-12-15 Thread Michael Hertling
On 12/15/2011 02:34 PM, Renato Utsch wrote: > Hello, > > I am writing a plugin compiler that will do linke this: > > -- main > plugin > | CMakeLists.txt (in the plugin folder) > -- example (example plugin) > --| CMakeLists.txt (in the example folder) > > The CMakeLists.txt file

Re: [CMake] Transitive link question

2011-12-15 Thread Michael Hertling
On 12/13/2011 11:00 PM, Biddiscombe, John A. wrote: >> > Sure, when project A is loaded into project B it either needs to search and > load the hdf5 cmake file or require that to be done in project B before > loading project A. Then the hdf5 target will be known in project B too and > linking wi

Re: [CMake] Fwd: Re: Compiler debug file, howto remove in clean?

2011-12-14 Thread Michael Hertling
On 12/14/2011 09:43 AM, Totte Karlsson wrote: > > On 12/13/2011 4:15 PM, David Cole wrote: >> RUNTIME_OUTPUT_DIRECTORY is a target property, not a variable. You'd >> have to use get_property to retrieve its value, not >> ${RUNTIME_OUTPUT_DIRECTORY}... > > Thanks! I ended up with the following, in

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Michael Hertling
le as a part of the > compilation unit. So a change to the file would trigger a rebuild of the > library and zip file, instead of only the zip file. In this regard, the question is: Is the manifest actually necessary to build the library, i.e. must the latter be recompiled and/or relinked

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Michael Hertling
On 12/14/2011 10:55 AM, Alexander Broekhuis wrote: > Hi, > > Thanks for you replies, > > >>> In my case the output is the ZIP file. So the zip file is produced by the >>> top level target, and I don't want/need a separate target for it. >> >> Yes but CMake's jobs is to build libraries and execut

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Michael Hertling
hus, to express this dependency, you need to have an own target for the ZIP file, so you will end up with two targets if you want to have the dependencies set up correctly, although you'd prefer to have just one. BTW, is this really bad? Regards, Michael >> PS: Please don

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-13 Thread Michael Hertling
On 12/13/2011 09:21 PM, David Cole wrote: > On Tue, Dec 13, 2011 at 2:09 PM, Robert Dailey wrote: >> Thanks for the info. It's a bit disappointing that it doesn't work like I >> expect. The CMAKE_MFC_FLAG should work as you say the link flags should, but >> it does not. As long as CMAKE_MFC_FLAG i

Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-13 Thread Michael Hertling
On 12/12/2011 04:36 PM, Michael Wild wrote: > On 12/12/2011 04:29 PM, Totte Karlsson wrote: >>> >>> At build time: >>> >> >>> ADD_CUSTOM_COMMAND(TARGET OneOfYourExecutables >>> COMMAND ${CMAKE_COMMAND} -E copy_if_different >>> //input.txt $) >>> ADD_CUSTOM_COMMAND(TARGET AnotherExecut

  1   2   3   4   5   6   7   8   >