Re: [CMake] Visual Studio configurations with cmake

2011-12-03 Thread Michael Hertling
On 12/03/2011 12:31 PM, terje loe wrote: Hi, I'm trying to set up cmake for my visual studio project.. I' ve set it up so it works fine for make files, but got some problems setting it up as I want it for visual studio. 1. I'm setting up different visual studio configurations so I have

Re: [CMake] output of custom_command ?

2011-12-01 Thread Michael Hertling
On 12/01/2011 03:50 PM, Anders Wallin wrote: Hi all, I'm building some Lyx documentation with asymptote figures. I'm generating the figures in EPS format like this: add_custom_command( OUTPUT ${ASYFIG}.eps COMMAND asy ${CMAKE_CURRENT_SOURCE_DIR}/${ASYFIG}.asy

Re: [CMake] FindDCMTK Not setting up DCMTK_INCLUDE_DIRECTORIES Correctly?

2011-12-01 Thread Michael Hertling
On 12/01/2011 08:22 AM, Thomas Sondergaard wrote: On 2011-11-30 07:23, Michael Hertling wrote: On 11/29/2011 08:49 PM, Thomas Sondergaard wrote: On 2011-11-29 18:19, kent williams wrote: I actually install DCMTK in a subdirectory of my top-level build, and then my program that uses DCMTK

Re: [CMake] 2D arrays

2011-11-30 Thread Michael Hertling
On 11/30/2011 03:29 AM, Robert Dailey wrote: On Tue, Nov 29, 2011 at 5:57 PM, Michael Hertling mhertl...@online.dewrote: Just some spontaneous questions/remarks: Thanks; I really appreciate it! - Why do you use macros instead of functions? I use macros so the _array2d_ variables

Re: [CMake] 2D arrays

2011-11-29 Thread Michael Hertling
On 11/30/2011 12:28 AM, Robert Dailey wrote: I have created a pretty clean solution to this until there is native support for multi-dimensional arrays in CMake. I have attached the module, hopefully it will prove useful to others. Here is an example of how to use it: set( two_dee_array

Re: [CMake] FindDCMTK Not setting up DCMTK_INCLUDE_DIRECTORIES Correctly?

2011-11-29 Thread Michael Hertling
On 11/29/2011 08:49 PM, Thomas Sondergaard wrote: On 2011-11-29 18:19, kent williams wrote: I actually install DCMTK in a subdirectory of my top-level build, and then my program that uses DCMTK is configured with DCMTK_DIR. What is DCMTK_DIR pointing at? The installation dir or the source

Re: [CMake] Finding PythonLibs using PythonInterp

2011-11-28 Thread Michael Hertling
On 11/28/2011 03:54 PM, Felipe Lema wrote: Hello, everyone I was trying to use cmake to build python c++ extensions in win7, but couldn't get cmake to detect PythonLibs. At least, not without editing the windows registry. Since it could detect PythonInterp, I got it working using the

Re: [CMake] BUILD_COMMAND having a hard time getting usable command lines

2011-11-28 Thread Michael Hertling
On 11/28/2011 08:43 PM, J Decker wrote: So the idea was, to make the build process a single click (or couple) or at least a single application to build. Since CMake knows how to build a project, it became easier to maintain a cmakelists.txt which does the build than a batch file... So my

Re: [CMake] Capturing matches in regex groups

2011-11-28 Thread Michael Hertling
On 11/28/2011 11:35 PM, Robert Dailey wrote: I haven't really seen a way to get a list of group matches in a regex. For example, string( REGEX MATCH ) only returns the whole string matched, not just what was in the capture groups. If I do this: (\\w+)\\,(\\w+)\\,(\\w+) and I match that

Re: [CMake] BUILD_COMMAND having a hard time getting usable command lines

2011-11-27 Thread Michael Hertling
On 11/26/2011 07:14 PM, J Decker wrote: Earlier I wondered if there was a way to stop recusive invocation of a build command in a cmake script - I found something like a solution; when I run the command, set an environment variable and don't run the command if that environment variable is

Re: [CMake] parallel build using cmake --build?

2011-11-27 Thread Michael Hertling
On 11/27/2011 05:21 PM, Steve M. Robbins wrote: On Sat, Nov 26, 2011 at 10:46:10AM -0500, John Drescher wrote: On Fri, Nov 25, 2011 at 10:16 PM, Steve M. Robbins st...@sumost.ca wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My

Re: [CMake] parallel build using cmake --build?

2011-11-26 Thread Michael Hertling
On 11/26/2011 04:16 AM, Steve M. Robbins wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? Thanks, -Steve cmake --build is just a

Re: [CMake] Do not build/install import library

2011-11-25 Thread Michael Hertling
On 11/25/2011 10:22 AM, Matthias Gehre wrote: 2011/11/25 Michael Hertling mhertl...@online.de: On 11/24/2011 07:53 PM, Mathias Gaunard wrote: On 11/23/2011 10:14 PM, Matthias Gehre wrote: Hi, thanks for this very nice cmake. I switched just recently to get lightspark (lightspark.github.com

Re: [CMake] Checking for empty list

2011-11-25 Thread Michael Hertling
On 11/25/2011 03:15 PM, Michael Wild wrote: On 11/25/2011 02:52 PM, Daniel Dekkers wrote: Hi, I know it should be out there somewhere in the documentation, but can’t find it. How do I check for an empty list? I can use LIST(LENGTH MYLIST LISTCOUNT) with an extra variable LISTCOUNT

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Michael Hertling
On 11/25/2011 12:28 PM, Mathias Gaunard wrote: There is some strange CMake behaviour I don't quite understand. In the project attached, I build a shared library for which I want to specify a custom build command; to do this I generate a dummy library which I then replace by another file in

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Michael Hertling
On 11/25/2011 08:42 PM, Mathias Gaunard wrote: On 11/25/2011 07:19 PM, Michael Hertling wrote: That's caused by the absence of an SONAME in your baz/libtest.so. If there's no DT_SONAME tag in a shared library you are linking against, the linker will write a DT_NEEDED tag to the resulting

Re: [CMake] XCode: Detect debug build to enable /D_Debug or similar?

2011-11-24 Thread Michael Hertling
On 11/24/2011 07:08 PM, g...@novadsp.com wrote: How can I do this? Specifically generating for XCode. My cmakefile has this: if (${CMAKE_CFG_INTDIR} STREQUAL Debug) Message(We are generating/building debug code for ${this_target}) ADD_DEFINITIONS(/D_DEBUG) endif() But _DEBUG is never

Re: [CMake] Bad documentation of the LINK_INTERFACE_LIBRARIES property and other transitive linking topics

2011-11-24 Thread Michael Hertling
On 11/24/2011 08:20 AM, Hendrik Sattler wrote: BTW: linking plugins against an executable is really not good style. Put the common part into a library and link the executable and the plugin against that library. Ignore the necessity or desire to load the plugin at run time for a moment.

Re: [CMake] Do not build/install import library

2011-11-24 Thread Michael Hertling
On 11/24/2011 07:53 PM, Mathias Gaunard wrote: On 11/23/2011 10:14 PM, Matthias Gehre wrote: Hi, thanks for this very nice cmake. I switched just recently to get lightspark (lightspark.github.com) crossplatform, and it worked really smooth. One question, though: I cannot seem to find a way

Re: [CMake] link_directories issue, cmake 2.8.5

2011-11-24 Thread Michael Hertling
On 11/23/2011 05:39 PM, Vladimir Chebotarev wrote: Hello. I've just found an issue with link_directories and cmake 2.8.5. If I give an absolute but not normalized path like c:/bla-bla-bla/../bla/bla as its argument (with default CMP0015), cmake thinks it is relative path and shows a warning

Re: [CMake] Bad documentation of the LINK_INTERFACE_LIBRARIES property and other transitive linking topics

2011-11-23 Thread Michael Hertling
On 11/23/2011 10:25 AM, Alan W. Irwin wrote: cmake-2.8.6 has the following documentation of the LINK_INTERFACE_LIBRARIES property for targets: LINK_INTERFACE_LIBRARIES List public interface libraries for a shared library or executable. By default linking to a shared

Re: [CMake] Transitive linking

2011-11-21 Thread Michael Hertling
On 11/19/2011 08:02 AM, James Bigler wrote: On Fri, Nov 18, 2011 at 5:51 PM, Michael Hertling mhertl...@online.dewrote: On 11/18/2011 10:03 PM, James Bigler wrote: 2011/11/18 Alexander Neundorf a.neundorf-w...@gmx.net On Friday 18 November 2011, James Bigler wrote: I thought CMake knew how

Re: [CMake] One project, one platform, 2 compilers

2011-11-21 Thread Michael Hertling
with modifications and other libraries. Is there an example toolchain file I can use as basis? Is there any documentation about what should be set up in a toolchain file? http://www.cmake.org/Wiki/CMake_Cross_Compiling and the ML, of course. Regards, Michael On Fri, Nov 18, 2011 at 2:26 PM, Michael

Re: [CMake] One project, one platform, 2 compilers

2011-11-18 Thread Michael Hertling
On 11/17/2011 05:18 PM, Paul Hansen wrote: Hi I have a project that has to be compiled with two different compilers on the same computer. Can I do that from the same CMakeLists.txt file? What do you mean exactly? (1) Compile the project twice, each time completely with a different

Re: [CMake] TCL modules

2011-11-18 Thread Michael Hertling
with FPHSA() or by other means? - Meaning of XXX_FOUND if a requested/prerequisite component is absent? BTW, how did you implement the search for a certain version without version- or pattern-aware find functions in your improved modules? Regards, Michael On Thu, Nov 17, 2011 at 6:27 AM, Michael

Re: [CMake] Transitive linking

2011-11-18 Thread Michael Hertling
On 11/18/2011 10:03 PM, James Bigler wrote: 2011/11/18 Alexander Neundorf a.neundorf-w...@gmx.net On Friday 18 November 2011, James Bigler wrote: I thought CMake knew how to not drag all the dependent libraries once you linked an executable module. add_library(A STATIC a.cpp)

Re: [CMake] find_library and static library

2011-11-17 Thread Michael Hertling
On 11/17/2011 10:28 AM, Romain LEGUAY wrote: Hello everyone! I found in previous message there is none option to specify to find_library function to search just static library. It was for CMake 2.6. Has it got any change with the new version of CMake? AFAIK, it hasn't, since the root of

Re: [CMake] TCL modules

2011-11-17 Thread Michael Hertling
On 11/17/2011 12:28 AM, Joe Brandt wrote: I have a couple issues, that I'd like to help fix, with the current FindTCL.cmake, FindTclsh.cmake, FindWish.cmake, and FindTclStub.cmake that make them unusable for me. The first is they do not always find the various components from the same Tcl

Re: [CMake] Circular dependencies because of file names?

2011-11-17 Thread Michael Hertling
On 11/16/2011 06:36 PM, Jookia wrote: I've actually used that workaround, but it seems dirty as it shows up in IDE targets like Visual Studio or other IDEs or makefiles. In fact, I kind of like the 'generating /docs' part of the makefile. Would it just be smarter to rename the target

Re: [CMake] shell level access to values of cmake variables

2011-11-17 Thread Michael Hertling
On 11/10/2011 06:48 PM, vagn scott wrote: in my CMakeLists.txt file I have a statement project(hello_foo_baz) This defines PROJECT_NAME among other things. is there something like cmake --dump-var PROJECT_NAME that would output the string hello_foo_baz

Re: [CMake] Adding a new language

2011-11-16 Thread Michael Hertling
On 11/16/2011 04:13 AM, Stefan Monnier wrote: I'd still like to know how to explain to cmake that the command produces 2 files, but at least I can get rid of my hack. That (assuming just a simple object file is produced by compilation) is one of several general limitations with CMake language

Re: [CMake] cmake 2.8.6 On Linux , link error and added

2011-11-16 Thread Michael Hertling
On 11/15/2011 06:26 PM, david_bjorn...@agilent.com wrote: The issue has been resolved http://public.kitware.com/Bug/view.php?id=12575 ++David-Bjornbak; OK, thanks for the hint. Regards, Michael PS: Please drop the ML a line if there's an outside progress in a topic you initiated -

Re: [CMake] cmake 2.8.6 On Linux , link error and added headers to ..._EXTERNAL_OBJECTS for executables

2011-11-16 Thread Michael Hertling
On 11/15/2011 06:04 PM, Bill Hoffman wrote: On 11/15/2011 11:52 AM, Michael Hertling wrote: Could you boild down this issue to a minimal and self-sufficient example - i.e. a project working with 2.6 (quite old) but failing with 2.8 - and post it here for further investigation

Re: [CMake] Using cpack for custom/local deployment

2011-11-16 Thread Michael Hertling
On 11/16/2011 02:11 PM, Alexander Broekhuis wrote: Hi all, I have some questions regarding the use of CPack and CMake. What I'd like to do is have the a target execute multiple cpack configurations (additionally, have a possibility to execute only one configuration). The cpack config can

Re: [CMake] cmake 2.8.6 On Linux , link error and added headers to ..._EXTERNAL_OBJECTS for executables

2011-11-16 Thread Michael Hertling
On 11/16/2011 06:05 PM, Bill Hoffman wrote: On 11/16/2011 4:43 AM, Michael Hertling wrote: On 11/15/2011 06:04 PM, Bill Hoffman wrote: On 11/15/2011 11:52 AM, Michael Hertling wrote: Could you boild down this issue to a minimal and self-sufficient example - i.e. a project working with 2.6

Re: [CMake] Problem with LINK_DIRECTORIES

2011-11-15 Thread Michael Hertling
On 11/14/2011 09:15 PM, Robert Dailey wrote: On Mon, Nov 14, 2011 at 1:59 PM, Michael Hertling mhertl...@online.dewrote: On 11/14/2011 06:17 PM, Robert Dailey wrote: Well maybe you can tell me I'm doing this wrong then, but based on how I am currently setting up my third party libraries

Re: [CMake] Circular dependencies because of file names?

2011-11-15 Thread Michael Hertling
On 11/14/2011 09:31 PM, Jookia wrote: I have the following code: # -- DOXYGEN find_package(Doxygen) set(docsDir ${CMAKE_BINARY_DIR}/docs/) add_custom_command(OUTPUT ${docsDir} COMMAND ${CMAKE_COMMAND} -E make_directory ${docsDir} VERBATIM) add_custom_target(docs

Re: [CMake] Libraries with custom build command

2011-11-15 Thread Michael Hertling
On 11/14/2011 08:11 PM, Mathias Gaunard wrote: What is the recommended way to define libraries with custom build commands? This trick seems to be the only way: if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) endif()

Re: [CMake] cmake 2.8.6 On Linux , link error and added headers to ..._EXTERNAL_OBJECTS for executables

2011-11-15 Thread Michael Hertling
On 11/12/2011 12:41 AM, david_bjorn...@agilent.com wrote: I'm getting a Link error on Linux when I use CMake 2.8.6 or 2.8.5. If use CMake 2.6.3, with the exact same configuration, the link works. I did a diff on the build.make from 2.8.6 and 2.6.3 and found when I use cmake 2.8.6 On

Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-14 Thread Michael Hertling
On 11/12/2011 01:39 PM, David Cole wrote: For reference, the bug Mike refers to is this one: http://public.kitware.com/Bug/view.php?id=11258 I always use the manual technique of shutting down VS, running CMake, and then re-opening VS. It's really not that bad, once you get used to it.

Re: [CMake] CMake single-configuration makefiles

2011-11-14 Thread Michael Hertling
On 11/13/2011 11:30 PM, Eric Noulard wrote: 2011/11/13 Robert Dailey rcdai...@gmail.com: I understand that currently Makefiles generated by CMake are single-configuration by-design. In other words, you can't issue a debug or release command to make, you have to regenerate for a different

Re: [CMake] Problem with LINK_DIRECTORIES

2011-11-14 Thread Michael Hertling
On 11/14/2011 06:17 PM, Robert Dailey wrote: On Mon, Nov 14, 2011 at 11:00 AM, David Cole david.c...@kitware.com wrote: On Mon, Nov 14, 2011 at 9:36 AM, Robert Dailey rcdai...@gmail.com wrote: On Mon, Nov 14, 2011 at 6:42 AM, Michael Wild them...@gmail.com wrote: Hi Arun Consider

Re: [CMake] Static Library output problem

2011-11-12 Thread Michael Hertling
On 11/11/2011 03:42 PM, Romain LEGUAY wrote: Ok thanks for your quick answers! It works perfectly now! Why don't we have just one variables for the library? With set_target_properties, we can define for each library the path. Because (1) ADD_LIBRARY() might lack the SHARED/STATIC keyword,

Re: [CMake] /usr/bin/gcc -o tcl2c++ -rdynamic \n gcc: fatal error: no input files

2011-11-12 Thread Michael Hertling
On 11/12/2011 02:48 PM, YunQiang Su wrote: I do an cmake program, but encount an stranger problem. 1. mkdir tmp; cd tmp 2. tar -zxvf ../cmake-test.tar.gz 3. mkdir build; cd build 4. cmake ..; make I got an error: /usr/bin/gcc-o tcl2c++ -rdynamic gcc: fatal error: no input files

Re: [CMake] Issue with check_include_file() and GL/glxproto.h

2011-11-12 Thread Michael Hertling
On 11/11/2011 12:42 PM, GOUJON Alexandre wrote: On 11/11/2011 04:13 AM, Michael Hertling wrote: On 11/10/2011 11:22 PM, Eric Noulard wrote: If this is the case then it is a GL/glxproto.h design mistake not CMake mistake. Absolutely, try to compile the following program by hand; it's the same

Re: [CMake] ifort,icc,icpc: ld: cannot find -lcilkrts

2011-11-12 Thread Michael Hertling
On 11/12/2011 08:48 AM, Ilias Miroslav wrote: Dear experts, our problem is that cmake sets automatically linking libraries for C,C++ and with Intel compilers (Fortran,C,C++) we are getting these problems ( first observed here https://repo.ctcc.no/CDash/viewBuildError.php?buildid=5283 ) :

Re: [CMake] Using CTest with a different dashboard

2011-11-11 Thread Michael Hertling
On 11/09/2011 06:06 PM, EXT-York, Gantry wrote: I'm looking for suggestions from someone who has used CTest to report results to a dashboard other than CDash. I'd like to be able to simply type gmake test TESTOPTS=-report then have CTest traverse all the directories and run the defined

Re: [CMake] Issue with check_include_file() and GL/glxproto.h

2011-11-10 Thread Michael Hertling
On 11/10/2011 11:22 PM, Eric Noulard wrote: 2011/11/10 GOUJON Alexandre ale.gou...@gmail.com: Hi, It all started when I tried compiling Piglit [1] : cmake checked all the dependencies, didn't complain and generated Makefiles but doing 'make' caused an error because a header was missing. So

Re: [CMake] Generated CMakeLists.txt

2011-11-09 Thread Michael Hertling
that dummy model.xml in most cases is changed because of internal structure changes. I think you got my question about attaching to cmake --check-build-system commnad genfiles.py --cmake-only ... thanks in advance Lukasz 2011/11/8 Michael Hertling mhertl...@online.de: On 11/08/2011 03:30 PM

Re: [CMake] Custom targets that traverse subdirectories

2011-11-09 Thread Michael Hertling
On 11/10/2011 12:25 AM, EXT-York, Gantry wrote: And the command specialtest is executed out of the build tree? This is what I'm doing now CMakeLists.txt add_custom_target(aggr_target) add_subdirectory(a) add_subdirectory(b) a/CMakeLists.txt add_executable( specialtest1 IMPORTED )

Re: [CMake] Globally Set Target Properties

2011-11-08 Thread Michael Hertling
On 11/08/2011 01:36 PM, Schuchard, Matthew wrote: Thanks, I think I must be doing something wrong elsewhere then, because I follow the same syntax as what you wrote. However, it is not working for me which means my error must be somewhere else. Could you provide a minimal but complete

Re: [CMake] Generated CMakeLists.txt

2011-11-08 Thread Michael Hertling
On 11/08/2011 03:30 PM, Łukasz Tasz wrote: Hi All, I have one issue connected with generated code. What is recommended way to proceed with generators which provides source which is dynamic? The setup looks like: generator has some input, and depending on this input files are generated.

Re: [CMake] Multiple platforms/configurations

2011-11-08 Thread Michael Hertling
On 11/08/2011 09:08 PM, Tom Deblauwe wrote: Hello, I have 2 build configurations for the same source code and I am generating visual studio 2005 projects. So for the first configuration I need different defines than for the second configuration. So I do like this: mkdir build1 cd

Re: [CMake] add_custom_command, source_group, and non-existant files with the VS 2010 generator

2011-11-08 Thread Michael Hertling
On 11/08/2011 10:56 PM, Matthew LeRoy wrote: I've got a question related to the way CMake handles files that are non-existant at CMake-time, but which are listed as OUTPUTs of an add_custom_command, and are included in a source_group. I'm using CMake 2.8.5 and the Visual Studio 2010

Re: [CMake] debug/optimized include directories

2011-11-07 Thread Michael Hertling
On 11/06/2011 09:27 AM, Michael Wild wrote: On 11/05/2011 09:59 PM, Michael Hertling wrote: On 11/02/2011 05:36 PM, Michael Wild wrote: Thanks ;-) Michael Just an additional remark: Instead of generating the proxy headers in CMakeLists.txt, i.e. at configuration time, one might also have

Re: [CMake] add_custom_command location

2011-11-07 Thread Michael Hertling
On 11/07/2011 05:51 PM, Tomasz Grobelny wrote: I have a project which is configured in several CMakeLists.txt files. The problem is that add_custom_command works or doesn't work depending on where the command is located. If I put add_custom_command just after add_library then it works fine.

Re: [CMake] get name of .lib file

2011-11-07 Thread Michael Hertling
On 11/07/2011 05:55 PM, Tomasz Grobelny wrote: Thanks. But it still means that I have to construct the .lib file name sort of manually. And possibly put some IF(WIN32)'s in my CMakeLists.txt. I would much prefer to have a list of all files that were produced by given target. Getting such a

Re: [CMake] Globally Set Target Properties

2011-11-07 Thread Michael Hertling
On 11/07/2011 05:14 PM, Schuchard, Matthew wrote: Thanks for the response. Actually, that is what I want to do: Specifically, I need to remove the prefix lib from all statically linked libraries I build. Also, I do not have to specify full paths to libraries I link to because of the

Re: [CMake] find_package(), sources only

2011-11-07 Thread Michael Hertling
On 11/07/2011 03:26 PM, Hendrik Sattler wrote: Am 07.11.2011 14:49, schrieb Daniel Dekkers: Hi Hendrik, Could you write a few more lines. I want to understand,... but I don't. ;-) We only have one copy of Bullet as a bundle present on the system. Let's say you just downloaded Bullet.

Re: [CMake] add_subdirectory() twice = Policy CMP0013 is not set: Duplicate binary directories are not allowed

2011-11-07 Thread Michael Hertling
On 11/04/2011 06:39 PM, Paul Hansen wrote: Hi I have several small projects. Some of them may include another project. I have one big project that includes all small projects. File structure: projects - p1.cmake (add_subdirectory(dir_project1)) - p2.cmake (add_subdirectory(dir_project2))

Re: [CMake] install export : ignore imported_link_interface_libraries and imported_link_dependents_libraries

2011-11-07 Thread Michael Hertling
On 11/02/2011 04:19 PM, Jaonary Rabarisoa wrote: Hi all, I'm using the command install(EXPORT ) to create a configuration file for my project. This works great but by default cmake fills the IMPORTED_LINK_INTERFACE_LIBRARIES and IMPORTED_LINK_DEPENDENTS_LIBRARIES. I'd like cmake to ignore

Re: [CMake] transitive link flags

2011-11-06 Thread Michael Hertling
On 11/06/2011 07:04 PM, Luke Dalessandro wrote: Hi everyone, I have a static library target that has some sources that rely on link-time symbol interposition. Is there an existing way to set transitive link flags of the -Wl,--wrap,symbol variety on the library target so that executables

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Michael Hertling
On 11/06/2011 07:49 PM, J Decker wrote: Of course, the CMakeLists.txt in examples (or example0 and example1) depends on the actual library, so, from that level, we would like to call ADD_SUBDIRECTORY() to the *higher level* library directory... which is unacceptable for ADD_SUBDIRECTORY()

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Michael Hertling
On 11/06/2011 04:47 PM, Dan Kegel wrote: On Sun, Nov 6, 2011 at 7:27 AM, Daniel Dekkers d.dekk...@cthrough.nl wrote: This template stuff should really be in the documentation, it would have helped me a lot. More than http://www.cmake.org/cmake/help/examples.html. A library called Hello,

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Michael Hertling
On 11/07/2011 04:55 AM, J Decker wrote: On Sun, Nov 6, 2011 at 5:23 PM, Michael Hertling mhertl...@online.de wrote: On 11/06/2011 07:49 PM, J Decker wrote: Of course, the CMakeLists.txt in examples (or example0 and example1) depends on the actual library, so, from that level, we would like

Re: [CMake] NOT operator gotchas for newbies

2011-11-05 Thread Michael Hertling
On 11/05/2011 03:24 AM, Dan Kegel wrote: On Fri, Nov 4, 2011 at 6:09 PM, Michael Hertling mhertl...@online.de wrote: NOT isn't a constant but a boolean operator like AND/OR/EXISTS etc., and none of the latters is case-sensitive at the moment, so why should NOT be the sole exception? Right

Re: [CMake] debug/optimized include directories

2011-11-05 Thread Michael Hertling
On 11/02/2011 05:36 PM, Michael Wild wrote: Thanks ;-) Michael Just an additional remark: Instead of generating the proxy headers in CMakeLists.txt, i.e. at configuration time, one might also have them generated by a custom command, i.e. at build time, which has the $CONFIGURATION expression

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-05 Thread Michael Hertling
. Again, that's just my personal taste, and others certainly vary. Regards, Michael PS: Please don't drop the ML. -Oorspronkelijk bericht- Van: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Namens Michael Hertling Verzonden: vrijdag 4 november 2011 1:03 Aan: cmake@cmake.org

Re: [CMake] How can I run tests using a wrapper script

2011-11-04 Thread Michael Hertling
On 11/04/2011 10:13 PM, EXT-York, Gantry wrote: I'm new to cmake. I'm trying to define some unit tests in CMakeLists.txt.I need to run utest1, utest2, utest3 and so forth, but I need to run them through a wrapper script called run_utest. run_utest is used to intercept some output and

Re: [CMake] Undefined reference

2011-11-04 Thread Michael Hertling
On 11/04/2011 12:50 AM, Dan Kegel wrote: On Thu, Nov 3, 2011 at 4:16 PM, Michael Hertling mhertl...@online.de wrote: Static linking of glibc is not really supported; IIRC glibc's DNS and localization support use shared libraries under the hood, even when you ask for static linking

Re: [CMake] NOT operator gotchas for newbies

2011-11-04 Thread Michael Hertling
On 11/04/2011 11:22 PM, Dan Kegel wrote: I just ran into two little newbie problems having to do with booleans. CMP0012 made various boolean constants case insensitive, but NOT is still case sensitive. If you use it in lowercase, you get the warning CMake Warning (dev) at CMakeLists.txt:2

Re: [CMake] Patch CMake for Mac static library creation

2011-11-04 Thread Michael Hertling
On 11/04/2011 11:11 PM, Belcourt, K. Noel wrote: On Nov 4, 2011, at 3:56 PM, Belcourt, K. Noel wrote: This is a long overdue followup. On Dec 4, 2010, at 12:10 PM, Belcourt, K. Noel wrote: On Dec 4, 2010, at 10:08 AM, Ryan Pavlik wrote: You can configure this for your project:

Re: [CMake] Undefined reference

2011-11-03 Thread Michael Hertling
On 11/03/2011 03:51 PM, Mauricio Klein wrote: Thank you Raphael, it worked! One last question: i've tried to compile my code using static linkage, once i need my daemon runs in many Linux releases. But, even static, in many systems my code crashes because the GLIBC version. How do these

Re: [CMake] Undefined reference

2011-11-03 Thread Michael Hertling
:09 PM, Michael Hertling mhertl...@online.dewrote: On 11/03/2011 03:51 PM, Mauricio Klein wrote: Thank you Raphael, it worked! One last question: i've tried to compile my code using static linkage, once i need my daemon runs in many Linux releases. But, even static, in many systems my code

Re: [CMake] Undefined reference

2011-11-03 Thread Michael Hertling
, Michael Hertling mhertl...@online.dewrote: On 11/03/2011 06:20 PM, Mauricio Klein wrote: The error reported occurs in the launch time: the daemon doesn't starts and report (in terminal) a GLIBC version error. [...] Usually, this means that it has *not* been linked statically against the GLIBC

Re: [CMake] How the heck does one set options?

2011-11-03 Thread Michael Hertling
On 11/03/2011 08:20 PM, Dan Kegel wrote: Thanks for the authoritative answer. I'm now using SET(gtest_force_shared_crt on CACHE BOOL Use shared (DLL) run-time lib even when Google Test is built as static lib.) add_subdirectory(gtest) include_directories(gtest/include)

Re: [CMake] Undefined reference

2011-11-03 Thread Michael Hertling
On 11/03/2011 10:18 PM, Dan Kegel wrote: On Thu, Nov 3, 2011 at 7:51 AM, Mauricio Klein mauricio.klein@gmail.com wrote: One last question: i've tried to compile my code using static linkage, once i need my daemon runs in many Linux releases. Static linking of glibc is not really

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-03 Thread Michael Hertling
On 11/03/2011 09:10 PM, Daniel Dekkers wrote: Hi, We are creating a directory structure for distribution of an open-source library with examples included. It looks something like this: + library - the root directory CMakeLists.txt - create context for building (only) the library +

Re: [CMake] Installing Visual Studio PDB files with CMake

2011-11-03 Thread Michael Hertling
On 11/03/2011 10:02 PM, Stephen Torri wrote: Searching the net for how to install PDB files with CMake comes up with no real solution. I can see from the mailing list archives that this issue had been brought up before. What is am acceptable way to install PDB files when compiling on

Re: [CMake] include_directories() and duplicates

2011-11-02 Thread Michael Hertling
On 11/02/2011 06:54 PM, Robert Dailey wrote: Does the include_directories() command strip out duplicate paths added? Yes, it does; see the following exemplary project: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(INCLUDE C) SET(CMAKE_VERBOSE_MAKEFILE ON) FILE(WRITE

Re: [CMake] Setting a cmake option via make targets?

2011-11-02 Thread Michael Hertling
On 11/02/2011 07:32 PM, Yngve Inntjore Levinsen wrote: Onsdag 02 november 2011 skrev szalai endre: Hi guys, I am using Rational Purify for runtime error checks in C++. To use it, you have to call purify instead of the C++ linker at link phase. To do so, I have the following cmake file:

Re: [CMake] Weird linking error while cross compiling

2011-11-01 Thread Michael Hertling
post a small self-contained example which demonstrates the issue. Regards, Michael 2011/10/26 Michael Hertling mhertl...@online.de On 10/26/2011 10:28 AM, Andreas Pakulat wrote: On 26.10.11 03:54:02, Jose wrote: Sorry for not being very specific. This is the command that Cmake is running

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

2011-10-27 Thread Michael Hertling
with the examples you gave me. Eric Michael Hertling a écrit : On 10/21/2011 06:49 PM, pellegrini wrote: Hi all, after digging and googling some hours I did a first step in the right direction. I had to add the command: enable_language(rc) set(cmake_rc_compiler_arg1 -cif8) The resource

Re: [CMake] Weird linking error while cross compiling

2011-10-26 Thread Michael Hertling
On 10/26/2011 10:28 AM, Andreas Pakulat wrote: On 26.10.11 03:54:02, Jose wrote: Sorry for not being very specific. This is the command that Cmake is running while linking : /usr/bin/i686-pc-mingw32-g++ -O3 -O3-Wl,-Bstatic -static-libgcc -Wl,--whole-archive

Re: [CMake] Include source files on a per-configuration basis

2011-10-21 Thread Michael Hertling
On 10/06/2011 10:29 AM, Michael Wild wrote: On 10/06/2011 08:14 AM, Michael Hertling wrote: On 10/06/2011 07:04 AM, Michael Wild wrote: On Thu 06 Oct 2011 05:17:00 AM CEST, Michael Hertling wrote: On 10/05/2011 10:47 PM, Robert Dailey wrote: In my particular CMake project, I have three CPP

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

2011-10-21 Thread Michael Hertling
On 10/21/2011 06:49 PM, pellegrini wrote: Hi all, after digging and googling some hours I did a first step in the right direction. I had to add the command: enable_language(rc) set(cmake_rc_compiler_arg1 -cif8) The resource compiler I (must) use is the one provided by winteracter

Re: [CMake] add_custom_command question

2011-10-20 Thread Michael Hertling
On 10/20/2011 12:37 PM, Łukasz Tasz wrote: Hi all, In my cmake project I have few commands that are creating outputs. But Unfortunately those outputs are used across many directories. So my question is what's the real scope of output_command? only Current_CmakeLists.txt? Yes, a custom

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Michael Hertling
On 10/20/2011 06:59 PM, Robert Dailey wrote: Let me ask this, What would be the parent of a function located in the root CMakeLists file but called from a subordinate CMakeLists file? It's the subordinate CMakeLists.txt file's parent, but what Michael probably aims at is that some variables

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Michael Hertling
On 10/20/2011 08:44 PM, Robert Dailey wrote: On Thu, Oct 20, 2011 at 12:56 PM, Michael Hertling mhertl...@online.dewrote: On 10/20/2011 06:59 PM, Robert Dailey wrote: Let me ask this, What would be the parent of a function located in the root CMakeLists file but called from a subordinate

Re: [CMake] add_custom_command question

2011-10-20 Thread Michael Hertling
On 10/20/2011 08:23 PM, Łukasz Tasz wrote: add_custom_target(TARGET generator COMMAND touch aaa.cxx COMMENT generate file ) add_custom_command(OUTPUT aaa.cxx COMMAND echo command DEPENDS generator bar This does not

Re: [CMake] always rebuild executable

2011-10-19 Thread Michael Hertling
On 10/18/2011 02:21 PM, Anton Sibilev wrote: Hi! Looking for some help.. I use add_executable(exename) + target_link_libraries (exename staticlibname), linux OS. If 'staticlibname' is not under CMake and chagnes somehow, CMake will not rebuild executable. And so I have a problem, that I have

Re: [CMake] Transitively including dependency source directories

2011-10-19 Thread Michael Hertling
On 10/14/2011 11:39 PM, Robert Dailey wrote: If I have the following target dependency chain: A B C D Then target D must have the include directories (defined on a per project basis with a cache variable currently) for C, B, and A. Right now I'm trying to implement the logic for this

Re: [CMake] Mixing static and dynamic library

2011-10-18 Thread Michael Hertling
are quite popular, IIRC. ;-) thanks again Eric Regards, Michael Michael Hertling a écrit : On 10/13/2011 03:27 PM, pellegrini wrote: Hi all, I would like to port a hardcoded build line from an old make file to my CMakeLists.txt file for a fortran 90 project using ifort compiler

Re: [CMake] How to define custom import library name (MSVC)?

2011-10-17 Thread Michael Hertling
On 10/16/2011 06:27 PM, zex spectrum wrote: Hello, I generate a shared library named, for example, mylib80.dll (it has postfix 80, because I want to embed version info into library name. I use set_target_properties with Config_POSTFIX property to achieve this. By default, CMake names

Re: [CMake] How to define custom import library name (MSVC)?

2011-10-17 Thread Michael Hertling
On 10/17/2011 01:58 PM, Michael Hertling wrote: On 10/16/2011 06:27 PM, zex spectrum wrote: Hello, I generate a shared library named, for example, mylib80.dll (it has postfix 80, because I want to embed version info into library name. I use set_target_properties with Config_POSTFIX property

Re: [CMake] Fwd: Save stripped debugging information

2011-10-16 Thread Michael Hertling
On 10/14/2011 12:58 AM, Rolf Eike Beer wrote: Am Donnerstag, 13. Oktober 2011, 20:09:04 schrieb Michael Hertling: On 10/12/2011 03:40 PM, Rolf Eike Beer wrote: On 10/03/2011 09:18 AM, Yuri Timenkov wrote: Hi Michael, On Sun, Oct 2, 2011 at 6:07 PM, Michael Hertling mhertl...@online.dewrote

Re: [CMake] ExternalProject and clean targets

2011-10-15 Thread Michael Hertling
On 10/12/2011 10:22 PM, Lori Pritchett-Sheats wrote: I'm building external packages in my CMake system using the ExternalPackages_Add function. When a package is built this way and I execute a 'make clean' at the top of my build tree, all targets are cleaned including the external

Re: [CMake] Mixing static and dynamic library

2011-10-15 Thread Michael Hertling
On 10/13/2011 03:27 PM, pellegrini wrote: Hi all, I would like to port a hardcoded build line from an old make file to my CMakeLists.txt file for a fortran 90 project using ifort compiler. The line is the following: ifort *.o -o myexec -static-intel -Bstatic -lXm -Bdynamic -lXt

Re: [CMake] ExternalProject and clean targets

2011-10-15 Thread Michael Hertling
On 10/15/2011 12:34 PM, David Cole wrote: On Sat, Oct 15, 2011 at 3:48 AM, Michael Hertling mhertl...@online.de wrote: On 10/12/2011 10:22 PM, Lori Pritchett-Sheats wrote: I'm building external packages in my CMake system using the ExternalPackages_Add function. When a package is built

Re: [CMake] complete change of compilation flags for a single file

2011-10-14 Thread Michael Hertling
On 10/11/2011 11:42 AM, Ilias Miroslav wrote: Dear experts, within our cmake project there are needs to change compilation flags of some individual files, especially we want sometimes to decrease optimization level. For that there is a command set_source_file_properties, but among

<    1   2   3   4   5   6   7   8   >