Re: [CMake] Post-process compiler output

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

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

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

Re: [CMake] unexpected INSTALL problems

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

Re: [CMake] unexpected INSTALL problems

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

Re: [CMake] unexpected INSTALL problems

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

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

2011-06-16 Thread Michael Hertling
On 06/16/2011 03:18 PM, Glenn Coombs wrote: > On 13 June 2011 02:53, Michael Hertling wrote: > >> >> AFAIK, there's no other approach to take account of single- and multi- >> config generators at the same time for this purpose, but perhaps, you >>

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

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

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

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

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

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

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

2011-06-22 Thread Michael Hertling
On 06/22/2011 10:32 PM, David Cole wrote: > On Wed, Jun 22, 2011 at 4:24 PM, Hauke Heibel > wrote: > >> On Wed, Jun 22, 2011 at 10:09 PM, Michael Hertling >> wrote: >>> You might use -DMY_VARIABLE="${ARGUMENTS}" without VERBATIM, and >>> SEPARATE_

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

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

Re: [CMake] Enabling C99 in CMake

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

Re: [CMake] Enabling C99 in CMake

2011-06-23 Thread Michael Hertling
On 06/23/2011 05:09 AM, Todd Gamblin wrote: > On Jun 22, 2011, at 3:46 PM, Michael Hertling wrote: > >> Wouldn't a simple >> >> CC="gcc -std=c99" cmake >> >> for the initial configuration be an appropriate solution? > > I would say no, be

Re: [CMake] Enabling C99 in CMake

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

Re: [CMake] Enabling C99 in CMake

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

Re: [CMake] Enabling C99 in CMake

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

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

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

Re: [CMake] Multiple output directories

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

Re: [CMake] Multiple output directories

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

Re: [CMake] [CMake ] Specify linker for a mixed language Fortran/C++ application (linux)

2011-06-29 Thread Michael Hertling
On 06/29/2011 10:04 AM, Yngve Inntjore Levinsen wrote: > Tirsdag 28 juni 2011 18.52.48 skrev Raphael Muenster : >> Yep, great) setting the LINKER_LANGUAGE to Fortran did it. >> >> Thanks, >> Raphael >> >> Am 28.06.2011 15:48, schrieb Brad King: >>> On 06/27/2011 02:39 PM, Raphael Münster wrote: >>

Re: [CMake] umask settings?

2011-06-29 Thread Michael Hertling
On 06/29/2011 10:01 PM, Clifford Yapp wrote: > I'm noticing that a make install done with CMake is not respecting > umask settings on Linux - is there some setting I need to tweak to get > it to do so? > > Thanks, > CY http://www.mail-archive.com/cmake@cmake.org/msg29928.html Regards, Michael _

Re: [CMake] How to link specific static libraries

2011-06-29 Thread Michael Hertling
On 06/29/2011 02:32 PM, Michael Wild wrote: > On 06/29/2011 02:30 PM, Stephen Torri wrote: >> Normally we use target_link_libraries to link against certain libraries. >> For example: >> >> target_link_libraries ( mytarget A B C ) >> >> Well when I am working on creating regressions tests for my

Re: [CMake] Enabling C99 in CMake

2011-06-30 Thread Michael Hertling
On 06/26/2011 04:12 PM, Owen Shepherd wrote: > On 25/06/2011 07:30, "Michael Hertling" wrote: > >> On 06/24/2011 04:16 PM, Owen Shepherd wrote: >>> I think the appropriate solution here is a project-specific dialect >>> flag - >>> perhaps one tak

Re: [CMake] Enabling C99 in CMake

2011-06-30 Thread Michael Hertling
On 06/27/2011 06:34 PM, Todd Gamblin wrote: > On Jun 24, 2011, at 11:30 PM, Michael Hertling wrote: > >> On 06/23/2011 06:20 PM, Jed Brown wrote: >>> On Thu, Jun 23, 2011 at 17:50, Michael Hertling wrote: >>> >>>> You need to use a C99 compiler for

Re: [CMake] Enabling C99 in CMake

2011-06-30 Thread Michael Hertling
On 06/27/2011 07:07 PM, Rolf Eike Beer wrote: > Michael Hertling wrote: > >> SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/c89.c >> PROPERTIES COMPILE_FLAGS ${CMAKE_C_DIALECT_C89}) >> SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/c99.c >> PROPERTIES COMPI

Re: [CMake] Strange behaviour with -D option

2011-07-02 Thread Michael Hertling
On 07/01/2011 12:02 PM, pellegrini wrote: > Hello everybody, > > there is a behaviour I do not understand when using cmake with -D option. > > In my project I defined a few CACHE variables. One of them is GUI to > specify whether or not my project should be > built with graphical library support

Re: [CMake] install( TARGETS module ...)

2011-07-02 Thread Michael Hertling
On 07/01/2011 03:32 PM, Mathieu Malaterre wrote: > Dear all, > > I am trying to change the default behavior of cmake which installs > MODULE to the LIBRARY destination. For example: > > ... > add_library(test MODULE test.c) > install(TARGETS test > RUNTIME DESTINATION bin > LIBRARY DESTINAT

Re: [CMake] Install targets

2011-07-03 Thread Michael Hertling
On 07/02/2011 04:34 AM, Tim Gallagher wrote: > Hi, > > We have a project that has a main executable and dozens of utility > executables that may or may not be needed. We can add an executable for each > util with EXCLUDE_FROM_ALL defined so just typing make only does the main > code and somethi

Re: [CMake] Download and Build external dependencies

2011-07-03 Thread Michael Hertling
On 07/01/2011 01:48 PM, Martin Köhler wrote: > Hi, > I'm currently trying to write a cmake script, which downloads some > source code and compile it during the configuration step. In my case > this I want to try it with BLAS from netlib.org because it represents > the problem in a good way ( and I

Re: [CMake] Remove custom targets

2011-07-04 Thread Michael Hertling
On 07/05/2011 01:40 AM, Glenn Coombs wrote: > If you can modify the subdirectory cmakefiles then maybe you could protect > the declaration of the uninstall target like this: > > if (NOT TARGET uninstall) > add_custom_target(uninstall ...) > endif() > > That way if the top level cmakefile decl

Re: [CMake] set(... CACHE ) broken for CMAKE_C_FLAGS_{DEBUG, RELEASE, ...} ?

2011-07-06 Thread Michael Hertling
On 07/06/2011 03:41 PM, Jerry Gagelman wrote: > I'm redistributing a library for which the original authors have hand coded > their own Makefile, but I would like to streamline everything with CMake. > Their Makefile provides for Debug and Release flavored configurations, each > has its own set of

Re: [CMake] New Module: FindSDL_gfx.cmake

2011-07-07 Thread Michael Hertling
On 07/07/2011 12:23 AM, David Cole wrote: > Many people care. Few have time to respond to everything on the CMake > mailing list... > > This is how to become a CMake module maintainer if it is necessary: > http://www.cmake.org/Wiki/CMake:Module_Maintainers > > Looks like Eric Wing is the maintain

Re: [CMake] Trying to generate a source that depends on a library target's object files.

2011-07-07 Thread Michael Hertling
On 07/07/2011 02:43 PM, Luke Dalessandro wrote: > Hi Everyone, > > I have the following build dependencies that I'm trying to implement in cmake. > > The ultimate target of the build is an archive library, libme.a. > > libme.a is composed of a number of static source files, (s1.cpp, ..., > sn.c

Re: [CMake] How do I select a different lib based on the configuration of the consuming project?

2011-07-09 Thread Michael Hertling
On 07/08/2011 11:57 PM, Benjamin Lindley wrote: > I made a library named Zik. I compiled it in both release and debug > mode in Visual Studio, then installed it like this: > > Zik > |--source > |--build > +--distribution > |--include > +--bin >+--Visual Studio 10 > |--Z

Re: [CMake] Magical transformation of /path/to/libmylib.so to -lmylib

2011-07-11 Thread Michael Hertling
On 07/11/2011 11:34 PM, Jens Mueller wrote: > Hi, > > I'm trying to figure out where the path for a found library is changed. > In my case Curses is found at /usr/lib/libcurses.so. When linking with > gcc "/usr/lib/libcurses.so" is replaced by "-lcurses" as it is specified > at http://www.cmake.or

Re: [CMake] Addition to FindGit

2011-07-12 Thread Michael Hertling
On 07/12/2011 09:35 AM, Eric Noulard wrote: > 2011/7/12 Thomas Petazzoni : >> Hello, >> >> Le Sun, 05 Jun 2011 11:02:00 +0200, >> Quintus a écrit : >> >>> I'm working on a git-versioned project that I'd like to display it's >>> version number for development versions like this: >>> >>> 1.2.3-dev (

Re: [CMake] Add linker command file to object files

2011-07-13 Thread Michael Hertling
On 07/13/2011 10:56 AM, Florian Reinhard wrote: > Hi! > > Problem: > I need to have a linker command file among the list of object files in > a fixed order. > > Setup: > Cmake 2.8.5 > custom non-gnu texas instruments cl6x toolchain > > Ideas: > I figured that the object files list which one spec

Re: [CMake] Magical transformation of /path/to/libmylib.so to -lmylib

2011-07-13 Thread Michael Hertling
On 07/14/2011 12:54 AM, Jens Mueller wrote: > Michael Hertling wrote: >> On 07/11/2011 11:34 PM, Jens Mueller wrote: >>> Hi, >>> >>> I'm trying to figure out where the path for a found library is changed. >>> In my case Curses is found at /usr/lib

Re: [CMake] Linker Path Issues: /usr/local/lib

2011-07-14 Thread Michael Hertling
On 07/14/2011 07:19 PM, Ryan Farrell wrote: > Hi everyone, > > I'm using cmake to try and Build the latest release of OpenCV (2.3), but > am encountering an error. It's important to know that this is on a > shared cluster machine where I don't have root access. I've therefore > built and install

Re: [CMake] Setting the installation order of a script

2011-07-15 Thread Michael Hertling
On 07/14/2011 02:34 PM, David Cole wrote: > The only way to guarantee that your install SCRIPT and CODE segments > run last is to put them in their own subdirectory, and add it last. > > i.e. : > dir3/CMakeLists.txt: > INSTALL (SCRIPT setpermissions.cmake) > > CMakeLists.txt: > ADD_SUBDIRECTORY(d

Re: [CMake] test linker flags?

2011-07-24 Thread Michael Hertling
On 07/15/2011 03:15 AM, Clifford Yapp wrote: > Is there a way to test flags supplied to the linker > (CMAKE_SHARED_LINKER_FLAGS) in the same way we can test compiler flags > with CHECK_C_COMPILER_FLAG? I'd like to check if -Wl,--no-undefined > works or not before using it. > > Cheers, > CY You m

Re: [CMake] Add linker command file to object files

2011-07-24 Thread Michael Hertling
On 07/20/2011 02:19 PM, Florian Reinhard wrote: > Hi Michael, > > Thank you for that long and well explained resonse! > > I just gave your EXTERNAL_OBJECT approach with a patched cmake version a try. > > Unfortunately this is just almost a solution. That way the linker.cmd > appears in the list

Re: [CMake] Setting the installation order of a script

2011-07-28 Thread Michael Hertling
On 07/15/2011 05:41 PM, David Cole wrote: > On Fri, Jul 15, 2011 at 10:55 AM, Michael Hertling > wrote: >> On 07/14/2011 02:34 PM, David Cole wrote: >>> The only way to guarantee that your install SCRIPT and CODE segments >>> run last is to put them in their own

Re: [CMake] Is it possible to call or include CMakeCache from another CMakeCache?

2011-07-28 Thread Michael Hertling
On 07/19/2011 05:50 PM, Kevyn-Alexandre Paré wrote: > Hi David, > > thx for the reply see below. > > On 2011-07-19, at 6:41 AM, David Cole wrote: > >> On Mon, Jul 18, 2011 at 3:51 PM, Kevyn-Alexandre Paré >> wrote: >>> Hi, >>> >>> Is it possible to call or include CMakeCache from another CMakeC

Re: [CMake] Generating C++ code from Idl language with variable number of files as output

2011-07-28 Thread Michael Hertling
On 07/20/2011 03:00 PM, Clifford Yapp wrote: > On Mon, Jul 18, 2011 at 8:42 AM, Valentin-Daniel Boca > wrote: > >> gen_code xxx.idl -> xxxIdl.h, xxxIdl.cc, xWrappers.h and xxxWData.h >> >> So for every "keyword struct" there is one more file generated. The first >> three files are always the same

Re: [CMake] LINK_DIRECTORIES visual studio 2010

2011-07-29 Thread Michael Hertling
On 07/29/2011 05:13 PM, Louis Hoefler wrote: > Hello everyone. > I have a simple CMake file > > cmake_minimum_required(VERSION 2.8) > > IF(DEFINED USEFCGI) > SET(BACKENDLIB wtfcgi) > ELSE(DEFINED USEFCGI) > SET(BACKENDLIB wthttp) > ENDIF(DEFINED USEFCGI) > > ADD_EXECUTABLE(construction.wt >

Re: [CMake] Cross Compiling with cmake 2.8.5

2011-07-29 Thread Michael Hertling
On 07/27/2011 04:28 PM, r.cze...@esa-grimma.de wrote: > Hi all, > > I tried to cross-compile an internal application for windows on a linux > machine, > but failed, because cmake at some point re-start the configure process, > and > drops the CMAKE_SYSTEM_NAME variable along that way. Attached i

Re: [CMake] TARGET_LINK_LIBRARIES debug optimized visual studio 2010

2011-07-29 Thread Michael Hertling
On 07/29/2011 06:22 PM, Louis Hoefler wrote: > I tried that and now I get > for the debug libraries: > ...;wtdwthttpd.lib;... > for the release libraries: > ...;wtwthttp.lib;... > > I want it to look like > ...;wt.lib;wthttp.lib;... or ...;wtd.lib;wthttpd.lib;... > my version somehow adds one rele

Re: [CMake] TARGET_LINK_LIBRARIES debug optimized visual studio 2010

2011-07-29 Thread Michael Hertling
On 07/30/2011 12:06 AM, Michael Hertling wrote: > On 07/29/2011 06:22 PM, Louis Hoefler wrote: >> I tried that and now I get >> for the debug libraries: >> ...;wtdwthttpd.lib;... >> for the release libraries: >> ...;wtwthttp.lib;... >> >> I want it

Re: [CMake] Install files quietly

2011-07-29 Thread Michael Hertling
On 07/29/2011 11:43 AM, Mathias Tausig wrote: > Hello! > > During the installation process, I am copying a quite large directory using > INSTALL(DIRECTORY foo DESTINATION bar) > > When I run make install, every single file contained in foo is displayed > in the shell. Is there some way to prevent

Re: [CMake] LIBRARY_OUTPUT_PATH for Dynamic and Static Libraries

2011-07-29 Thread Michael Hertling
On 07/28/2011 06:21 PM, Eric Noulard wrote: > 2011/7/28 Julien Dardenne >> >> Hi, >> >> I compile my libraries into dynamic and static. >> I now wish to change the library path. If I am in static (folder : lib ) and >> dynamic (folder : dll). >> >> For now, i have this script : >> >> OPTION (BUIL

Re: [CMake] Invalid library output directory when VC++ solution is generated

2011-07-29 Thread Michael Hertling
On 07/27/2011 01:03 PM, Laura Autón García wrote: > Hello glenn, > Thank you for your answer. > I misunderstood the documentation. Thank you for pointing this out! > > Documentation: > "...For DLL platforms the DLL part of a shared library is treated as a > runtime target and the corresponding imp

Re: [CMake] Linking problem

2011-07-29 Thread Michael Hertling
On 07/27/2011 01:14 PM, Sanatan Rai wrote: > Hi, >This is a newbie question. So apologies in advance if this is covered > somewhere in the docs (I haven't been able to find a satisfactory > explanation). > > The issue is this: > > * I have a library called (lib)atmath as per: > > include_di

Re: [CMake] Problem with regular expression

2011-07-29 Thread Michael Hertling
On 07/15/2011 10:10 AM, Sven Klomp wrote: > Hi, > > I'm using cmake 2.8.3 and have a problem using regular expressions: > > STRING(REGEX REPLACE > "^(Input:[0-9]+:)([^/].*)$" > "_Start_\\1_Middle_\\2_End_" > TESTVARIABLE > "Input:1:filename1 \nInput:104:filename2 \n" >

Re: [CMake] Regenerating project files based on external file.

2011-08-02 Thread Michael Hertling
On 08/01/2011 07:13 PM, The Novice Coder wrote: > > The short version of what I'm trying to do: > Add some kind of definition to the cmake file that specifies a file, > that if modified, will cause the project to be regenerated. > > > Longer (more specific) version. > We (our small program team

Re: [CMake] Checking for compatible compiler flags

2011-08-07 Thread Michael Hertling
On 08/07/2011 09:33 PM, Hans Johnson wrote: > Hello, > > I'm trying to use the cmake feature for testing if compiler flags are valid, > but I am running into trouble with these two complier flags. I can not > figure out how to proper escape the "+" or the "%" that I believe are > causing the fail

Re: [CMake] Overriding C compiler flags in CMakeLists files

2011-08-09 Thread Michael Hertling
On 08/09/2011 04:43 PM, Michael Wild wrote: > Well, directory properties are used by _targets_ defined in that > directory. It doesn't matter where the sources are located. > > Michael Additionally, setting a source property in the leaf CMakeLists.txt files as it has been suggested in this thread

Re: [CMake] Unable to locate boost_unit_test_framework-vc90-mt-gd-1_45.lib

2011-08-10 Thread Michael Hertling
On 08/10/2011 04:27 PM, Stephen Torri wrote: > I am having a problem setting up CMake to find the Boost unit test framework > library when building a test program. In the top level CMakeLists.txt file I > have: > > ENABLE_TESTING() > > add_subdirectory ( path/to/test ) > > In the test directory

Re: [CMake] append command

2011-08-11 Thread Michael Hertling
On 08/11/2011 05:20 PM, Michael Wild wrote: > On Thu 11 Aug 2011 04:46:44 PM CEST, David Cole wrote: >> On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs > > wrote: >> >> The problem is that we currently already have 2 parallel systems. >> Some of the variables l

Re: [CMake] append command

2011-08-11 Thread Michael Hertling
On 08/11/2011 08:37 PM, Michael Wild wrote: > On 08/11/2011 07:48 PM, Michael Hertling wrote: >> On 08/11/2011 05:20 PM, Michael Wild wrote: >>> On Thu 11 Aug 2011 04:46:44 PM CEST, David Cole wrote: >>>> On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs >>>

Re: [CMake] append command

2011-08-11 Thread Michael Hertling
On 08/11/2011 10:04 PM, Alexander Neundorf wrote: > On Thursday 11 August 2011, Michael Hertling wrote: > ... >> Alternatively, one might consider to introduce a new, say, >> modifier "CONCAT" for the SET() command, e.g. >> >> SET( ... CONC

Re: [CMake] Unable to locate boost_unit_test_framework-vc90-mt-gd-1_45.lib

2011-08-15 Thread Michael Hertling
On 08/11/2011 04:30 PM, Stephen Torri wrote: > On Wed, Aug 10, 2011 at 9:51 PM, Michael Hertling wrote: > >> On 08/10/2011 04:27 PM, Stephen Torri wrote: >>> I am having a problem setting up CMake to find the Boost unit test >> framework >>> library when build

Re: [CMake] RPATH/RUNPATH

2011-08-18 Thread Michael Hertling
On 08/17/2011 10:03 PM, Knox, Kent wrote: > Yes, that's right. I'm currently using cmake with RPATH, but from what I've > been reading the RUNPATH header is now the more preferred approach. If the > user does not set LD_LIBRARY_PATH, the RUNPATH header should take effect, but > if the user DOE

Re: [CMake] remove compile flag with set_source_file_properties

2011-08-18 Thread Michael Hertling
On 08/17/2011 10:55 AM, Florian Reinhard wrote: > Hi! > > My cmake project (using the texas instruments cl6x compiler) contains > two configurations, release and debug: > > > set(CMAKE_C_FLAGS "-whatever -flags") > set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS}) > > > set(CMAKE_C_FLAGS

Re: [CMake] Pseudo library

2011-08-22 Thread Michael Hertling
On 08/20/2011 04:33 AM, ☂Josh Chia (谢任中) wrote: > I have a C++ .h file with template classes that require the Python and > Boost-Python libraries for successful linking. There is no associated .cpp > file. > > I consider this .h file a library that other parts of my project can use. > The CMakefil

Re: [CMake] INSTALL and Up-to-date problem

2011-08-24 Thread Michael Hertling
On 08/24/2011 11:00 AM, Florian Stinglmayr wrote: > Hello List! > > I have a rather unusual setup of graphic files: > > someexe/gfx/ > -- *.png > -- variant1 > -- -- subvariant1 > -- -- -- *.png > -- variant1 > -- -- subvariant2 > -- -- --*.png > -- variant2 > etc. > > So I have a general graphi

Re: [CMake] configuration based add_custom_command

2011-08-24 Thread Michael Hertling
On 08/24/2011 11:04 AM, Robert Bielik wrote: > Michael Wild skrev 2011-08-23 11:29: >> The easiest way around this I can see is to wrap the command in a >> CMake-script like this: >> >> add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/someFile.txt >>COMMAND ${CMAKE_COMMAND} >> -DCONFI

Re: [CMake] [CMAKE] Problem when moving an executable with a shared library

2011-08-24 Thread Michael Hertling
On 08/23/2011 06:11 PM, Renato Utsch wrote: > Hello CMake Experts! > > I don't know if it's here that I have to ask, so if I'm wrong, please tell > me. > > > I'm having a problem with CMake. Let me explain: > > I use CMake to build a program and a shared library (let me say, "hello" and > "libh

Re: [CMake] configuration based add_custom_command

2011-08-24 Thread Michael Hertling
On 08/24/2011 01:47 PM, Robert Bielik wrote: > Robert Bielik skrev 2011-08-24 13:43: >> Michael Hertling skrev 2011-08-24 13:13: >>> Suppose >>> >>> ADD_CUSTOM_COMMAND(OUTPUT source.c CONFIGURATION Release COMMAND ...) >>> ADD_EXECUTABLE(main

Re: [CMake] Re-setting CMAKE_C_COMPILER on command line discards CMAKE_C_FLAGS

2011-08-26 Thread Michael Hertling
On 08/25/2011 06:05 PM, Jed Brown wrote: > $ cmake .. '-DCMAKE_C_COMPILER:FILEPATH=mpicc' '-DCMAKE_C_FLAGS:STRING= > -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas' > [no problems] > $ grep CMAKE_C_FLAGS:STRING CMakeCache.txt > CMAKE_C_FLAGS:STRING= -Wall -Wwrite-strings -Wno-stric

Re: [CMake] Install optional targets

2011-08-28 Thread Michael Hertling
On 08/29/2011 01:20 AM, Tim Gallagher wrote: > Hi, > > I asked about this awhile back and haven't had any luck with it, so I'll try > again. > > What we are trying to do is have a project (called Utilities) that has a > bunch of targets (the actual utility executables). Let's say there are 4 >

Re: [CMake] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"

2011-08-29 Thread Michael Hertling
On 08/29/2011 02:37 PM, Marcus Fritzsch wrote: > Turns out, using the "verbose" form of the option definition > -DOPTION:TYPE=... does not exhibit the issue. > > On 8/29/11, Marcus Fritzsch wrote: >> I discovered this behavior on my ubuntu 11.04 amd64 workstation with >> cmake 2.8.3 when trying t

Re: [CMake] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"

2011-08-30 Thread Michael Hertling
On 08/30/2011 12:04 PM, Marcus Fritzsch wrote: > Hallo again. > > On 8/30/11, Marcus Fritzsch wrote: >> [...] >>% cmake "-DCMAKE_CXX_FLAGS=-O3 -march=native" .. >>... >>% grep "CXX_FLAGS=" CMakeCache.txt >>CMAKE_CXX_FLAGS=-O3 -march:UNINITIALIZED=native > > Having done some more

Re: [CMake] find_package with config file always set xyz_FOUND to true?

2011-08-30 Thread Michael Hertling
On 08/30/2011 12:02 AM, Anton Deguet wrote: > Hello, > > I am trying to use the following syntax: > find_package (xyz REQUIRED xyz1 xyz2) using a config file, i.e. NOT > Findxyz.cmake. > > I have a file named xyz-config.cmake that contains some code to check if the > required components are ava

Re: [CMake] Remove a library from linking which was added with target_link_libraries

2011-08-30 Thread Michael Hertling
On 08/24/2011 06:19 PM, Lars Bilke wrote: > Dear CMake-users, > > is it possible to remove a library which is linked to a target. The library > linkage was added with the target_link_libraries command. Because of that > this command gets called by a third party cmake script removing the command

Re: [CMake] Running unit test as part of the build

2011-09-13 Thread Michael Hertling
On 09/13/2011 11:05 AM, Michael Wild wrote: > On 09/12/2011 09:06 PM, Erik Johansson wrote: >> On Mon, Sep 12, 2011 at 20:30, Michael Wild wrote: >>> How about using a custom command that runs the unit test using a >>> wrapper script that upon successful completion creates a stamp-file and >>> dep

Re: [CMake] Getting the source file list for an executable fails

2011-09-15 Thread Michael Hertling
On 09/16/2011 02:59 AM, Campbell Barton wrote: > Hi, I would expect this would work from reading the docs but it gives > > add_executable(mytarget ${SRC}) > get_property(TESTPROP_A TARGET mytarget PROPERTY SOURCE) > get_target_property(TESTPROP_B mytarget SOURCE) > messag

Re: [CMake] Correct way to link with libstdc++ from non-C++ project?

2011-09-16 Thread Michael Hertling
On 09/15/2011 06:39 PM, Jed Brown wrote: > Suppose project Foo depends on a library Bar that uses C++ internally, but > was not properly linked, so foo would need to be linked with > > 1. $CC -shared -o libfoo.so *.o -lbar -lstdc++ > > or > > 2. $CXX -shared -o libfoo.so *.o -lbar > > > Note t

Re: [CMake] Getting the source file list for an executable fails

2011-09-16 Thread Michael Hertling
On 09/16/2011 03:24 AM, Campbell Barton wrote: > On Fri, Sep 16, 2011 at 11:11 AM, Michael Hertling > wrote: >> On 09/16/2011 02:59 AM, Campbell Barton wrote: >>> Hi, I would expect this would work from reading the docs but it gives >>> >>&

Re: [CMake] Getting the source file list for an executable fails

2011-09-18 Thread Michael Hertling
On 09/17/2011 03:01 PM, Campbell Barton wrote: > On Sat, Sep 17, 2011 at 10:36 AM, Michael Hertling > wrote: >> On 09/16/2011 03:24 AM, Campbell Barton wrote: >>> On Fri, Sep 16, 2011 at 11:11 AM, Michael Hertling >>> wrote: >>>> On 09/16/2011 02:59 AM

Re: [CMake] providing your own exp file on AIX

2011-09-19 Thread Michael Hertling
On 09/14/2011 04:38 PM, Domen Vrankar wrote: > Hi, > > I'm trying to use my own exp file for linking of a shared library on AIX. > Currently CMake generates an objects.exp file and I don't know how to > replace it with my own that was used in Makefile files before I switched to > CMake and contain

Re: [CMake] Specify the link command in CMake

2011-09-19 Thread Michael Hertling
On 09/13/2011 11:01 AM, Federico Carminati wrote: > Hello Eric, >sorry for not having changed the subject, I realize it only now. Thanks > for your answer. I am trying to use clang / clang++. This works if I do > > cmake $MY_SOURCE_DIRECTORY -DCMAKE_C_COMPILER=clang > -DCMAKE_CXX_COMPILER

Re: [CMake] Second post: find_package with config file always set xyz_FOUND to true?

2011-09-19 Thread Michael Hertling
On 09/19/2011 07:09 PM, Anton Deguet wrote: > Hello, > > I haven't heard anything following my previous post. Is there any chance > someone could provide some guidance? > > Sincerely, > > Anton > > On Aug 29, 2011, at 6:02 PM, Anton Deguet wrote: > >> Hello, >> >> I am trying to use the foll

Re: [CMake] not found library with package configuration files and changed CMAKE_INSTALL_PREFIX

2011-09-20 Thread Michael Hertling
On 09/20/2011 11:26 AM, Alexander Dahl wrote: > Hello there, > > after using FindFOO.cmake scripts for our own projects for a long time > I'm trying to migrate this to the "real" CMake approach of package > configuration files. Therefor I read chapter 5.7 of the book »Mastering > CMake« and two H

Re: [CMake] VS2005: CMAKE_CXX_FLAGS not used when project() is placed after definition

2011-09-20 Thread Michael Hertling
On 09/20/2011 03:40 PM, Jens Auer wrote: > Hi, > > I encountered a problem with CMAKE_CXX_FLAGS and the place in the > CMakeLists.txt where the project() command is placed. Consider two > CMakeLists.txt files, the first containing > SET(CMAKE_CXX_FLAGS "/EHa /O2") > > project(CMAKE_

Re: [CMake] missing .S (assembly file) target

2011-09-20 Thread Michael Hertling
On 09/20/2011 08:46 AM, Reto Glauser wrote: > Hi > > I don't see the .S targets (for C/CXX files) which used to be there. I > would like to look at the assembly files of the C/CXX files. > > I'm on > > GNU/Linux > GCC-4.3.4 > CMake-2.8.2 With CMake 2.8.5 on Linux, I can't confirm this: CMAKE_

Re: [CMake] add_custom_command and DEPENDS

2011-09-20 Thread Michael Hertling
On 09/20/2011 07:00 PM, Talin wrote: > After several years of working with CMake, I have to say that I still do not > understand the behavior of the DEPENDS clause in add_custom_command. > > The main problem is a fairly simple one: I have an add_custom_command in one > subdirectory, the output of

Re: [CMake] VS2005: CMAKE_CXX_FLAGS not used when project() is placed after definition

2011-09-22 Thread Michael Hertling
On 09/21/2011 09:26 AM, Jens Auer wrote: >> The PROJECT() command has significant side effects, e.g. for >> C++ projects, it loads Modules/CMakeCXXInformation.cmake containing: >> >> SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING >> "Flags used by the compiler during all build ty

Re: [CMake] Setting IMPORTED_LOCATION_* for existing packages

2011-09-22 Thread Michael Hertling
On 09/21/2011 09:07 AM, Hauke Heibel wrote: > Hi, > > I started to work with imported targets and thus with setting the > property IMPORTED_LOCATION and the like. I stumbled over a case > (GTest) where the standard find_package call returns me a list of libs > for 'debug' and 'optimized' modes and

Re: [CMake] Setting IMPORTED_LOCATION_* for existing packages

2011-09-22 Thread Michael Hertling
On 09/22/2011 09:21 PM, Hauke Heibel wrote: > Hi Michael, > > First, thank you for the feedback. > > On Thu, Sep 22, 2011 at 7:19 PM, Michael Hertling wrote: >> AFAICS, you've a single imported target GTest, and you are continuously >> setting *this* target&#x

Re: [CMake] Fwd: Save stripped debugging information

2011-09-23 Thread Michael Hertling
On 09/22/2011 01:24 PM, Rolf Eike Beer wrote: >> Il 22/09/2011 10.13, Rolf Eike Beer ha scritto: Yeah, that's exactly what I had in mind. Any chance that we will see this in a future release? >>> This is usually "find someone who does it and writes tests for it". >>> Which >>> then boils

Re: [CMake] Second post: find_package with config file always set xyz_FOUND to true?

2011-09-25 Thread Michael Hertling
; Again, thank you for your answer. > > Anton Regards, Michael [1] http://www.mail-archive.com/cmake@cmake.org/msg28431.html [2] http://www.mail-archive.com/cmake@cmake.org/msg32836.html > On Sep 19, 2011, at 2:21 PM, Michael Hertling wrote: > >> On 09/19/2011 07:09 PM, Anton

Re: [CMake] Again on dependencies tree

2011-09-26 Thread Michael Hertling
On 09/22/2011 01:00 PM, Marco Corvo wrote: > Hi all, > > I thought I came up with a solution for this problem, but looks like I'm > still not doing the right thing. > > My project is made of many tens of packages, everyone with its nice > CMakeLists.txt. What I'd like to do is to have the freed

Re: [CMake] return value of find_library

2011-09-26 Thread Michael Hertling
On 09/23/2011 09:20 PM, Yifei Li wrote: > On Sep 22, 2011, at 2:39 PM, David Cole wrote: > >> It should always be a full path for a valid found library. Under what >> circumstances are you getting exactly "mylib" ? ? > Here is a real example: > > find_package(OpenMesh) > message("${OPENMESH_LIBRA

Re: [CMake] overriding ${PROJECTNAME}_BINARY_DIR before call to project()

2011-09-28 Thread Michael Hertling
On 09/28/2011 06:36 PM, Thomas Wolf wrote: > On 28.09.2011 17:58, Jean-Christophe Fillion-Robin wrote: >> Hi Thomas, >> >> You will find below few points that should help you to address your issues: >> >> 1) CTK build system can be build with the option CTK_SUPERBUILD set to >> OFF, in that case th

Re: [CMake] How to use add_custom_command correctly

2011-09-28 Thread Michael Hertling
On 09/28/2011 01:45 PM, Martin Kupke wrote: > Now it seems to be solved, the generator is called and the generated > sources / headers are then compiled and linked into a library. > > My changes are in the > > D:/project/Discovery/Generated/Driver/CMakeLists.txt > > just adding a add_custom_tar

Re: [CMake] Does find_library check that a found library does in fact link?

2011-09-28 Thread Michael Hertling
On 09/29/2011 01:30 AM, Clifford Yapp wrote: > On Wed, Sep 28, 2011 at 2:47 AM, Michael Wild wrote: > >> >> Only if your installation is broken ;-) If the symlink is broken, I >> consider this to be a user-error. Period. OTOH, CMake /could/ check >> whether the library is a symlink, and if it is,

Re: [CMake] variables from configuration file

2011-09-29 Thread Michael Hertling
On 09/29/2011 11:42 PM, EXT-Harris, Scott H wrote: > Hi, > I am using cmake-2.8.6-rc4. > > In my configuration file, config/cmake/linux.cmake, I have: > set ( COMPILER_HOME > /home/harris_s/cots/linux/v12.1/SunStudio12u1-Linux-x86-tar-ML/sunstudio12.1 ) SET(COMPILER_HOME ... CACHE STRING "Compil

Re: [CMake] Fwd: Save stripped debugging information

2011-09-29 Thread Michael Hertling
implementation - in order to provide reasonable support for the extraction of debug symbols during installation is a major undertaking, IMO, besides the conceptional issue of toolchain- dependence. Regards, Michael > Regards, > Yuri > > On Sat, Sep 24, 2011 at 4:02 AM, Michael Hertling wr

Re: [CMake] Fwd: Save stripped debugging information

2011-09-30 Thread Michael Hertling
On 09/30/2011 08:39 AM, Rolf Eike Beer wrote: >> On 09/29/2011 06:15 AM, Yuri Timenkov wrote: >>> When I was investigating similar problem, I found alternative approach >>> at >>> http://code.google.com/p/dynamorio/source/browse/trunk/CMakeLists.txt. >>> >>> The thing is to change linker rules, to

<    1   2   3   4   5   6   7   8   >