[CMake] Release build from bootstrap?

2017-05-19 Thread David Doria
When I run 'bootstrap' followed by 'make' on a cmake source tree, I get a debug build of the 'cmake' binary. If I have an existing CMake available, I can build cmake by setting CMAKE_BUILD_TYPE=Release and I end up with a release build of the new CMake. Is it possible to get a release build directl

Re: [CMake] Best way to show/include CMake files in IDE

2016-03-08 Thread David Doria
On Mon, Mar 7, 2016 at 9:19 PM, Eric Wing wrote: > On 3/7/16, Eric Wing wrote: > > On 3/7/16, David Cole wrote: > >> If you include those files in the source list for a library, executable, > >> or > >> custom target, they should show up in IDE projects, and they should be > >> ignored by Makef

[CMake] Running TEST_P from GTest with CMake

2016-02-05 Thread David Doria
I have been successfully using CMake's GTEST_ADD_TESTS to run GTest TEST and TEST_F blocks defined in a source file. However, I now need to pass some arguments (filenames that I want CMake to produce including things like ${CMAKE_SOURCE_DIR}) to the GTests, and it seems like the way to do this is w

Re: [CMake] QT, CMake and ITK

2013-04-24 Thread David Doria
On Tue, Apr 23, 2013 at 5:03 PM, Gabriel Santiago wrote: > Dear all, > > I am trying to create an user interface for some medical image processing > using Qt (it must be Qt) and I want to use ITK to do some of the image > processing. > > In order to create the CMakeLists.txt, I am following this t

Re: [CMake] Error compiling VTK example

2013-03-04 Thread David Doria
On Mon, Mar 4, 2013 at 4:48 AM, a.c.sant wrote: > Hi, > > I'm trying to compile a simple VTK example from their web > (ProjectPointPlane) with MingW. I downloaded the example and the > CMakeLists.txt file. When running CMake-gui, I can generate the Makefile > without any errors. However, when I r

Re: [CMake] Problem with Visual Studio 2010, Windows 7 64bit

2012-11-28 Thread David Doria
On Wed, Nov 28, 2012 at 9:14 AM, John Drescher wrote: >> A colleague mentioned that with the same setup he was getting the same >> error, and then installed SP1 for VS 2010 and things started working. > > I also remember that Visual Studio 2012 RTM had an optimizer bug that > caused Qt application

Re: [CMake] Problem with Visual Studio 2010, Windows 7 64bit

2012-11-28 Thread David Doria
On Wed, Nov 28, 2012 at 4:22 AM, Andrew Maclean wrote: > Interesting ... I have no problems, the only thing I can think of is that I > had VS 2010 SP1 installed before I installed VS 2012 Express, I did not use > any of the RC versions. Petr, A colleague mentioned that with the same setup he was

Re: [CMake] Problem with Visual Studio 2010, Windows 7 64bit

2012-11-27 Thread David Doria
On Tue, Nov 27, 2012 at 4:37 PM, David Cole wrote: > Are you using an Express edition of VS without an SDK installed? > > If so, install an SDK and try again from a clean build directory. > > If not, we'll need more information. VS 2010 on Windows 7 works great > for me, even for a VTK build tree.

[CMake] Problem with Visual Studio 2010, Windows 7 64bit

2012-11-27 Thread David Doria
I am trying to build VTK for the first time on a 64bit Windows 7 system. I have Visual Studio 2010 installed. I ran the 64bit Visual Studio Command Prompt and ran 'cmake-gui' from it. I pointed it to the VTK source directory and gave it a build directory. When I configure, I get: -

Re: [CMake] Output assembly (g++ -S)

2012-10-18 Thread David Doria
> CMake has targets to do that. If you type make help you can see them. It > should be something like this: > > make Assembly.s > > -Bill Ah, so easy. Thanks Bill! David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

[CMake] Output assembly (g++ -S)

2012-10-18 Thread David Doria
I am trying to produce the .s file that "g++ -S file.cpp" would produce, but on a CMake target (because I want the include path that I've setup through CMake, etc.) Consider a simple demo: PROJECT(Assembly) ADD_EXECUTABLE(Assembly Assembly.cpp ) # this produces an 'Assembly' executable I tried t

Re: [CMake] Modifying a variable's value without resetting the docstring

2012-09-24 Thread David Doria
> Well, if ${_var} is already a cache variable, you can retrieve it's > HELPSTRING property to see what was set as the original doc string. But if > it's not, then there won't be one, and you'll be adding an undocumented > option... > > > http://cmake.org/cmake/help/v2.8.9/cmake.html#section_

Re: [CMake] Modifying a variable's value without resetting the docstring

2012-09-21 Thread David Doria
On Fri, Sep 21, 2012 at 1:44 PM, David Cole wrote: > You should avoid using FORCE in the first place. > > :-) > > > But if you have to use it, then you should provide the type and > documentation along with the call that uses FORCE. If you have multiple > calls that require this information, consi

[CMake] Modifying a variable's value without resetting the docstring

2012-09-21 Thread David Doria
Is there a way to use the FORCE argument to set() without resetting the docstring? I tried: cmake_minimum_required(VERSION 2.6) PROJECT(CacheForce) # Create a variable set(MyVariable OFF CACHE BOOL "Description goes here." FORCE) # Change the value set(MyVariable ON CACHE FORCE) # error: "set gi

Re: [CMake] 'make' does nothing in msys?

2012-09-14 Thread David Doria
On Fri, Sep 14, 2012 at 1:34 PM, David Doria wrote: > I am trying to build ITK using MinGW. (I'm writing some guides on how to > build ITK with different toolchains). > > Here is what I've come up with so far: > http://www.itk.org/Wiki/ITK/Configuring_and_Building/MinG

[CMake] 'make' does nothing in msys?

2012-09-14 Thread David Doria
I am trying to build ITK using MinGW. (I'm writing some guides on how to build ITK with different toolchains). Here is what I've come up with so far: http://www.itk.org/Wiki/ITK/Configuring_and_Building/MinGW Up until this point, everything seems to go smoothly (configure and generate complete su

Re: [CMake] Setting up environment for CMake GUI to use Visual Studio generator

2012-09-14 Thread David Doria
On Fri, Sep 14, 2012 at 11:56 AM, David Cole wrote: > Run cmake-gui FROM the target environment, just like you run cmake... > > i.e. : type "cmake-gui" in the cmd prompt that has your stuff set up > in it. Don't just launch it from a short-cut unless you're using the > "Visual Studio *" generator

[CMake] Setting up environment for CMake GUI to use Visual Studio generator

2012-09-14 Thread David Doria
When using Visual Studio 10 as the generator from the CMake GUI, it complains that it can't find 'cl' ("To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command line.") It works if I use: cmake -G "NMake Makefiles" from the VS command line, so I'm a

Re: [CMake] Boost_DIR

2012-09-05 Thread David Doria
On Wed, Sep 5, 2012 at 2:16 PM, Klaim - Joël Lamotte wrote: > I might be wrong but my understanding is that it's the other way arround: > you provide Boost_DIR (root of your boost installation) and it finds the > rest itself. > I've been using it like that. I have a custom build of boost in a spec

Re: [CMake] Boost_DIR

2012-09-05 Thread David Doria
On Wed, Jan 11, 2012 at 5:55 AM, Daniel Dekkers wrote: > Hi, does anyone know what this “Boost_DIR” variable is from the > findBoost.cmake module? And why it is never found? > > Everything works well, I use BOOST_ROOT to set the path to the Boost > distribution, just curious. > > Daniel I would l

Re: [CMake] Add header files to project when there are no cpp files

2012-08-28 Thread David Doria
> Not sure if it works with QtCreator or not, but you should be able to > add_custom_target and use the SOURCES argument to get "source" files > to show up in the generated project. Ah, thanks. I had tried: add_custom_target(MyProject MyProject.h) but not: add_custom_target(MyProject SOURCES My

[CMake] Add header files to project when there are no cpp files

2012-08-28 Thread David Doria
I have just started using QtCreator. When I open a CMake project in QtCreator, all of my cpp files mentioned in the CMakeLists.txt are added to the "project". However, my headers (.h) and template implementation (.hpp) are not added to the project (I believe this is the same behavior as Visual Stud

Re: [CMake] Link errors on Wiki/CMake

2012-07-18 Thread David Doria
On Tue, Jul 17, 2012 at 9:34 AM, Micha Renner wrote: > > The following links of www.cmake.org/Wiki/CMake generate 404 Errors > > How CMake simplifies the build process by Bruno Abinader > Part 1 - Basic build system : > > http://www.abinader.com.br/bruno/how-cmake-simplifies-the-build-process-part

Re: [CMake] Recursively add directories to INCLUDE_DIRECTORIES

2012-07-04 Thread David Doria
On Mon, Jun 11, 2012 at 11:35 AM, GOO Creations wrote: > Thanks. > I was sitting for hours trying to write this huge macro and now the > solution isso easy. > For future readers, here is my macro: > > *MACRO(HEADER_DIRECTORIES return_list)* > *FILE(GLOB_RECURSE new_list *.h)* > *SET(dir_l

Re: [CMake] How to handle a submodule existing twice in a project?

2012-05-17 Thread David Doria
> > Yeah. Well, in that case I'd simply check for the TestB target thats > defined in TestB/CMakeLists.txt as condition for the top-levels > add_subdirectory: > > if(NOT TARGET TestB) > add_subdirectory(TestB) > endif() > > That should work. > > Andreas > Awesome, that seems to do the trick. Tha

Re: [CMake] How to handle a submodule existing twice in a project?

2012-05-17 Thread David Doria
> > Why are you doing that? If TestB is always available as sub-dir under > TestA it doesn't make much sense to also add it as a subdirectory of the > parent of TestA - IMHO. Test/CMakeLists.txt can still use all targets from > TestB, since target names are always valid across the complete project.

[CMake] How to handle a submodule existing twice in a project?

2012-05-17 Thread David Doria
I have a main project (called Test) that has two submodules, TestA and TestB. TestA also has a submodule, which is exactly the same TestB. So there is a directory Test/TestB as well as Test/TestA/TestB In TestA/CMakeLists.txt, I have add_subdirectory(TestB). In Test/CMakeLists.txt, I have add_sub

Re: [CMake] Linking to libraries that depend on other libraries

2012-05-17 Thread David Doria
On Thu, May 17, 2012 at 2:18 AM, Petr Kmoch wrote: > Hi David, > > there's a target property LINK_INTERFACE_LIBRARIES (and > per-configuration variants) which can be used for this purpose. > Starting with 2.8.7, target_link_libraries() also accepts > LINK_INTERFACE_LIBRARIES as a new argument mod

[CMake] Linking to libraries that depend on other libraries

2012-05-16 Thread David Doria
I have a library, libA, that depends on another library, libB, with this structure: My Program -> libA -> libB In my program, if I only link to libA, I get linker errors that it can't find things in libB, and these errors are fixed if I also link My Program to libB. This makes sense, but is there

[CMake] Checking if git submodules have been initialized

2012-05-09 Thread David Doria
I have recently started using git submodules in my projects. I have had multiple complains from my users "It gives me a "missing xyz.h" type of error when I try to compile." The reason is that they haven't initialized the submodules (like it says to do in the readme :) ). Is there a CMake way to ch

[CMake] Accessing the CMAKE_CXX_FLAGS that a project was built with?

2012-05-08 Thread David Doria
I use ITK in my project. I want to determine if the ITK build that the user has selected to use (via cmake ITK_DIR) has been built with a particular compiler flag, namely -DCMAKE_CXX_FLAGS=-std=gnu++0x Is there a way to do this via cmake in my project? David -- Powered by www.kitware.com Visi

Re: [CMake] Multiple tests in a single file

2012-01-06 Thread David Doria
On Fri, Jan 6, 2012 at 5:54 PM, Jean-Christophe Fillion-Robin wrote: > Hi David, > > Not too long ago I was browsing the project of a friend who worked on BTK > (The toolkit used by Mokka, a motion kinematic & kinetic analyser) [1]. > > I noticed that he is using cxxtest [2] along with ctest. It s

[CMake] Multiple tests in a single file

2012-01-06 Thread David Doria
Does CTest have a mechanism to run man mini-tests in a single file? I'm looking for something equivalent to the UnitTest++ syntax: TEST(YourTestName) {} TEST(YourOtherTestName){} int main(){  return UnitTest::RunAllTests();} Of course you could do something like: int YourTestName() { } int Your

Re: [CMake] Running coverage analysis

2012-01-03 Thread David Doria
On Tue, Jan 3, 2012 at 9:52 AM, David Cole wrote: > To actually run the coverage testing, you need to have tests added with > add_test in your CMakeLists file, then you need to run a ctest -S script > that calls ctest_coverage, or use one of the predefined coverage dashboard > targets. (Use 'make

[CMake] Running coverage analysis

2012-01-02 Thread David Doria
I found this wiki page: http://www.vtk.org/Wiki/CTest/Coverage#Coverage_With_C.2B.2B that explains the flags that are necessary. I set up a demo project here and it compiles: http://www.vtk.org/Wiki/CTest/Coverage/Example However, how do you actually run the coverage analysis? I ran 'ctest' but

[CMake] FindQtMobility

2011-12-14 Thread David Doria
It looks like this find script has been written for kde: http://old.nabble.com/Review-Request%3A-Add-a-FindQtMobility.cmake-file-td31823359.html I don't see it included in src/cmake/Modules - any plans to include it with CMake? David -- Powered by www.kitware.com Visit other Kitware open-source

Re: [CMake] New type of cache variable: lists

2011-12-06 Thread David Doria
On Tue, Dec 6, 2011 at 4:19 PM, Robert Dailey wrote: > Has anyone thought of creating a "LIST" type for cache variables? In CMake > GUI on Windows, this would be represented by a combo-box or drop-down box > that allows the user to pick one item out of a list of available items. > > Is this possib

Re: [CMake] Automatically pull in dependencies from QtDesigner plugins

2011-12-05 Thread David Doria
On Sun, Dec 4, 2011 at 11:34 AM, Michael Jackson wrote: > Do you have "MyWidget" packaged as a true library, or did you just create the > Designer Plugin and then have a "loose" .cpp/.h file? > >  The is a project called Qwt* that has a similar setup. It has a Designer > plugin for its various w

[CMake] Automatically pull in dependencies from QtDesigner plugins

2011-12-04 Thread David Doria
I have created a QT widget, MyWidget, and a QtDesigner plugin for MyWidget. Now I want to use MyWidget in bigger project, MyProject. I created a ui file for MyProject with QtDesigner and add a MyWidget in the designer. Now when I try to compile MyProject, I get (of course) "error: can't find MyWidg

Re: [CMake] QtCreator generator?

2011-11-11 Thread David Doria
> > > *To use QtCreator* > > The consensus is to use the "Code Blocks - NMake Generator". This has > > generated successfully a .cbp file (Code Block Project, I'm assuming). > > However, QtCreator seems unaware that this is a project and just opens it > > as plain text? How do I now open this proje

Re: [CMake] QtCreator generator?

2011-11-11 Thread David Doria
On Fri, Nov 11, 2011 at 5:56 PM, John Drescher wrote: >> There should have been a "*.sln" file that you open.? >> > > Not for a "Code Blocks -NMake Makefile" project. > > John Ok, I guess I am getting my two threads confused. *To use QtCreator* The consensus is to use the "Code Blocks - NMake Ge

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

2011-11-11 Thread David Doria
I typically work in KDevelop which has CMake support, so if another developer pushes some new files and changes to the CMakeLists.txt of my project, I simply 'git pull' the project and then click "Build" and it knows exactly what to do - it runs CMake and then builds the project. However, when wor

Re: [CMake] QtCreator generator?

2011-11-11 Thread David Doria
> That is the best way I have found to run CMake on Windows when multiple > Visual Studios are installed. There is a Command Prompt short cut called > "Visual Studio Command Prompt" that will have all the compiler paths setup > for you. What I do is launch that command prompt then issue "cmake-g

Re: [CMake] QtCreator generator?

2011-11-11 Thread David Doria
> Ok. one more: how exactly did you run cmake ? > From the command line or cmake-gui ? >From the CMake-GUI. > Which generator did you choose ? > It should be the "CodeBlocks - NMake Makefiles" one. I had chosen "CodeBlocks - Unix Makefiles". I just tried again with "CodeBlocks - NMake Makefiles"

Re: [CMake] QtCreator generator?

2011-11-11 Thread David Doria
On Fri, Nov 11, 2011 at 12:42 PM, Alexander Neundorf wrote: > On Friday 11 November 2011, David Doria wrote: >> >> I think it's true that QtCreator knows how to connect to a CMake build >> >> tree generated with the "CodeBlocks - Unix Makefiles" generator

Re: [CMake] QtCreator generator?

2011-11-11 Thread David Doria
>> I think it's true that QtCreator knows how to connect to a CMake build >> tree generated with the "CodeBlocks - Unix Makefiles" generator. I tried to use this generator, but I get errors like "cmake_c_compiler_env_var is undefined". Shouldn't it find the compiler for the VS2010Express installat

[CMake] QtCreator generator?

2011-11-11 Thread David Doria
I saw a discussion about this back in March, but I didn't see any conclusions/resolutions. Is there a way to generate a QtCreator project using CMake? I tried the CMake support that was built into QtCreator itself, but it seems very awkward (you couldn't view/set variables, etc). Thanks, David --

[CMake] VS2010 Express generator?

2011-11-11 Thread David Doria
I am using CMake 2.8.6 and am hoping to generate a project for VS2010 Express. Which generator should I use? I tried Visual Studio 10, but when I "configure" I get all kinds of errors about the compiler not working. I can try to transcribe these if necessary, but I thought there might be an easier

Re: [CMake] FFTW_FOUND is true even if it is not found?

2011-08-22 Thread David Doria
> From just that module, I do not have a reasonable explanation... > > What does this code output, when placed: > (1) directly after the find_package(FFTW) call? > (2) at the very bottom of your CMakeLists.txt file...? > >  message(STATUS "FFTW_INCLUDE_DIR='${FFTW_INCLUDE_DIR}'") >  message(STATUS

[CMake] FFTW_FOUND is true even if it is not found?

2011-08-22 Thread David Doria
Using this FindFFTW.cmake: http://code.google.com/p/qmcpack/source/browse/trunk/CMake/FindFFTW.cmake?spec=svn4506&r=4506 FFTW_FOUND is true even though: FFTW_INCLUDE_DIR = FFTW_INCLUDE_DIR-NOTFOUND FFTW_LIBRARIES = FFTW_LIBRARIES_NOTFOUND Can anyone explain that? Thanks, David ___

[CMake] FindITK doesn't find an installed ITK?

2011-07-08 Thread David Doria
Hi all, If I build ITK in /home/doriad/build/ITK, and then in my .bashrc add: export ITK_DIR=/home/doriad/build/ITK when I start a new terminal and configure a project that needs ITK, it is found no problem - all is well. However, if I then install ITK (make install) to /home/doriad/bin (set wi

Re: [CMake] Library numeric extension?

2011-06-17 Thread David Doria
On Fri, Jun 17, 2011 at 4:30 PM, Eric Sokolowsky wrote: > You didn't specify your development environment so I'm just guessing here. > Under Linux, you usually have to install a development package in order to > link to libraries. If you are compiling your own libgeotiff you might want > to instal

[CMake] Library numeric extension?

2011-06-16 Thread David Doria
I added a simple: target_link_libraries(myprogram geotiff) to my CMakeLists.txt file. I have a libgeotiff.so in a directory on my LD_LIBRARY_PATH. The code compiled, but when I tried to run it, I got an error that I was missing libgeotiff.so.2. I made a symlink from libgeotiff.so.2 to libgeotiff.

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
On Mon, May 2, 2011 at 2:27 PM, Tyler wrote: > You could use -D flags (cmake -Dvar=value -P script.cmake). That seems reasonable. I tried it: CMakeLists.txt - cmake_minimum_required(VERSION 2.6) PROJECT(Test) ENABLE_TESTING() ADD_EXECUTABLE(Test1 Test1.cxx) ADD_EXECUTABLE(Test2 Tes

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
On Mon, May 2, 2011 at 1:57 PM, David Cole wrote: > script.cmake: > execute_process(x) > execute_process(y) > > CMakeLists.txt: > add_test(NAME MyTest COMMAND ${CMAKE_COMMAND} -P > ${CMAKE_CURRENT_SOURCE_DIR}/script.cmake) > > Or, configure the script into the build tree if you need variable value

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
On Mon, May 2, 2011 at 1:31 PM, David Cole wrote: > If it's supposed to be "one test" from ctest's point of view, you should > write a script that makes 2 execute_process calls, and run the script as the > add_test command. I tried to write a function that runs to executables, and add that functi

[CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
I am trying to run an executable that produces an output image, then compare this image to a baseline using a separate Compare executable. Is it possible to do this in a single add_test command? I tried separating the two executables with a semicolon, but that doesn't seem to work. add_executable

Re: [CMake] Documentation suggestion

2011-05-02 Thread David Doria
> what about Doxyen[1]? > > Kind regards, > Benjamin What do you think Dave C? As a side-effect it would then "look like" other Kitware based projects (ITK, VTK etc) which all use Doxygen. David ___ Powered by www.kitware.com Visit other Kitware open-s

[CMake] If syntax

2011-05-01 Thread David Doria
According to this: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:if the syntax is: if(expression) ... elseif(expression2) ... else(expression) ... endif(expression) I was recently made aware that: if(expression) ... elseif(expression2) ... else()

[CMake] Documentation suggestion

2011-05-01 Thread David Doria
On this page: http://www.cmake.org/cmake/help/cmake-2-8-docs.html there are many "See XYZ" statements. E.g. - else: Starts the else portion of an if block. else(expression) See the if command. - It would be very helpful if these were linked to the anchor of that command, e.g.: See t

Re: [CMake] Dynamic linking doesn't work after install

2011-04-22 Thread David Doria
> I think the CMake page on RPATHs might be what you are looking for. > > http://www.cmake.org/Wiki/CMake_RPATH_handling > > Marcus > Yea I read that, but I didn't really follow/see how to fix this problem. Surely there is a "just copy the executable" option? David ___

[CMake] Dynamic linking doesn't work after install

2011-04-22 Thread David Doria
I have created an executable like this: add_executable(ImageCompleter ${AppSources}) target_link_libraries(ImageCompleter ${LibrariesAlwaysUsed}) INSTALL( TARGETS ImageCompleter RUNTIME DESTINATION ${INSTALL_DIR} ) When I run the one that is created with 'make', it works fine. However,

Re: [CMake] Changing compiler

2011-04-21 Thread David Doria
> Sounds like you must have gotten errors when you built gcc... > > Pore through the log of what happened during the gcc build maybe? > > Are you building gcc from source, or using some package manager to build it > for you? (MacPorts, something else?) > FYI - there was no problem all along with t

Re: [CMake] Changing compiler

2011-04-20 Thread David Doria
On Wed, Apr 20, 2011 at 9:04 AM, David Cole wrote: > If you are setting the CXX compiler, you should also probably be setting the > C compiler. > > I always use environment variables to do this: > >   export CC=/home/doriad/src/gcc-4.5.2/bin/gcc/gcc >   export CXX=/home/doriad/src/gcc-4.5.2/bin/gc

[CMake] Changing compiler

2011-04-20 Thread David Doria
I am trying to build ITK with a non-system-standard compiler. I did so by running: ccmake ../../src/ITK/ -DCMAKE_CXX_COMPILER=/home/doriad/src/gcc-4.5.2/bin/gcc/g++ However, I get: --- CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE): The C++ compi

Re: [CMake] List of possible completion values

2011-03-30 Thread David Doria
On Wed, Mar 30, 2011 at 11:52 AM, Tim Gallagher wrote: > Hi, > > Is there a way (and if not, how do I submit a feature request) to have a > set of drop-down type options in the ccmake interface? The obvious example > is for CMAKE_BUILD_TYPE, where something like hitting Enter scrolls through > Rel

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

2011-03-30 Thread David Doria
CMAKE_BUILD_TYPE should be a drop down box/fixed set of choices http://public.kitware.com/Bug/view.php?id=11806 David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://ww

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread David Doria
> An inspection of your CMakeLists.txt file [1] and the outputs > of "make VERBOSE=1" [2,3] reveals the following goings-on: > > In [2], the lines 13 and 16 generate the object files > > CMakeFiles/Tech.dir/src/tech/Pch.cpp.o > CMakeFiles/Tech.dir/src/tech/tech/Atomic.cpp.o > > and obviously, these

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread David Doria
> Most likely coming from here: > /home/doriad/src/CMake/Modules/UsewxWidgets.cmake(72): SET(CMAKE_CXX_FLAGS > ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS} ) I added: message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") and the output is: CMAKE_CXX_FLAGS: -pthread -ftemplate-depth-50 -Wall -Wno-depreca

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread David Doria
> You might want to try running cmake --trace and see if something odd is > happening when it is run. > > -Bill > Here is the output of the trace: http://pastebin.com/MfTcNHFE It looks like the definitions list is being created and applied to the target, does it not? (see the last 10 lines of tha

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread David Doria
>> Can you create a standalone example of this to make it easier to debug? > > add_executable(foo foo.cxx) > ... > Bill, My standalone example works fine: http://pastebin.com/tGjX1AZ8 You can see that the UNIX and DAVID definitions are both passed. Maybe something is "overriding" the definition

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread David Doria
> > Did you do a make VERBOSE=1 to see what was being passed to the compiler? > Yes, none of the definitions are being passed: http://pastebin.com/X0t0L4Jv David ___ Powered by www.kitware.com Visit other Kitware open-sou

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-29 Thread David Doria
On Tue, Mar 29, 2011 at 1:58 AM, Michael Hertling wrote: > On 03/29/2011 07:47 AM, Michael Hertling wrote: > > On 03/28/2011 08:23 PM, David Doria wrote: > >> I have setup a list of definitions: > >> > >> SET(MAIN_BUILD_DEFINITIONS "$

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
> No, the semicolons are removed by message() itself, you'll still see > them if you enclose the ${} inside the quotes: > > message( "DEFS: ${MAIN_BUILD_DEFINITIONS}" ) You're right - the output now contains the semicolons. I tried enclosing the variable in quotes in the set_target_properties line

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
I looked at make VERBOSE=1 as you suggested and the -D's indeed are missing. Again, in my working small demo they show up properly. I guess something else in the CMakeLists.txt must be breaking this functionality? The full file is here: http://pastebin.com/SWZgmJ33 but none of the definitions set

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
On Mon, Mar 28, 2011 at 2:31 PM, David Doria wrote: > On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov wrote: >> Try prefixing definitions with -D > > I changed to: > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DUNIX;") > SET(MAIN_BUILD_DEFINI

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov wrote: > Try prefixing definitions with -D I changed to: SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DUNIX;") SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DPIXEL_DIMENSION=3;") and I get: : error: macro names must be identifier

[CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
I have setup a list of definitions: SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} UNIX;") SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} PIXEL_DIMENSION=3;") I display them and apply them to my executable as follows: add_executable(ImageCompleter ${MainSources}) message("Main buil

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-25 Thread David Doria
> Could you post the output of "make VERBOSE=1"? > > On *nix, the following CMakeLists.txt works as expected: > The output of "make VERBOSE=1" contains: > >> .../c++ -DUNIX -o .../SetTargetProperties.cxx.o -c >> .../SetTargetProperties.cxx It is working properly now. I must not have done a 'make

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread David Doria
On Thu, Mar 24, 2011 at 11:31 AM, Yuri Timenkov wrote: > Use COMPILE_FLAGS target property. Like this: > > set_target_properties(Exec2 PROPERTIES COMPILE_FLAGS "/flag1 /flag2") > > You can see full list of properties in CMake documentation. Note that > compiler flags may be also set for particular

Re: [CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread David Doria
On Thu, Mar 24, 2011 at 10:44 AM, David Doria wrote: > Is there a way to explicitly set the CMAKE_CXX_FLAGS for a particular > executable? That is, if I set CMAKE_CXX_FLAGS and then have a > add_executable line, then change CMAKE_CXX_FLAGS and then have another > add_executable, wi

[CMake] Different CMAKE_CXX_FLAGS for different executables

2011-03-24 Thread David Doria
Is there a way to explicitly set the CMAKE_CXX_FLAGS for a particular executable? That is, if I set CMAKE_CXX_FLAGS and then have a add_executable line, then change CMAKE_CXX_FLAGS and then have another add_executable, will the first set of CMAKE_CXX_FLAGS be applied to the first executable and the

Re: [CMake] Concise Example of BundleUtilities for Windows

2010-12-26 Thread David Doria
On Sat, Dec 11, 2010 at 12:23 PM, Michael Jackson wrote: > I did find that section. what I am a bit confused about is this: > >  ParaView includes its own version of BundleUtilities.cmake? Why? >  ParaView includes its own version of GetPrerequisites.cmake? Why? > > Is BundleUtilities aim at _just

Re: [CMake] cmake qt4 for dummies

2010-11-24 Thread David Doria
> On Wed, Nov 24, 2010 at 12:25 PM, luxInteg wrote: >> Greetings, >> >> I am learning cmake.  I am  now  having a go at learning   to   compile a qt4 >> project wuth cmake.  I am  starting with  qt-4.6.2  and  I want to play with >> compiling a small project  into a  library. >> >> >> From what I

[CMake] CTest cannot determine repository type

2010-11-18 Thread David Doria
When configuring ParaView (and other applications), I see this: CTest cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work. Is CTest aware of git? Thanks, David ___ Powered by www.kitware.com Visit ot

Re: [CMake] BundleUtilities

2010-11-17 Thread David Doria
> > The goal is simply this: > > - given: > -- an executable target, that happens to be a bundle app on the Mac > -- a full path to that bundle in the install tree > -- a list of plugins that you have also already installed in the bundle > -- a list of directories where to find libraries that y

Re: [CMake] BundleUtilities

2010-11-17 Thread David Doria
> > BundleUtilities is meant to be a more general approach to packaging 3rd > party libraries. It will look at an executable, and find all of its > dependencies (the ones necessary to make the program execute) and copy the > non-system dependencies into your install directory. Clint, Great, thi

Re: [CMake] BundleUtilities

2010-11-17 Thread David Doria
On Wed, Nov 17, 2010 at 9:32 AM, Michael Jackson wrote: > I tool a little different approach in my own projects. I end up > "configuring" a shell script that gets run at install time (OS X Only). > Inside that shell script are all the copying to the CMAKE_INSTALL_PREFIX, > ensuring destination dir

Re: [CMake] BundleUtilities

2010-11-17 Thread David Doria
Tyler, You seem to be right in that I should not escape the $, but I DID need to add "DESTINATION bin". Without it, I got a: CMake Error at CMakeLists.txt:23 (INSTALL): install FILES given no DESTINATION! This seems to work: INSTALL(FILES "${VTK_DIR}/bin/libvtkHybrid.a" DESTINATION bin) The p

Re: [CMake] BundleUtilities

2010-11-16 Thread David Doria
Is the goal simply to copy ...VTK/bin/libvtkHybrid.a into the package? I tried this: INSTALL(CODE "\${VTK_DIR}/bin/libvtkHybrid.a") But I get: Parse error. Expected a command name, got unquoted argument with text "${VTK_DIR}/bin/libvtkHybrid.a". I made a home for this here: http://www.vtk.org/

Re: [CMake] Compiling header files

2010-11-16 Thread David Doria
> Also use VS IDE to make sure the library is listed. The library is indeed listed in "Additional Dependencies" of the linker for the executable target. > What symbols? Try running dumpbin /symbols OSC.lib. I figured it out - I had to link to "winmm" to get the symbol: symbol __imp__timeGetTime

Re: [CMake] Compiling header files

2010-11-16 Thread David Doria
Hm, it works correctly in Linux, but I still get a bunch of error LNK2019: unresolved external symbol errors in Windows. The only difference I see is that the .lib file gets created in a subdirectory of bin/ bin/Debug/OSC.lib (or bin/Release/OSC.lib) vs the .a file which gets created in bin di

Re: [CMake] Compiling header files

2010-11-16 Thread David Doria
Ryan, The issue is that these headers are only used internally to this collection of files, so I don't want to have to include them in my code. Here is a skeleton: The files I've been given -- External.h External.cpp Internal.h (used by External) Internal.cpp My files MyCode

Re: [CMake] BundleUtilities

2010-11-16 Thread David Doria
On Tue, Nov 16, 2010 at 1:35 PM, Michael Jackson wrote: > I think we used Qt as a basis because lots of people at the time were asking > for it. Probably the simplest to demonstrate would be an example that builds > a dynamic library and an executable that uses that library so therefor it > must b

[CMake] Compiling header files

2010-11-16 Thread David Doria
I am trying to use ADD_LIBRARY to create a .lib file from a collection of .cpp and .h files. If I do: ADD_LIBRARY(LibraryName AllOfTheCPPFiles.cpp) and then try to link against that library, I get many missing-function type linker errors. I looked in the .h files and many of them have actual func

[CMake] BundleUtilities

2010-11-16 Thread David Doria
Hi all, I found the Qt example here: http://www.itk.org/Wiki/BundleUtilitiesExample http://www.itk.org/Wiki/images/2/25/QtTest-Package-Example.zip The two INSTALL commands seem fairly complicated - is there not a way to do all of that in the project-to-be-included's cmake configuration so that a

Re: [CMake] CPack general question and example

2010-11-16 Thread David Doria
Great, it's working. The only thing that was required was: SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "David Doria") Here is the working example: http://www.cmake.org/Wiki/CMake/CPack/Examples/Linux/DEB The page you sent (http://www.vtk.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX

Re: [CMake] CPack general question and example

2010-11-15 Thread David Doria
> You need  INSTALL commands for everything you want to be in the package > > For your example: > > ADD_EXECUTABLE(DistanceBetweenPoints DistanceBetweenPoints.cxx) > INSTALL(TARGETS DistanceBetweenPoints DESTINATION bin) # Add this for CPack > to work > > Then both "make install" and "make package

[CMake] CPack general question and example

2010-11-15 Thread David Doria
I just heard about CPack and started playing with it. I tried to make an RPM of a simple VTK program: http://www.cmake.org/Wiki/CMake/CPackExample When I run 'make package', I get an error: CPack Error: Problem copying the package: /home/doriad/CPackTest/bin/_CPack_Packages/Linux/RPM/DistanceBet

Re: [CMake] Auto re-configuring until cache stops changing

2010-09-10 Thread David Doria
On Fri, Sep 10, 2010 at 10:25 AM, David Cole wrote: > I think we're too close to the first release candidate of CMake 2.8.3 to be > adding features at this point. > But this is a great candidate for an early change immediately after the > 2.8.3 release. If we get it into 'next' immediately after t

  1   2   >