Re: [CMake] add_custom_target dependency list issue

2010-09-26 Thread Michael Hertling
On 09/26/2010 09:09 PM, Szilárd Páll wrote: >> The DEPENDS option of ADD_CUSTOM_TARGET() is meant for file-level >> dependencies only; use ADD_DEPENDENCIES() for target-level ones. > > Silly mistake, thanks for pointing it out. However, even if I add > target dependencies using ADD_DEPENDENCIES()

Re: [CMake] add_custom_target dependency list issue

2010-09-25 Thread Michael Hertling
On 09/26/2010 02:34 AM, Szilárd Páll wrote: > Hi, > > I implemented a custom target which depends on several other targets, > including some that I generate beforehand as custom targets and > collect their names in a variable. However, this seems to behave in a > strange way if I list these depend

Re: [CMake] Ensuring correct linkage to local target library

2010-09-18 Thread Michael Hertling
On 09/18/2010 05:37 PM, Clifford Yapp wrote: > I have a situation where there exists on some systems a library > (/lib/librt.so.1) that conflicts with the name we use for BRL-CAD's > raytracing library (also librt). For various reasons, I can't rename > our lib - this means I have to deal with the

Re: [CMake] Execution order

2010-09-17 Thread Michael Hertling
On 09/17/2010 12:04 PM, Chris Hillery wrote: > The message() and file(REMOVE) commands will be executed when you run CMake. > The command to generate the .cpp file won't be executed until you run make. > That's why it's still around after you're done. > > You can't really do exactly what you want

Re: [CMake] Question regarding project structure

2010-09-16 Thread Michael Hertling
On 09/16/2010 05:33 PM, Michael Wild wrote: > > On 16. Sep, 2010, at 17:13 , David Aldrich wrote: > >> Hi David >> >>> Something like this should work: >> >>> cmake_minimum_required(VERSION 2.8) >>> project(MyExe) >> >>> add_subdirectory(../Kernel Kernel) >>> add_subdirectory(../DynLibs DynLibs)

Re: [CMake] build priority

2010-09-15 Thread Michael Hertling
On 09/16/2010 02:27 AM, Serghei Amelian wrote: > Hi, > > Is any way to tell cmake to build a target before beginning to start > compiling > another one? For example, i need target "dcopidl" to be exists before > generating *.kidl files. Use ADD_DEPENDENCIES() and the DEPENDS option of custom t

Re: [CMake] add_dependency on a custom target

2010-09-15 Thread Michael Hertling
On 09/15/2010 05:15 PM, Nick Davidson wrote: > Whoops, forgot to reply on list, sorry! > >> From: cmake-boun...@cmake.org >> [mailto:cmake-boun...@cmake.org] On Behalf Of Andreas Pakulat >> Sent: 15 September 2010 13:03 >> To: cmake@cmake.org >> Subject: Re: [CMake] add_dependency on a custom targ

Re: [CMake] custom target isn't rebuilt if depending on another custom target

2010-09-14 Thread Michael Hertling
On 09/14/2010 11:56 AM, Gerhard Stengel wrote: > Hello Michael, > > thanks, it sheds some light on the matter, but I'm not happy as it is, see > comments below. > > regards > > Gerhard > ... >>> >>> If I create Demo.tar from a clean project, everything's fine. However, >>> the rebuilt isn't per

Re: [CMake] custom target isn't rebuilt if depending on another custom target

2010-09-13 Thread Michael Hertling
On 09/13/2010 05:46 PM, Gerhard Stengel wrote: > Hi, > > I have a strange problem with custom targets and their dependencies. I do as > follows: > > 1) create a file 1 and add it to a custom target 1 > 2) create a file 2 and add it to a custom target 2 > 3) create a 3rd file by packing #1 and #2

Re: [CMake] Question about add_custom_command

2010-09-11 Thread Michael Hertling
On 09/10/2010 05:25 PM, Ingolf Steinbach wrote: > 2010/9/10 Michael Wild : >>> Does this also create dependencies on the multitude of header files >>> included by the .c files in SRCS (which would probably be desired in >>> case of the OP)? >>> >>> Ingolf >> >> No, it will not. But usually you have

Re: [CMake] Question about add_custom_command

2010-09-09 Thread Michael Hertling
On 09/09/2010 06:53 PM, David Aldrich wrote: > Hi > > As mentioned before, I am replacing a manually built gnu makefile (for Linux) > that builds a library, with CMake. > > A required build step is to run an executable called versionInfo that > processes all the source files of the library and

Re: [CMake] using only release versions of QT libraries

2010-09-09 Thread Michael Hertling
On 09/09/2010 09:06 PM, edA-qa mort-ora-y wrote: > My cmake file has the fairly standard QT setup: > > find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtNetwork QtSvg QtOpenGL > QtMain REQUIRED) > include(${QT_USE_FILE}) > > > and then later use ${QT_LIBRARIES} > > However, this uses the debug l

Re: [CMake] How to change CMake's expected output filename

2010-09-08 Thread Michael Hertling
On 09/08/2010 07:35 PM, Nick Foster wrote: > > Hi there, > > I'm using CMake with SDCC. Currently, support for SDCC in CMake does not also > include dialects for its various assemblers. So I've created one, for the > asx8051 assembler. The problem is that the asx8051 assembler shows > nonstand

Re: [CMake] Loop expansion in find_library() seems backwards

2010-09-08 Thread Michael Hertling
On 09/08/2010 08:38 AM, Michael Wild wrote: > > On 8. Sep, 2010, at 8:25 , Philip Lowman wrote: > >> Let's say I have many different potential names for a library and the >> following filesystem >> >> /usr/lib/libnspr4.so >> ${CMAKE_CURRENT_SOURCE_DIR}/libnspr4a.so >> >> find_library(TEST_LIBRARY

Re: [CMake] external link dependency, non-library

2010-09-07 Thread Michael Hertling
On 09/08/2010 12:11 AM, SK wrote: > Alright, I ended up rototilling and using a dummy file approach, as in: > > SET( _relink_dummy "${CMAKE_CURRENT_BINARY_DIR}/relink_dummy.c" ) > ADD_EXECUTABLE( ${_app_name} ${_app_srcs} ${_relink_dummy} ) > SET_SOURCE_FILES_PROPERTIES( ${_relink_dumm

Re: [CMake] Problem while setting variables in CMakeCache

2010-09-06 Thread Michael Hertling
On 09/06/2010 06:33 PM, Stefan Köhnen wrote: > Hello, > > I am trying to set a variable that appears in CMakeCache. I made this > small example to show what I am trying to do. > > CMakeLists.txt: > PROJECT(CMakeTest) > > SET(VAR_FOR_TEST "firstValue" CACHE STRING "Just for testing") > > set(VAR

Re: [CMake] link-interface-libs not empty (or auto-filled)

2010-09-05 Thread Michael Hertling
On 09/02/2010 12:13 AM, Andreas Pakulat wrote: > Hi, > > I've got a small problem here, I'm building an installing a static > library which links (among other things) against QtCore. I'm also using > the cmake install(TARGETS .. EXPORT) stuff to export a Target.cmake file > with the library as imp

Re: [CMake] Understanding directory structure

2010-09-04 Thread Michael Hertling
On 09/05/2010 12:04 AM, Joshua Warner wrote: > Hi, > > I have a small language (written in C++) I'd like to convert to cmake, but > I'm having a hard time figuring out what to do in which CMakeLists.txt file. > > Basically, I have the following directory structure: > > nvm/ > --tools/ > comp

Re: [CMake] changing the cmake color scheme

2010-09-04 Thread Michael Hertling
On 09/04/2010 02:32 AM, Abe Bachrach wrote: > Hi there, > is there a way to change the color scheme that cmake uses while building?? > > I would rather not have the message for linking be red, since this > immediately makes me think there was an error. As Eric has pointed out in the meantime, tho

Re: [CMake] Modification of link flags for all targets within a subdirectory -- how?

2010-09-03 Thread Michael Hertling
On 09/02/2010 09:11 PM, Ryan Pavlik wrote: > On 9/2/2010 1:43 PM, Ingolf Steinbach wrote: >> Hi, >> >> 2010/9/2 Ryan Pavlik: >>> Set the appropriate variables at the top of the CMakeLists.txt file of the >>> given subdirectory. Each add_subdirectory call creates a new scope, so >>> variables s

Re: [CMake] Always compile source file in debug

2010-09-03 Thread Michael Hertling
On 09/03/2010 04:13 PM, Belcourt, Kenneth wrote: > > On Sep 3, 2010, at 5:07 AM, Eric Noulard wrote: > >> 2010/9/3 Belcourt, Kenneth : >>> Apologies if this has been answered before. In an effort to ensure >>> cross-platform consistent results, I need to force some (C++ and >>> Fortran) >>> so

Re: [CMake] Always compile source file in debug

2010-09-03 Thread Michael Hertling
On 09/03/2010 01:07 PM, Eric Noulard wrote: > 2010/9/3 Belcourt, Kenneth : >> Hi, >> >> Apologies if this has been answered before. In an effort to ensure >> cross-platform consistent results, I need to force some (C++ and Fortran) >> source files to always be built debug. Is there any easy synta

Re: [CMake] Building a project with Subdirs(Qt4 and OpenCascade inside)

2010-08-31 Thread Michael Hertling
On 08/31/2010 03:03 PM, Christian Lohr wrote: > Hi, > I have a more or less complicated program to compile. It's splitted up > in several small libraries, which have seperate directories for header > and source files, and a main applikation. > It compiled, but it ended up with a linker error, seems

Re: [CMake] several questions about cmake

2010-08-26 Thread Michael Hertling
On 08/26/2010 05:38 PM, Mark Roden wrote: >>> 2) I'm trying to check to see if a certain C++ code chunk will >>> compile. The line is: >>> >>> CHECK_CXX_SOURCE_COMPILES(" >>> #include >>> #include >>> void main(){ >>> char buf[100]; >>> char buf2[100]; >>> strncpy(buf2, buf, 5); >>> buf2[5]

Re: [CMake] How to add CORBA idl files to Visual Studio source group

2010-08-22 Thread Michael Hertling
On 08/22/2010 05:21 PM, Claus Klein wrote: > Ok, > I found the solution myself; I have to add: > set_source_files_properties(interface1.idl PROPERTIES HEADER_FILE_ONLY > TRUE) > > But I do not understand why this is needed with VS2005? See

Re: [CMake] Problem with CTest and configuration specific binary paths

2010-08-21 Thread Michael Hertling
On 08/20/2010 09:44 PM, Iman Brouwer wrote: > Hello, > > The path to a binary target built by cmake depends on the > configuration type when using the Visual Studio generators. Is it > possible to pass this path the ctest without having to run ctest with > the -c option? > > I'd like to do the fo

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-20 Thread Michael Hertling
On 08/20/2010 12:42 PM, Michael Wild wrote: > > On 19. Aug, 2010, at 23:36 , Michael Hertling wrote: > >> On 08/19/2010 09:42 PM, Michael Wild wrote: >>> >>> In that case I recommend creating a CMake script (e.g. >>> create_application_version.cmake

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Hertling
On 08/19/2010 09:42 PM, Michael Wild wrote: > > In that case I recommend creating a CMake script (e.g. > create_application_version.cmake) which creates the ApplicationVersion.xml > file. It queries the current revision (have a look at FindSVN.cmake on how to > do this), determines the date and

Re: [CMake] Mixing optional and required libraries with find_package

2010-08-18 Thread Michael Hertling
On 08/09/2010 02:55 PM, storri wrote: > I don't think it is possible to find both required and optional > libraries with the same find_package command. Is that true? At , you will find some considerations w.r.t. requesting required and opt

Re: [CMake] CTest fails to find test command : bug in use of FileExists() + suggested fix.

2010-08-18 Thread Michael Hertling
On 08/14/2010 11:59 PM, Richard Offer wrote: > > One of my test cases needs sudo to run (its listening on privileged ports). > > > If I add > > ADD_TEST( SERVER /usr/bin/sudo > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Server${SUFFIX} --daemon ) > > CMake complains that it can¹t find sudo. > > [ d0

Re: [CMake] trouble with quotation marks (cmake 2.6 for WinCE)

2010-08-16 Thread Michael Hertling
On 08/13/2010 09:49 PM, Ris Misner wrote: > Hi, > > I am new to using cmake, and trying to get a custom build command to embed > quotes for a project that I'm compiling in MS visual studio on a windows > machine. > > I have this in my cmake file: > > COMMAND ${FLEX_EXECUTABLE} -t ${WEBCORE_DIR

Re: [CMake] Finding Python3

2010-08-02 Thread Michael Hertling
On 07/22/2010 02:17 PM, Marcel Loose wrote: > Hi all, > > That sounds like a good solution. It is probably the cleanest way to > solve this controversy. OTOH, it adds two extra keywords that, of > course, are not used in existing (now sometimes failing) Find macros. > IMHO, solving the issue by ch

Re: [CMake] Finding Python3

2010-08-01 Thread Michael Hertling
On 07/22/2010 09:18 AM, Alan W. Irwin wrote: > On 2010-07-22 03:09+0200 Michael Hertling wrote: > >> In summary, my point is: Even if the loops are swapped, we wouldn't get >> a solution that works well in real-world scenarios so I doubt if it's >> worth the eff

Re: [CMake] Finding Python3

2010-08-01 Thread Michael Hertling
On 07/22/2010 01:30 PM, Michael Wild wrote: > Thanks for reminding me of my old idea ;-) > http://www.cmake.org/pipermail/cmake/2010-May/036993.html > > I think that would be the cleanest solution. Extract the loop body into a > function and then have two separate loops calling the same function

Re: [CMake] option bug ?

2010-07-27 Thread Michael Hertling
On 07/26/2010 10:29 PM, Alexander Neundorf wrote: > On Monday 12 July 2010, Michael Hertling wrote: >> On 07/07/2010 09:44 AM, Michael Wild wrote: >>> On 7. Jul, 2010, at 9:32 , Michael Hertling wrote: >>>> On 07/03/2010 01:03 AM, Chris Hillery wrote: >>>

Re: [CMake] Finding Python3

2010-07-23 Thread Michael Hertling
On 07/23/2010 09:02 AM, Michael Wild wrote: > > On 23. Jul, 2010, at 6:29 , Michael Hertling wrote: > >> On 07/22/2010 10:36 AM, Michael Wild wrote: >>> >>> On 22. Jul, 2010, at 10:17 , Marcel Loose wrote: >>> [...] >>>> >>>> Hi

Re: [CMake] Finding Python3

2010-07-22 Thread Michael Hertling
On 07/22/2010 08:33 AM, Michael Wild wrote: > > On 22. Jul, 2010, at 3:09 , Michael Hertling wrote: > >> On 07/21/2010 10:26 AM, Michael Wild wrote: >>> >>> On 21. Jul, 2010, at 9:56 , Marcel Loose wrote: >>> >>>> On Tue, 2010-07-20 at 09:18

Re: [CMake] Finding Python3

2010-07-22 Thread Michael Hertling
On 07/22/2010 10:36 AM, Michael Wild wrote: > > On 22. Jul, 2010, at 10:17 , Marcel Loose wrote: > [...] >> >> Hi Michael and others, >> >> I mostly agree with what your saying. However, IMHO, you refer to a >> "perfect world" situation, where all Find modules properly use VERSION >> to specify a

Re: [CMake] Finding Python3

2010-07-22 Thread Michael Hertling
On 07/22/2010 10:17 AM, Marcel Loose wrote: > On Thu, 2010-07-22 at 03:09 +0200, Michael Hertling wrote: >> On 07/21/2010 10:26 AM, Michael Wild wrote: >>> >>> On 21. Jul, 2010, at 9:56 , Marcel Loose wrote: >>> >>>> On Tue, 2010-07-20 at 09:18 -0700

Re: [CMake] how to set ar/ranlib flags per target

2010-07-21 Thread Michael Hertling
On 07/21/2010 10:46 PM, Hickel, Kelly wrote: > >> -Original Message- >> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On >> Behalf Of Verweij, Arjen >> Sent: Wednesday, July 21, 2010 3:43 PM >> To: cmake@cmake.org >> Subject: Re: [CMake] how to set ar/ranlib flags per targ

Re: [CMake] Finding Python3

2010-07-21 Thread Michael Hertling
On 07/21/2010 10:26 AM, Michael Wild wrote: > > On 21. Jul, 2010, at 9:56 , Marcel Loose wrote: > >> On Tue, 2010-07-20 at 09:18 -0700, Alan W. Irwin wrote: >>> On 2010-07-20 17:12+0200 Michael Hertling wrote: >>> >>>> On 07/20/2010 03:26 AM, Alan W

Re: [CMake] Libs not Found with Make Install

2010-07-20 Thread Michael Hertling
On 07/21/2010 12:39 AM, michael.schm...@l-3com.com wrote: > Howdy, > > After a make install, the executable's shared library dependencies are > missing when I run "ldd". In particular: "By default if you don't change any RPATH related settings, CM

Re: [CMake] Finding Python3

2010-07-20 Thread Michael Hertling
On 07/20/2010 03:26 AM, Alan W. Irwin wrote: > On 2010-07-20 00:51+0200 Michael Hertling wrote: > >> On 07/18/2010 10:14 PM, Alan W. Irwin wrote: >>> (1) http://public.kitware.com/Bug/view.php?id=10718 is fixed. In my >>> view this bug has been the source of much

Re: [CMake] Finding Python3

2010-07-19 Thread Michael Hertling
On 07/18/2010 10:14 PM, Alan W. Irwin wrote: > On 2010-07-18 12:07-0700 Branan Purvine-Riley wrote: > >> Unfortunately, I can't think of a way to get out of using hardcoded version >> lists, since python is often in specific locations (or has a specific >> executable >> name) based on its version

Re: [CMake] Finding Python3

2010-07-19 Thread Michael Hertling
On 07/18/2010 09:07 PM, Branan Purvine-Riley wrote: > On Sunday 18 July 2010 09:15:17 Michael Hertling wrote: >> On 07/18/2010 06:50 AM, Branan Riley wrote: >>> I've mad a very cursory effort to add Python 3 support to CMake. All >>> I've done so far is tak

Re: [CMake] Finding Python3

2010-07-18 Thread Michael Hertling
On 07/18/2010 06:50 AM, Branan Riley wrote: > I've mad a very cursory effort to add Python 3 support to CMake. All > I've done so far is take FindPythonLibs and FindPythonInterp, and > change the variable names and the python versions. It doesn't yet have > framework support on Mac, as I have no id

Re: [CMake] Macro Problem

2010-07-14 Thread Michael Hertling
On 07/14/2010 04:37 PM, michael.schm...@l-3com.com wrote: > Hello, > > My project has third party source in a subdirectory. The third party > source has to be compiled without special options. With autoconf, we > had "CFLAGS =". How would I do the same with cmake and restore CFLAGS > to their o

Re: [CMake] Transitive Link Dependencies

2010-07-14 Thread Michael Hertling
ain.c.o -o main2 ... -L... libA.a libB.so ... Thus, the linking is done against the shared and the static version of "A" as desired, and the dependency on "B" is resolved as desired, too. Regards, Michael > On Wed, Jul 14, 2010 at 9:13 AM, Michael Hertling wrote: > >

Re: [CMake] building tests

2010-07-14 Thread Michael Hertling
On 07/14/2010 06:40 AM, Paul Harris wrote: > On 11 July 2010 20:36, Michael Hertling wrote: > >> On 07/10/2010 06:54 PM, Paul Harris wrote: >>> On 9 July 2010 22:39, Michael Wild wrote: >>> >>>> >>>> On 9. Jul, 2010, at 15:48 , Michael H

Re: [CMake] Transitive Link Dependencies

2010-07-14 Thread Michael Hertling
On 07/14/2010 02:38 PM, Kevin Fitch wrote: > I have found a situation where transitive link dependencies don't seem to > work the way I would expect. I have a library A that depends on B. e.g. > > target_link_libraries(A B) > # and elsewhere we have ... > target_link_libraries(foo A) > #then B get

Re: [CMake] CMAKE__FLAGS added to link rule

2010-07-12 Thread Michael Hertling
On 07/12/2010 07:12 PM, Verweij, Arjen wrote: > As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include > gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) > stuff as well? As a sidetrack I'm starting to wonder what the purpose of > CMAKE__FLAGS is. The book lists

Re: [CMake] calling c-compiler by hand

2010-07-12 Thread Michael Hertling
On 07/12/2010 08:24 PM, Michael Hertling wrote: > On 07/12/2010 07:06 PM, Jochen Wilhelmy wrote: >> Hi! >> >> adding >> >> ${CMAKE_CURRENT_SOURCE_DIR}/VersionInfo.cpp >> to the source files does not have the desired effect. >> If I change some file o

Re: [CMake] calling c-compiler by hand

2010-07-12 Thread Michael Hertling
On 07/12/2010 07:06 PM, Jochen Wilhelmy wrote: > Hi! > > adding > > ${CMAKE_CURRENT_SOURCE_DIR}/VersionInfo.cpp > to the source files does not have the desired effect. > If I change some file of the target, VersionInfo.cpp > does not get recompiled and therefore the current version > is not incor

Re: [CMake] calling c-compiler by hand

2010-07-12 Thread Michael Hertling
On 07/12/2010 04:14 PM, Jochen Wilhelmy wrote: > Hi! > > I'd like to call the c-compiler by hand as pre-link step to compile in > the current svn version. > > on windows i first separate the arguments > > separate_arguments(CFLAGS WINDOWS_COMMAND "${CMAKE_CXX_FLAGS} > ${CMAKE_CXX_FLAGS_DEBUG}

Re: [CMake] option bug ?

2010-07-12 Thread Michael Hertling
On 07/07/2010 09:44 AM, Michael Wild wrote: > > On 7. Jul, 2010, at 9:32 , Michael Hertling wrote: > >> On 07/03/2010 01:03 AM, Chris Hillery wrote: >>> There's a slightly nicer work-around: Change project A's CMakeLists to set >>> PROJB_OPENCV_LINK as

Re: [CMake] Building a Version Header

2010-07-11 Thread Michael Hertling
On 07/09/2010 01:23 PM, Johannes Stallkamp wrote: > Am 09.07.2010 12:56, schrieb Michael Hertling: >> As the version target is always out of date it will be build each time >> you (re)build main, but since CONFIGURE_FILE() obviously does not touch >> the output file as lo

Re: [CMake] building tests

2010-07-11 Thread Michael Hertling
On 07/10/2010 06:54 PM, Paul Harris wrote: > On 9 July 2010 22:39, Michael Wild wrote: > >> >> On 9. Jul, 2010, at 15:48 , Michael Hertling wrote: >> >>> On 07/08/2010 09:47 AM, Paul Harris wrote: >>>> On 8 July 2010 15:31, Michael Wild wrote: >

Re: [CMake] Copy two files into one file

2010-07-10 Thread Michael Hertling
On 07/09/2010 06:39 PM, Bo Thorsen wrote: > Den 09-07-2010 16:48, Michael Hertling skrev: >> On 07/09/2010 03:48 PM, Bo Thorsen wrote: >>> Hi all, >>> >>> Is there an elegant way of copying two files into one? >>> >>> Right now, I have this:

Re: [CMake] Copy two files into one file

2010-07-09 Thread Michael Hertling
On 07/09/2010 03:48 PM, Bo Thorsen wrote: > Hi all, > > Is there an elegant way of copying two files into one? > > Right now, I have this: > > ADD_CUSTOM_COMMAND(OUTPUT privilege_tables.sql > COMMAND copy /b > ${CMAKE_CURRENT_SOURCE_DIR}/system_tables.sq

Re: [CMake] building tests

2010-07-09 Thread Michael Hertling
On 07/08/2010 09:47 AM, Paul Harris wrote: > On 8 July 2010 15:31, Michael Wild wrote: > >> >> On 8. Jul, 2010, at 7:25 , Paul Harris wrote: >> >>> On 8 July 2010 12:56, Michael Wild wrote: >>> On 8. Jul, 2010, at 4:40 , Paul Harris wrote: > On 7 July 2010 23:05, Michael Wild

Re: [CMake] Building a Version Header

2010-07-09 Thread Michael Hertling
On 07/08/2010 10:31 PM, Tyler Roscoe wrote: > On Wed, Jul 07, 2010 at 10:43:15PM -0400, John Drescher wrote: >> On Wed, Jul 7, 2010 at 9:44 PM, Clark Gaebel wrote: >>> I would like to generate file that looks something like this: >>> >>>// version.h >>>#define VERSION "v0.1-345-ga77ede8" >

Re: [CMake] option bug ?

2010-07-07 Thread Michael Hertling
On 07/07/2010 09:40 AM, Chris Hillery wrote: > On Wed, Jul 7, 2010 at 12:32 AM, Michael Hertling wrote: > >> IMO, things aren't sooo bad. ;-) >> >> [100 lines of explanation of how SET() behaves in 6 different ways elided] >> > > I think you've

Re: [CMake] option bug ?

2010-07-07 Thread Michael Hertling
On 07/03/2010 01:03 AM, Chris Hillery wrote: > There's a slightly nicer work-around: Change project A's CMakeLists to set > PROJB_OPENCV_LINK as a cache variable, ie, SET(PROJB_OPENCV_LINK NO CACHE > BOOLEAN "doc"). I've tested it locally and it works the way you want it to. > > It seems that CMak

Re: [CMake] Generating dependencies with gcc -M

2010-07-04 Thread Michael Hertling
On 06/29/2010 08:40 AM, Tom Birch wrote: > > On Jun 28, 2010, at 10:09 AM, Michael Hertling wrote: > >> On 06/28/2010 05:24 AM, Tom Birch wrote: >>> CMake's dependency scanner uses its own parser to scan for #include >>> directives, and then builds up the

Re: [CMake] FindFoobar with non-root installation

2010-07-02 Thread Michael Hertling
On 07/02/2010 02:55 PM, Diablo 666 wrote: > > Hi, > > the last problem for today :) > > Assuming I develop a project called Foobar, which consists of some libraries > only. To make using these libraries easier, I'd like to create a > FindFoobar.cmake file to use with FIND_PACKAGE(). You shoul

Re: [CMake] Generating dependencies with gcc -M

2010-06-28 Thread Michael Hertling
On 06/28/2010 05:24 AM, Tom Birch wrote: > CMake's dependency scanner uses its own parser to scan for #include > directives, and then builds up the dependency tree this way. I know it's > possible to rig up an invocation of gcc -M to generate the correct > dependencies, and then feed this into t

Re: [CMake] An observation about CTest

2010-06-28 Thread Michael Hertling
On 06/28/2010 08:55 AM, Michael Wild wrote: > > On 28. Jun, 2010, at 7:03 , Andreas Mohr wrote: > >> Hello, >> >> On Sun, Jun 27, 2010 at 05:09:41PM -0400, cmake-requ...@cmake.org wrote: >>> Your remarks focus on old-fashioned macros so it is possible you are not >>> aware of functions? As far as

Re: [CMake] Eliminating spurious dependencies

2010-06-25 Thread Michael Hertling
On 06/26/2010 01:09 AM, Tom Birch wrote: > I'm using add_excecutable to generate a .s file which I then parse to > generate a header file. This all works fine and all the dependencies seem to > be working, but it gets built every time, even if nothing has changed. > > I have a function to genera

Re: [CMake] Various problems deploying a python module

2010-06-25 Thread Michael Hertling
On 06/25/2010 04:11 PM, Janosch Peters wrote: > On 2010-06-25 15:45:37 +0200, Michael Hertling said: > >> On 06/25/2010 03:17 PM, Janosch Peters wrote: >>> On 2010-06-21 07:01:36 +0200, Michael Hertling said: >>> >>>> 8d87d12 >>> >>>

Re: [CMake] Various problems deploying a python module

2010-06-25 Thread Michael Hertling
cmake.org/cmake.git cd cmake git show 8d87d12 Regards, Michael > On Fri, Jun 25, 2010 at 9:17 AM, Janosch Peters wrote: > >> On 2010-06-21 07:01:36 +0200, Michael Hertling said: >> >> 8d87d12 >>> >> >> What's that? Leet speak? >> >>

Re: [CMake] Various problems deploying a python module

2010-06-25 Thread Michael Hertling
On 06/25/2010 03:17 PM, Janosch Peters wrote: > On 2010-06-21 07:01:36 +0200, Michael Hertling said: > >> 8d87d12 > > What's that? Leet speak? No, these are the first seven and sufficiently unambiguous digits of the SHA-1 sum of the commit in CMake's Git repositor

Re: [CMake] Custom object files for intermediate build products

2010-06-24 Thread Michael Hertling
On 06/24/2010 08:29 AM, Tom Birch wrote: > Hi, > > I'm trying to invoke the C compiler in cmake as would happen with an > add_excecutable command, but I don't want to generate an object file. > Basically I have a script which generates a c file, I want to compile that > file in the environment

Re: [CMake] How to copy directory as part of custom target, filtering out .svn dirs?

2010-06-22 Thread Michael Hertling
On 06/21/2010 10:34 PM, Rick Gould wrote: > I'm looking to install a directory as part of a custom target, but > exclude all the Subversion .svn directories. > > Both of the the following work, but run as part of the "make install" > target, which I don't want: > >install( DIRECTORY ${source_

Re: [CMake] Building in stages.

2010-06-22 Thread Michael Hertling
On 06/21/2010 05:41 PM, Magnus Therning wrote: > On Mon, Jun 21, 2010 at 16:10, Michael Wild wrote: >> >>> I'm looking for some suggestions on how to tackle a problem with staged >>> builds. >>> >>> In trying to convert a project which uses omake to build OCaml files I've >>> stumbled on the issue

Re: [CMake] Linking against boost_Test fails

2010-06-22 Thread Michael Hertling
On 06/21/2010 10:19 PM, Oswin Krause wrote: >> On 06/21/2010 04:53 PM, Oswin Krause wrote: >>> Hello everybody, >>> >>> I am currently trying to write a cmake script for my testcases. Previously >>> i used a command like this: >>> >>> g++ test.cpp -lboost_test_exec_monitor-mt -L/path/to/lib/ -lsha

Re: [CMake] [patch] cmake-2.8.1 and png-1.4.2

2010-06-22 Thread Michael Hertling
On 06/20/2010 12:34 AM, Thomas Klausner wrote: > Hi! > > I've updated png in pkgsrc to 1.4.2 and had to fix some programs to > compile against that version. > > cmake didn't find the png library at all, since it was renamed There is rather a new version with a different SONAME. > (again). The a

Re: [CMake] Searching the mailing list archives

2010-06-21 Thread Michael Hertling
On 06/22/2010 05:51 AM, Philip Boltt wrote: > Hi, > > Is there a way to search the entire mailing list archive? The archive link > (http://www.cmake.org/pipermail/cmake/) goes to a page that seems to require > going into each month individually and searching the thread subjects?

Re: [CMake] Linking against boost_Test fails

2010-06-21 Thread Michael Hertling
On 06/21/2010 04:53 PM, Oswin Krause wrote: > Hello everybody, > > I am currently trying to write a cmake script for my testcases. Previously i > used a command like this: > > g++ test.cpp -lboost_test_exec_monitor-mt -L/path/to/lib/ -lshark > -I/path/to/include > > and everything worked fine.

Re: [CMake] Cmake and Libltdl

2010-06-20 Thread Michael Hertling
On 06/19/2010 09:41 AM, Carlos Lopez Gonzalez wrote: > >> On Fri, 18 Jun 2010 10:40:46 +0200 Michael Hertling wrote: > >> On 06/17/2010 11:29 AM, Carlos Lopez Gonzalez wrote: >>> Hi, >>> I'm new to cmake and want to port a C++ project which is now built u

Re: [CMake] Various problems deploying a python module

2010-06-20 Thread Michael Hertling
On 06/19/2010 12:31 PM, Janosch Peters wrote: > On 2010-06-18 08:29:25 +0200, Michael Hertling said: > >> On 06/17/2010 04:23 PM, Janosch Peters wrote: >>> I have two python frameworks on my mac: Python2.5 which comes with OS >>> X, and python2.6 from macports.

Re: [CMake] Cmake and Libltdl

2010-06-18 Thread Michael Hertling
On 06/17/2010 11:29 AM, Carlos Lopez Gonzalez wrote: > Hi, > I'm new to cmake and want to port a C++ project which is now built using > autotools to cmake build system. > The project has some libraries (we call them modules) which are used in two > applications. The applications uses lt_dladdsear

Re: [CMake] Various problems deploying a python module

2010-06-17 Thread Michael Hertling
On 06/17/2010 04:23 PM, Janosch Peters wrote: > Hi list, > > I try to write a cmake script for a python module. Its finally working > now, but the solution I came up with is not very nice. > > 1. Finding the correct python environment: > > I have two python frameworks on my mac: Python2.5 whic

Re: [CMake] CheckForPthreads.c

2010-06-16 Thread Michael Hertling
On 06/15/2010 05:07 PM, Kevin Fitch wrote: > I have been converting an existing make based build system over to cmake, > and overall I am loving it so far. > > I happened to run across CheckForPthreads.c, and was a little surprised to > see that it was basically a classic example of racy code. >

Re: [CMake] Reusing an already built object

2010-06-15 Thread Michael Hertling
On 06/13/2010 10:08 PM, Linghua Tseng wrote: > On 06/12/2010 23:30:50 Michael Hertling wrote: >> On 06/12/2010 04:10 AM, Linghua Tseng wrote: >>> ... >> Look at the following CMakeLists.txt: >> >> project(main) >> cmake_minimum_required(VERSION 2.8) &g

Re: [CMake] ${PROJECT}-config.cmake

2010-06-14 Thread Michael Hertling
On 06/14/2010 12:09 PM, Biddiscombe, John A. wrote: > Michael, > > thanks for the feedback. Following the advice given, I've modified the > project so that it generates an hdf5-config.cmake file, which checks for > If(NOT target blah blah) and then loads the hdf5-targets.cmake file. This seems

Re: [CMake] Variable Propagation

2010-06-12 Thread Michael Hertling
On 06/13/2010 02:57 AM, C. Meissa wrote: > Hello list, > > A varible ${var1} can be accessed in any subdirectory’s > CMakeLists.txt. > However, if those files change ${var1} these changes are not > accessible from the directory above. > > Is there any possibility of getting this done, anyway?

Re: [CMake] Reusing an already built object

2010-06-12 Thread Michael Hertling
On 06/12/2010 04:10 AM, Linghua Tseng wrote: > Continue the lastest post of this article: > http://www.cmake.org/pipermail/cmake/2009-October/032615.html > >> On Tuesday 13 October 2009, Alexander Neundorf wrote: >>> On Tuesday 13 October 2009, Naram Qashat wrote: >>> Say I have a main executable

Re: [CMake] Project initialization file path

2010-06-10 Thread Michael Hertling
On 06/10/2010 10:51 AM, Eric Noulard wrote: > 2010/6/9 Aby Louw : >> Hi, >> >> I have a Linux project that reads an initialization file on startup to >> get some file names and variables. >> >> When doing an in-source or out of source build, I generate the >> initialization file in the CMAKE_BINARY

Re: [CMake] [Cmake] Detect caller project for a sub-project

2010-06-10 Thread Michael Hertling
On 06/10/2010 12:18 PM, Filippo Trimoldi wrote: > If I have a CMake project organized in more than two level, i.e. > > CMakeLists.txt: > PROJECT(A) > add_subdirectories(./projectB) > > ./projectB/CMakeLists.txt: > PROJECT(B) > add_subdirectories(${PROJECT_SOURCE_DIR}/projectC) > > ./projectB/pro

Re: [CMake] How to see the generated compiler commands?

2010-06-08 Thread Michael Hertling
On 06/08/2010 07:02 PM, Torri, Stephen CIV NSWCDD, W15 wrote: >> From: cmake-boun...@cmake.org on behalf of Felipe Sodré Silva >> Sent: Tue 6/8/2010 12:43 PM >> To: cmake@cmake.org >> Subject: [CMake] How to see the generated compiler commands? >> >> >> Hi, I wrote a cmake script that generates a u

Re: [CMake] decision based on being a nested project

2010-06-08 Thread Michael Hertling
On 06/08/2010 09:00 PM, Nathan Huesken wrote: > Hi, > > As can be read in an earlier thread, I am trying to nest a cmake > project (call it "inner") into another cmake project (call it "outer"). > The "inner" project should be extracable and run as its own project. > > Having trouble with EXTERNA

Re: [CMake] dependency problem

2010-06-08 Thread Michael Hertling
On 06/08/2010 10:21 PM, Torri, Stephen CIV NSWCDD, W15 wrote: >> From: cmake-boun...@cmake.org on behalf of Yifei Li >> Sent: Tue 6/8/2010 4:15 PM >> To: cmake@cmake.org >> Subject: Re: [CMake] dependency problem >> >> Thank you for reply. >> >> I already tried that. I think the problem was caused

Re: [CMake] ${PROJECT}-config.cmake

2010-06-08 Thread Michael Hertling
On 06/07/2010 08:54 PM, Biddiscombe, John A. wrote: > Seems that just doing > > IF (NOT ${PROJECTXXX_SOURCE_DIR}) > include config file > ENDIF > > is enough and works ok. If the project is part of the same build, the source > dir is defined, otherwise not. To me, this seems not to be bulletpr

Re: [CMake] ${PROJECT}-config.cmake

2010-06-08 Thread Michael Hertling
On 06/07/2010 05:24 PM, Biddiscombe, John A. wrote: > When using the install target command as follows > > INSTALL ( > TARGETS > ${HDF5_LIB_TARGET} > EXPORT > ${HDF5_EXPORTED_TARGETS} > LIBRARY DESTINATION lib COMPONENT libraries > ARCHIVE DESTINATION

Re: [CMake] shared directory with subdirs and custom command

2010-06-04 Thread Michael Hertling
On 06/02/2010 04:23 PM, Doug Reiland wrote: > I am porting a library over to cmake. > This library is built both shared and static AND has several composite > objects that get linked in. > > For example, > > subdir-a had makefile that compiled and linked a1.c a2.c into ../a.o > > top directory l

Re: [CMake] cmake - escape/delay variable expansion

2010-06-02 Thread Michael Hertling
t; "${INPUT}" PARENT_SCOPE) ENDFUNCTION() So, e.g., set(foo \${build-dir}/foo.c) and expand(foo ${foo}) with build-dir=/tmp/src yield foo=/tmp/src/foo.c as desired. Regards, Michael > On Wed, Jun 2, 2010 at 3:06 PM, Michael Hertling wrote: >> On 06/02/2010 08:37 PM, Doug

Re: [CMake] Extending a target??

2010-06-02 Thread Michael Hertling
On 06/02/2010 07:57 PM, Doug Reiland wrote: > It all goes back to how a current Makefile for a library is setup. > I need a shared and static version of library. > > The library includes some objects built my sub-directories. In those > sub-directories, there are unique compile flags, generated fi

Re: [CMake] cmake - escape/delay variable expansion

2010-06-02 Thread Michael Hertling
On 06/02/2010 08:37 PM, Doug Reiland wrote: > Sorry for another newbie question. > > Say, to setup a variable as follow so ${build-dir} doesn't get expanded > set(foo \${build-dir}/foo.c) > > How would a expand foo so ${build-dir} gets expanded? STRING(REPLACE "\${build-dir}" "xyz" foo "${foo}")

Re: [CMake] Enabling compiler flags for one file ONLY.

2010-06-01 Thread Michael Hertling
On 06/02/2010 04:24 AM, Clark Gaebel wrote: > I have a massive .cpp file that has been autogenerated ahead of time. > However, whenever I build it, according to gcc timing information, it > spends all its time in "variable tracking". Therefore, I would like to > enable the flag -fno-var-tracking fo

Re: [CMake] Set variable value based on generated files

2010-06-01 Thread Michael Hertling
On 06/01/2010 09:57 PM, Michael Wild wrote: > > On 1. Jun, 2010, at 17:02 , Hariharan wrote: > >> I do use ADD_CUSTOM_COMMAND to generate the files, but the actual generation >> is done by a different Perl script. In some cases, there is no direct >> correlation between the name of the source fil

<    2   3   4   5   6   7   8   >