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

2010-06-02 Thread Michael Hertling
, Michael On Wed, Jun 2, 2010 at 3:06 PM, Michael Hertling mhertl...@online.de wrote: 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

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 linked in

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 lib

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 bulletproof:

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 by

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

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 unix makefile

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)

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 jal...@csir.co.za: 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

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 and a

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] ${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 to

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) add_library(gen1 STATIC src1.c) set(gen_src2_SRCS gen_src2

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. The

Re: [CMake] Various problems deploying a python module

2010-06-18 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 which comes

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

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. If I just use FIND_PACKAGE(PythonInterp

Re: [CMake] Cmake and Libltdl

2010-06-21 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 using autotools to cmake build system. The project

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. Now

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] [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

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/ -lshark

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 them...@gmail.com 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] 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 I've

Re: [CMake] Various problems deploying a python module

2010-06-25 Thread Michael Hertling
show 8d87d12 Regards, Michael On Fri, Jun 25, 2010 at 9:17 AM, Janosch Peters j...@binford3000.de wrote: On 2010-06-21 07:01:36 +0200, Michael Hertling said: 8d87d12 What's that? Leet speak? -- Janosch ___ Powered by www.kitware.com Visit

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 What's that? Leet speak? No, these are the first seven and sufficiently

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 generate

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 I know, most

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 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 should use a

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 dependency tree this way. I know it's possible

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 CMake

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 mhertl...@online.dewrote: IMO, things aren't sooo bad. ;-) [100 lines of explanation of how SET() behaves in 6 different ways elided] I think you've just proven my point. Thanks

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 cg.wowus...@gmail.com wrote: I would like to generate file that looks something like this: // version.h #define VERSION

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.sql

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: ADD_CUSTOM_COMMAND(OUTPUT privilege_tables.sql

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 them...@gmail.com 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 them...@gmail.com wrote: On 8. Jul, 2010, at 7:25

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 long as it won't change, version.h

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 a cache variable, ie, SET(PROJB_OPENCV_LINK NO CACHE

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} /c)

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 incorporated

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 of the target, VersionInfo.cpp does not get recompiled

Re: [CMake] CMAKE_LANG_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 FLAGS 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_LANG_FLAGS is. The book

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 gets

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 mhertl...@online.de wrote: On 07/10/2010 06:54 PM, Paul Harris wrote: On 9 July 2010 22:39, Michael Wild them...@gmail.com wrote: On 9. Jul, 2010, at 15:48 , Michael Hertling wrote: On 07/08/2010 09:47 AM

Re: [CMake] Transitive Link Dependencies

2010-07-14 Thread Michael Hertling
. Regards, Michael On Wed, Jul 14, 2010 at 9:13 AM, Michael Hertling mhertl...@online.dewrote: 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

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 original

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 idea

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 take FindPythonLibs and FindPythonInterp, and change

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 number.

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 CMake find trouble for a long time, and I

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. http://www.cmake.org/Wiki/CMake_RPATH_handling In particular: By default if you don't change any RPATH related settings, CMake will

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. Irwin wrote: On 2010-07-20 00:51+0200 Michael Hertling

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 target Kelly,

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, Alan W. Irwin wrote: On 2010-07-20 17:12+0200 Michael

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 version number

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 -0700, Alan W. Irwin wrote: On 2010-07-20 17:12+0200 Michael Hertling

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 Michael and others, I mostly agree with what your saying. However, IMHO, you refer

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: There's a slightly nicer work-around: Change project

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] 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 effort [...]. Hi Michael: I think find

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

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

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. [ d042 ] make

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 http://www.mail-archive.com/cmake@cmake.org/msg28536.html, you will find some considerations w.r.t. requesting required and

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] 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) which creates the ApplicationVersion.xml file

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

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 http://www.mail-archive.com/cmake@cmake.org/msg16767.html

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 string.h #include stdio.h void main(){ char buf[100]; char buf2[100]; strncpy(buf2, buf, 5); buf2[5] = '\0';

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 he

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 kbe...@sandia.gov: 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

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 kbe...@sandia.gov: Apologies if this has been answered before. In an effort to ensure cross-platform consistent results, I need to force some (C++ and Fortran)

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 Pavlikrpav...@iastate.edu: 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

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/ compiler/

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 imported

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_FOR_TEST

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 NAMES nspr4

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 nonstandard

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 libraries

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] 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 them...@gmail.com: 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] 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] 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 performed

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 target On

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

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) add_executable(MyExe

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 here

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] 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

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() it

Re: [CMake] How to set compiler flags?

2010-09-28 Thread Michael Hertling
On 09/28/2010 05:35 PM, David Aldrich wrote: Hi I am writing CMakeLists.txt files for my C++ application. Initially I set the C++ compiler flags by setting CMAKE_CXX_FLAGS: set( CMAKE_CXX_FLAGS -Wall -m64 -O3 ) Then I realised that those flags get passed to the linker as well, which

Re: [CMake] embedding lib into a shared object

2010-09-29 Thread Michael Hertling
On 09/29/2010 12:26 PM, Ovanes Markarian wrote: Hello *, I have some library available as a Linux lib file. Now I need to create a shared object (actually a MODULE in terms of CMake) out of this lib. The module is later on loaded using the dlopen-API function. I created a sample project

Re: [CMake] How to specify -fpic ?

2010-09-29 Thread Michael Hertling
On 09/29/2010 06:25 PM, David Aldrich wrote: Hi My C++ code consists of an executable and several shared libraries. With my CMake build files, I find that the executable fails to load the shared libraries ( the dlopen() call results in error 'undefined symbol...' ). The software works

Re: [CMake] Separate CXXFLAGS and LDFLAGS

2010-10-01 Thread Michael Hertling
On 10/01/2010 03:55 PM, Marek Szuba wrote: Hello, How can one define C++ compiler flags which are used ONLY at compile time? Traditional LDFLAGS appear to clearly map to CMAKE_xxx_LINKER_FLAGS, however CMAKE_CXX_FLAGS work differently from what I would like - they are passed to both the

Re: [CMake] Following dependencies through generated header file

2010-10-01 Thread Michael Hertling
On 10/01/2010 10:56 PM, Óscar Fuentes wrote: A file `foo.cpp' has this: #include bar.inc `bar.inc' is a generated file, and is marked as such. It is generated processing a file `zoo.cpp' with an utility executed through a custom command. It would be very convenient to inspect the

Re: [CMake] QT4 and MOC

2010-10-02 Thread Michael Hertling
On 10/02/2010 09:07 AM, Laszlo Papp wrote: Hi, I wrote a helloworld class, source and header file for instance which is basically moc related class with Q_OBJECT macro. I do not know why I must use qt4_wrap_cpp(helloworld.h) beside qt4_automoc(helloworld.cpp). There's no need to use both.

Re: [CMake] Following dependencies through generated header file

2010-10-02 Thread Michael Hertling
On 10/03/2010 02:01 AM, Óscar Fuentes wrote: Michael Hertling mhertl...@online.de writes: It would be very convenient to inspect the header files referenced from `zoo.cpp' and associate them with `bar.inc', so when some of those header files are touched `bar.inc' (and hence `foo.cpp

Re: [CMake] Get configuration-dependant LOCATION property

2010-10-04 Thread Michael Hertling
On 10/04/2010 10:53 AM, Mateusz Loskot wrote: On 04/10/10 07:33, J Decker wrote: CMAKE_INSTALL_CONFIG_NAME I don't know if there's a simple flag like 'project supports multiple targets' so I have an if(MSVC) set( MULTI_TARGET) endif() if( MULTI_TARGET ) Install( targets ...

Re: [CMake] [windows][fortran][Unix Makefiles] Bug with CMAKE_AR expansion

2010-10-04 Thread Michael Hertling
On 10/04/2010 02:14 PM, Maik Beckmann wrote: The problem seem to be triggered the fact that the toplevel CMakeLists.txt ( http://gitorious.org/hdf5/hdf5-v18/blobs/master/CMakeLists.txt ) contains PROJECT (HDF5 C CXX) and another CMakeLists.txt in a subdirectory (

<    1   2   3   4   5   6   7   8   >