Re: [CMake] Fail target if buildtype is not RelWithDebInfo

2014-08-27 Thread Thomas Sondergaard
Thanks Petr, It works. I ended up having to make it slightly more complicated to also work with the Ninja generator, but CMAKE_CFG_INTDIR was exactly what I was looking for. Thanks, Thomas On 2014-08-27 13:48, Petr Kmoch wrote: Hi Thomas, you should be able to make this work using the var

[CMake] Fail target if buildtype is not RelWithDebInfo

2014-08-27 Thread Thomas Sondergaard
Hi, I have a custom target that is only enabled on Windows and it only works with buildtype RelWithDebInfo. When a developer accidentally runs it under a different configuration it doesn't fail in a very obvious way, and I'd like to improve that, if possible. I am using the "Visual Studio 12"

[CMake] Equivalent of -T v120_xp with ninja generator

2014-03-30 Thread Thomas Sondergaard
Hi, On Windows we use -G "Visual Studio 12" with -T v120_xp, thus using Visual Studio 2013 to build binaries that are compatible with Windows XP. It would be a great help if someone could tell me how to accomplish the same with the Ninja generator. I'd like to switch to using Ninja on Windows

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

2011-11-30 Thread Thomas Sondergaard
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 is configured with DCMTK_DIR. What is DCMTK_DIR

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

2011-11-29 Thread Thomas Sondergaard
On 2011-11-29 20:49, Thomas Sondergaard wrote: I am doing exactly what you're doing, and if you don't have this problem I'm interested in how you got it to work. The most recent version of FindDCMTK.cmake differs from the 2.8.5. Can you tell while this change solves your

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

2011-11-29 Thread Thomas Sondergaard
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 dir? As you can see in the description of the string i

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

2011-11-29 Thread Thomas Sondergaard
On 2011-11-29 17:28, kent williams wrote: I'm running into problems using the DCMTK library. I've set up an ExternalProject to build and install it, and the CMake 2.8.5 FindDCMTK.cmake finds the library if I set DCMTK_DIR. But the DCMTK_INCLUDE_DIRS variable created by FindDCMTK.cmake isn't 100

Re: [CMake] Bug fix requests for the *next* release of CMake...

2011-10-25 Thread Thomas Sondergaard
On 2011-10-21 20:20, David Cole wrote: As an esteemed colleague has pointed out, those with "reporter" level account in Mantis may not edit bugs other than their own directly. So. if you are in that boat, but would like to vote for a bug fix to be considered for 2.8.7, please reply to this th

Re: [CMake] CMake 2.8.6-rc1 ready for testing!

2011-09-02 Thread Thomas Sondergaard
On 2011-08-30 17:11, Bill Hoffman wrote: On 8/30/2011 4:11 AM, Andrea Galeazzi wrote: Hi, I'd like to know if the bug 0011258 will be fixed or the community simply decided to give it up. Any changes for 0012294 to be assigned? I don't think we

Re: [CMake] custom commands not run in parallel with Visual Studio (2010) generator

2011-08-05 Thread Thomas Sondergaard
On 12-10-2010 15:55, Bill Hoffman wrote: On 10/12/2010 9:09 AM, Thomas Sondergaard wrote: Hi, I've noticed that Visual Studio doesn't run custom commands added with add_custom_command in parallel. This means running moc and uic is slow on Windows. Is there something that can be done

[CMake] Easing the pain with Visual Studio 2010 and CMake

2011-08-04 Thread Thomas Sondergaard
It is a bit of a pain to work with Visual Studio 2010 and CMake due to this bug: http://gccxml.org/Bug/view.php?id=11258 (VS 2010 CMake plugin is broken). It doesn't look like much progress is being made with fixing this bug, so I'm looking for workarounds. To this point, whenever I've changed

Re: [CMake] .dll rpath crutch needed

2011-05-16 Thread Thomas Sondergaard
Michael Wild wrote: It would be easier to set CMAKE_RUNTIME_OUTPUT_DIRECTORY on (WIN32 AND NOT CYGWIN). Thanks, that works beautifully :-) Thomas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/op

[CMake] .dll rpath crutch needed

2011-05-16 Thread Thomas Sondergaard
I've got a project with 21 shared libraries and a number of executables. The shared libraries end up in their various directories but on Linux not-installed binaries can still be run because the path to the shared libraries are "burned in" to the shared libraries and executables as rpaths. The

[CMake] custom commands not run in parallel with Visual Studio (2010) generator

2010-10-12 Thread Thomas Sondergaard
Hi, I've noticed that Visual Studio doesn't run custom commands added with add_custom_command in parallel. This means running moc and uic is slow on Windows. Is there something that can be done about this? Thanks, Thomas ___ Powered by www.kitware

Re: [CMake] CMake rebuilding too much

2010-10-12 Thread Thomas Sondergaard
On 12-10-2010 13:24, Michael Wild wrote: The FORCE is OK, but you should do this only once, and only if CMAKE_CXX_FLAGS is the default. You don't want to upset your users, do you? Something like this should do: if(CMAKE_COMPILER_IS_GNUCXX AND NOT __CHECKED_CXX_FLAGS) # this is the guard so

Re: [CMake] CMake rebuilding too much

2010-10-12 Thread Thomas Sondergaard
On 07-10-2010 14:46, Bill Hoffman wrote: You are going to have to give more information or a small example that shows the problem. It should not be doing that. You could try running make -d to figure out why make is thinking it needs to do that. -Bill I found the problem. I had the following

[CMake] CMake rebuilding too much

2010-10-07 Thread Thomas Sondergaard
I've got a reasonably big project with 30+ shared libraries and 70+ executables all in one cmake-based project. Today I changed one line in a CMakeLists.txt in a sub-directory to link boost program_options in one particular executable, and it caused cmake to decide that it needed to recompile e

[CMake] add_custom_command doesn't automatically recognize target name created with add_library?

2010-09-25 Thread Thomas Sondergaard
or me with targets create with add_library(..). Is that a bug? I'm working around it by using get_target_property(... LOCATION). Regards, Thomas Sondergaard ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.k

Re: [CMake] Modified FindDCMTK

2010-06-11 Thread Thomas Sondergaard
Ryan Pavlik wrote: On 06/10/2010 03:28 PM, Thomas Sondergaard wrote: The FindDCMTK.cmake module in the git master branch doesn't find all the dcmtk libraries. I've attached a modified version of FindDCMTK that finds all the dcmtk libraries. It is also about 25% smaller as some dupli

[CMake] Modified FindDCMTK

2010-06-10 Thread Thomas Sondergaard
including it in the CMake distribution. Regards, Thomas Sondergaard # - find DCMTK libraries and applications # # DCMTK_INCLUDE_DIR - Directories to include to use DCMTK # DCMTK_LIBRARIES - Files to link against to use DCMTK # DCMTK_FOUND - If false, don't try to use DCM

[CMake] Re: Getting started with CMake macros

2007-11-06 Thread Thomas Sondergaard
Please ignore the previous post! I found the solution myself. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

[CMake] Getting started with CMake macros

2007-11-06 Thread Thomas Sondergaard
Is there a beginners guide to macros somewhere? I tried something basic like wrapping up find_library like this: macro(my_find_library arg1 arg2) find_library(arg1 arg2) endmacro(my_find_library) my_find_library(CPPUNIT cppunit) To my surprise it didn't work at all. If I browse CMakeCache.tx

[CMake] Signup for a new bug-tracker account broken? (was: Re: INSTALL DIRECTORY broken)

2007-11-05 Thread Thomas Sondergaard
essage there either. Anyone else having problem registering? Regards, Thomas Thomas Sondergaard wrote: I took a look at the cmake source and I think perhaps this is a bug. The FILES mode checks that the specified files are not directories, and I think maybe the DIRECTORY mode simply wan

[CMake] Re: INSTALL DIRECTORY broken

2007-11-02 Thread Thomas Sondergaard
()) && +!cmSystemTools::FileIsDirectory(dir.c_str())) { cmOStringStream e; e << args[0] << " given non-directory \"" Regards, Thomas Thomas Sondergaard wrote: Well, probably not - it's just not doing what I want :-) I

[CMake] INSTALL DIRECTORY broken

2007-11-02 Thread Thomas Sondergaard
Well, probably not - it's just not doing what I want :-) I'm using doxygen and want to install the documentation (to make a package-doc rpm package). My doc/CMakeLists.txt looks like this: ADD_CUSTOM_COMMAND(OUTPUT api/index.html COMMAND doxygen Doxyfile) ADD_CUSTOM_TARGET(doc DEPENDS api/inde

[CMake] Accurate package_source

2007-11-02 Thread Thomas Sondergaard
It seems that package_source just packs the source directory. I'd like it to work like autotools make DIST, ie it packs the source files plus whatever is put in EXTRA_DIST. How can I do that? Regards, Thomas ___ CMake mailing list CMake@cmake.org h

[CMake] CONFIGURE_FILE list substitutions

2007-11-01 Thread Thomas Sondergaard
Hello, My package has a .pc.in pkg-config template that is used to create .pc using CONFIGURE_FILE. In the pc.in file I have this line: Requires: @PKG_DEPS@ and in my CMakeLists.txt I have SET(PGK_DEPS boost libxml) The problem is that the output becomes "Requires: boost;libxml" and I wan