[CMake] ExternalProjects: How do ExternalProject_add and ExternalProject_Add_Step interact?

2010-04-23 Thread kent williams
So... I have been working on my 'Holy Grail' CMakeLists.txt that builds all prerequisites to my application as ExternalProjects, and then builds my application (also as an External Project). In getting it to work on OS X and Linux I ran into an issue: If you build Tcl, and install it, it

Re: [CMake] ExternalProjects: How do ExternalProject_add and ExternalProject_Add_Step interact?

2010-04-23 Thread kent williams
Answering my own question -- I think. This maybe is information that could be added to the documentation for ExternalProjects.cmake! ExternalProject_Add creates a project, e.g. ExternalProject_Add(tcl CVS_REPOSITORY :pserver:anonymous:@tcl.cvs.sourceforge.net:/cvsroot/tcl CVS_TAG -r core-8-5-7

Re: [CMake] can't remove RPATH from libtcl8.5.so (Linux) CMake Git version

2010-04-23 Thread kent williams
Answering my own question again -- this is a logged bug here: http://public.kitware.com/Bug/view.php?id=9284 David Cole is of the opinion this error is useful in the context of fixup_bundle. Maybe so, but it's a right PITA. If you're building the library that's getting copied as part of

[CMake] How do I set env variables with spaces in them in a CONFIGURE_COMMAND clause of ExternalProject_add?

2010-04-22 Thread kent williams
I need to build TCL TK with CFLAGS and CXXFLAGS matching what's being used in the rest of my ExternalProjects. The following doesn't work: set(COMPILER_STUFF CC=${CMAKE_C_COMPILER} C XX=${CMAKE_CXX_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE} CXXFLAGS=${CMAKE_CXX_FLAGS}

[CMake] BundleUtilities Question on Linux: Libraries Not Found during fixup?

2010-04-20 Thread kent williams
Well I found the magic incantation on OS X to get fixup_bundle work. Now I'd like it to work on Linux. What's happening is I get many of these messages: warning: cannot resolve item 'not' The problem comes, as near as I can figure out, from when ldd is run to discover the library prerequisites.

Re: [CMake] CMake 2.8.1 + Qt/Cocoa + OS X Problem -- qt_menu.nib not getting copied

2010-04-16 Thread kent williams
file. I believe there is a qt example on the cmake wiki that shows how to do that. - Mike Jackson                      www.bluequartz.net Principal Software Engineer       mike.jack...@bluequartz.net BlueQuartz Software               Dayton, Ohio On Apr 15, 2010, at 17:06, kent williams

[CMake] ExternalProject vs add_subdirectory (was Re: SubProject configuration in same build as host)

2010-04-15 Thread kent williams
There's a 'chicken-and-egg' problem with using ExternalProject in this context: When you configure a project that uses ExternalProject_add, that project won't be available to be found by FindPackage until AFTER the project is built. But CMake will want to find it at Configuration Time, and it

[CMake] CMake 2.8.1 + Qt/Cocoa + OS X Problem -- qt_menu.nib not getting copied

2010-04-15 Thread kent williams
I'll include my CMakeLists.txt at the end of this message, but the long and the short of it is this: My ApplicationBundle crashes when I try and open it with this classic error message: Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in

[CMake] ExternalProject module -- questions

2010-04-14 Thread kent williams
I'm trying to come up with a workable 'super build' for our programs, using the ExternalProject module. I'm using CMake 2.8.0 -- not sure if there's any substantive improvements in ExternalProject.cmake in 2.8.1 or CMake CVS. In short, I want to build Tcl, Tk, VTK, ITK (with WrapITK), CableSwig

[CMake] HOW DO I: Build VTK with CMake/ExternalProject_add against Qt with Cocoa on OS X?

2010-04-13 Thread kent williams
I've descended into a confusing morass of complicated CMake macros, and I need help getting out! The situation is this: I didn't have much trouble building VTK with QT as long as I stuck with Carbon. Now I'm running into some serious problems (phantom dependencies on X11 libraries, for

[CMake] ExternalProject_add: Does it have to rebuild every time you run make?

2010-04-13 Thread kent williams
So if I use large libraries as ExternalProject builds, am I doomed to have everything rebuild every time I run Make? Every time I type make at the top level of my tree, it does every step of every external project build. This wouldn't be so terrible, but if Tcl and Tk get re-installed, then VTK

Re: [CMake] Strange search order of CMakeCache.txt

2010-03-05 Thread kent williams
I recently had to help out a CMake newbie, who had run CMake in the source directory. Then he re-read the instructions on build setup for our programs, and did it the right way -- i.e. he configured a build directory for an out of source build. Problem is, if you run CMake and configure the

[CMake] How do I set generated scripts executable in CMakeLists.txt?

2009-12-10 Thread kent williams
Say I generate a script using CONFIGURE_FILE. How would I make it executable? In other words, is there a CMake way of doing this that will work on all CMake platforms? The way we deal with portability in our particular case is to use Tcl scripts. Our stuff won't work on any platform without

[CMake] My nomination for least helpful CMake Error Message (CONFIGURE_FILE issue)

2009-11-23 Thread kent williams
CMake Error at common/CMakeLists.txt:83 (CONFIGURE_FILE): configure_file Problem configuring file The issue being the CONFIGURE_FILE command: PROJECT(SGICOMMONLIB) # # other stuff removed for brevity. # SET(DIRNAME pixmaps) FILE(GLOB DEFAULT_CONFIG_FILES *.xbm .xpm .gif *.tif *.pal )

[CMake] How does interaction between UseXXX.cmake, XXXBuildSettings.cmake and XXXConfig.cmake supposedly work.

2009-08-27 Thread kent williams
I use some classes of vtkINRIA3D library for an ITK/VTK/KWWidgets application. If you haven't heard of it: http://www-sop.inria.fr/asclepios/software/vtkINRIA3D/ I had always been building against vtkINRIA3D 'in place' -- i.e. including the UsevtkINRIA3D.cmake from its build directory. I'm

[CMake] How do I tell a program to link against the static version of a library if both static and shared are there.

2009-08-26 Thread kent williams
We use the Slicer Execution Model stuff from Slicer3 for command line processing. This lets Slicer3 load our programs as modules and generate user interface panels. This works really slick EXCEPT for this issue: the utility GenerateCLP which is needed to convert the command line description XML

[CMake] Valgrind and CTest on OS X -- num-callers default failure

2009-07-09 Thread kent williams
Maybe I'm out on the bleeding edge, but... I built the current .svn for valgrind on OS X 10.5.7. Then I tried to do a memory check with CTest for Insight. Every test failed with this error message: ./Testing/20090708-0100/DynamicAnalysis.xml:==81796== '--num-callers' argument must be between 1

Re: [CMake] OS X Bundle building -- adding external DYLIB files?

2009-04-29 Thread kent williams
developers. Use -Wno-dev to suppress it. On Tue, Apr 28, 2009 at 2:52 PM, Mike Jackson mike.jack...@bluequartz.net wrote: There is also this wiki entry that might help. http://www.cmake.org/Wiki/BundleUtilitiesExample Mike Jackson On Tue, Apr 28, 2009 at 2:21 PM, kent williams nkwmailingli

[CMake] OS X Bundle building -- adding external DYLIB files?

2009-04-28 Thread kent williams
I just wrote a CMakeLists.txt file for a program that depends on a bunch of libraries that I had to build before building the application. I want to generate a deliverable OS X bundle, but I'm neither an OS X development expert nor a CMAKE OS X bundle expert. Simply put, I want to do the

Re: [CMake] Project structure

2009-03-13 Thread kent williams
It's not very elegant, but this will have the desired effect: 1. make sure the library SUBDIR is in your CMakeLists.txt before any other subdir that depends on it. 2. use add_custom_command to copy the library, once built, into each subdir. 3. use install in each subdir to install the library

[CMake] HOW TO: build development versions, plus proper INSTALL setup?

2009-03-09 Thread kent williams
I think I've gotten myself needlessly tied into knots over EXECUTABLE_OUTPUT_PATH vs RUNTIME_OUTPUT_DIRECTORY vs INSTALL command. So maybe someone wants to talk me down about it. We have a suite of programs that are built by a nested set of directories. We'd like 2 things to happen (and a third

Re: [CMake] HOW TO: build development versions, plus proper INSTALL setup?

2009-03-09 Thread kent williams
                 Dayton, Ohio On Mar 9, 2009, at 2:49 PM, kent williams wrote: 3. Test programs should NOT get thrown in with the actual 'product' programs, and ideally stay in ${LOCALDIR_BINARY_DIR} for the local project. ___ Powered by www.kitware.com

Re: [CMake] ccmake gets all squirrelly over which C++ compiler to use.

2009-03-05 Thread kent williams
So the problem with CCMake forgetting valid user input stems from the entire CMakeCache.txt file getting deleted if there's a compiler mismatch? On Tue, Mar 3, 2009 at 11:21 AM, Bill Hoffman bill.hoff...@kitware.com wrote: Mathieu Malaterre wrote: On Tue, Mar 3, 2009 at 4:20 PM, kent williams

Re: [CMake] ccmake gets all squirrelly over which C++ compiler to use.

2009-03-05 Thread kent williams
development build, and there's some support for generating installable packages as well. On Tue, Mar 3, 2009 at 10:19 AM, Jed Brown j...@59a2.org wrote: On Tue 2009-03-03 09:20, kent williams wrote: Lather, Rinse, Repeat. After 2 or 3 go-arounds, CCMake is happy and lets you generate your build files

Re: [CMake] ccmake gets all squirrelly over which C++ compiler to use.

2009-03-03 Thread kent williams
packager would be using inconsistant c++ compiler and I could not use both ITK and VTK at the same time (from debian package). So I provided an (undocumented) hack: CMAKE_OVERRIDE_COMPILER_MISMATCH 2cts On Mon, Mar 2, 2009 at 8:27 PM, kent williams nkwmailingli...@gmail.com wrote: Version 2.6

Re: [CMake] Setting environment variables prebuild

2009-03-03 Thread kent williams
You're not missing anything per se. If you set environment variables in your CMakeLists.txt file for some operations it's just too late. In particular, it doesn't add commands to the build files it generates to set the environment variables the way you need them. You can get around this -- I

[CMake] ccmake gets all squirrelly over which C++ compiler to use.

2009-03-02 Thread kent williams
Version 2.6 patch 2 on OS X and Linux -- you know your code is portable when the same issue happens on multiple platforms! Here's the scenario -- a guy in our department was having trouble getting ccmake to generate makefiles. My diagnosis was pretty simple: His project depended on both ITK and

Re: [CMake] EXECUTABLE_OUTPUT_PATH is not just deprecated, it's harmful!

2009-02-20 Thread kent williams
On Thu, Feb 19, 2009 at 4:25 PM, Brad King brad.k...@kitware.com wrote: The problem? If you're running standalone, everything's fine. If you're building inside the BRAINS tree, though, the LAST CMakeLists.txt file in the directory tree that sets EXECUTABLE_OUTPUT_PATH wins, and consequently

[CMake] EXECUTABLE_OUTPUT_PATH is not just deprecated, it's harmful!

2009-02-19 Thread kent williams
So we have a big program (well a couple of them Brains2 and Brains3), and a bunch of 'unbundled' programs (BRAINSFit, BRAINSDemonWarp, BRAINSTracer etc..). We use SVN to add the 'unbundled' programs as subdirectories of our BRAINS svn checkout. So our CMakeLists.txt files in our unbundled

[CMake] Using CMake to bootstrap a build source tree via CVS/SVN

2008-10-02 Thread kent williams
Right now we have a Slicer3 style 'getbuildtest' script to check out a bunch of Kitware packages in order to build an application. This basically works like this for all packages, check out the package configure it with cmake build it. Since the 'configure it with cmake' step is redundant

[CMake] Q: How do I _portably_ create a directory in the binary directory

2008-09-19 Thread kent williams
I am CMake-izing a non-CMake project -- or rather we have CMake-ized it, and are doing some clean up. We have a testing shell script that I'm converting to CTest tests. The first thing it does is create a directory where it drops all the testing output. I'd like to do the same thing -- create a

Re: [CMake] Q: How do I _portably_ create a directory in the binary directory

2008-09-19 Thread kent williams
Never mind, I found it in the 'FILE' command... On Fri, Sep 19, 2008 at 10:26 AM, kent williams [EMAIL PROTECTED] wrote: I am CMake-izing a non-CMake project -- or rather we have CMake-ized it, and are doing some clean up. We have a testing shell script that I'm converting to CTest tests

[CMake] Mysterious build error that seems to have been slipstreamed into CMake 2.6

2008-07-14 Thread kent williams
We have an application based on the Slicer3 build. The Slicer3 build downloads and builds CMake. We currently grab CMake with this command cvs -q -d :pserver:[EMAIL PROTECTED]:/cvsroot/CMake checkout -r CMake-2-6 CMake If I understand that correctly we're asking for the release tag of 2.6. But

Re: [CMake] Mysterious build error that seems to have been slipstreamed into CMake 2.6

2008-07-14 Thread kent williams
# SET(CPACK_SRCS CPack/cmCPackGeneratorFactory.cxx + CPack/cmCPackComponentGroup.cxx CPack/cmCPackGenerator.cxx CPack/cmCPackLog.cxx CPack/cmCPackNSISGenerator.cxx On Mon, Jul 14, 2008 at 10:23 AM, kent williams [EMAIL PROTECTED] wrote: We have an application based

[CMake] another target with the same name exists

2008-05-27 Thread kent williams
Am I insane, or is CMake? In a subdirectory of our big ol build tree, CMake is freaking out about duplicate targets in a way that makes no sense to me: CMake Error at src/iplProg/AutoSeg/ProcessDescription/CMakeLists.txt:3 (ADD_LIBRARY): add_library cannot create target ProcessDescription

Re: [CMake] Bump -- CMAKE_INSTALL_PREFIX weirdness.

2008-05-23 Thread kent williams
I'm getting these results with cmake version 2.6-patch 0 On Fri, May 23, 2008 at 8:50 AM, Bill Hoffman [EMAIL PROTECTED] wrote: Also, what version of CMake are we talking about here? There were bugs in some versions of CMake with the -D and the cache. Perhaps it works when you use the right

Re: [CMake] Bump -- CMAKE_INSTALL_PREFIX weirdness.

2008-05-23 Thread kent williams
There seems to be something unique about our build system that is causing this problem, and I am beginning to suspect what it is: It calls cmake to do a command-line configure even if the build directory is already configured. This is kind of ridiculous to do, I know, but for one thing, the

Re: [CMake] Bump -- CMAKE_INSTALL_PREFIX weirdness.

2008-05-23 Thread kent williams
http://public.kitware.com/Bug/view.php?id=7084 I made the simplest possible library project, and then messed it up based on our build system just enough to reproduce the error. ;-) Now obviously, what is done in this project -- Calling Cmake from make to batch-configure projects -- might be

[CMake] Bump -- CMAKE_INSTALL_PREFIX weirdness.

2008-05-22 Thread kent williams
I'll ask this again. We use a build system that for better or worse, invokes cmake from a Makefile to configure ITK, VTK, KWWidgets etc. In other words we have a command invoked from gnu make that looks like this: cmake /scratch/kent/brains2/iplFreeware/unpackdir/Insight

[CMake] How to deal with silly custom Gnu Make recipes with CMake

2008-05-15 Thread kent williams
I won't name the package because I find this construction really stupid, but I'm writing CMakeLists.txt files for a package we want to use and came across this: %_floof: %.c $(CC) $(CFLAGS) -DFLOOF -o $@ -lfloof So I don't really see how CMake could do something like this. And that doesn't

[CMake] What the... Can't seem to change CMAKE_INSTALL_PREFIX

2008-05-05 Thread kent williams
We call cmake from inside our top level Makefile to build ITK. To that end we specify the CMAKE_INSTALL_PREFIX on the command line. I've appended our whole cmake command line at the end of this message but the operative thing is that the CMake command line includes:

Re: [CMake] qmake to cmake

2007-10-12 Thread kent williams
Check http://www.cmake.org/HTML/Documentation.html for the CMake INCLUDE_DIRECTORIES claus. You can have multiple INCLUDE_DIRECTORIES clauses, and they're inherited in subdirectories. On 10/12/07, Ajay Divekar [EMAIL PROTECTED] wrote: Experts, I was wondering how do I pass the include

Re: [CMake] CTest results without submitting

2007-10-11 Thread kent williams
If you only want to see whether tests succeed or fail, then you just need to go to the build directory and type make test Or you can run ctest directly ctest If you want to see the output of your tests, then run ctest -V If you only care about one test ctest -R testname_regexp i.e. give a

Re: [CMake] Re: CMake, CPack, RPM

2007-10-11 Thread kent williams
PROTECTED] wrote: 2007/10/10, kent williams [EMAIL PROTECTED]: OK, so... if I use the built in RPM generator it will generate an RPM. It isn't clear to me what ends up in that RPM aside from the files in the manifest -- no dependencies seem to be mentioned. That's almost true. RPM generator

[CMake] how broken is the RPM support?

2007-10-10 Thread kent williams
I just installed the CVS CMake. There is a CPackRPM.cmake file in the Modules directory, but it's not clear to me how to tell CPack I want to generate an RPM, or a Source RPM. Anyone have any clues for me? ___ CMake mailing list CMake@cmake.org

[CMake] Re: CMake, CPack, RPM

2007-10-10 Thread kent williams
OK, so... if I use the built in RPM generator it will generate an RPM. It isn't clear to me what ends up in that RPM aside from the files in the manifest -- no dependencies seem to be mentioned. Using UseRPMTools.cmake to try and generate a source RPM doesn't work so hot. You can only make a

[CMake] cmake version 2.5-20060616 -- INSTALL(DIRECTORY ...) broken?

2007-05-22 Thread kent williams
According to the man pages for 2.4-patch 7 RC-6 on CMake.org, there is a form of the INSTALL command for directories. After reading through the description, I added a command to install a subdirectory into the bin install directory: INSTALL(DIRECTORY pipeline_approved DESTINATION bin) i.e.

Re: [CMake] cmake version 2.5-20060616 -- INSTALL(DIRECTORY ...) broken?

2007-05-22 Thread kent williams
... Or - better yet - update to a more current CMake. HTH, David On 5/22/07, kent williams [EMAIL PROTECTED] wrote: According to the man pages for 2.4-patch 7 RC-6 on CMake.org, there is a form of the INSTALL command for directories. After reading through the description, I added a command

Re: [CMake] cmake version 2.5-20060616 -- INSTALL(DIRECTORY ...) broken?

2007-05-22 Thread kent williams
: Then the subject line of your original email is a typo? I'm sorry if I offered silly advice, I thought you were using CMake 2.5-20060616... On 5/22/07, kent williams [EMAIL PROTECTED] wrote: Um, I use a newer CMake, just read the docs on CMake.org which are apparently older? On 5/22/07, David Cole

[CMake] CTestCustom.ctest not working?

2007-01-03 Thread Kent Williams
I added a CTestCustom.ctest file to my build directory as suggested on the CMake website, and it doesn't appear to be doing what it is supposed to. I'll include my CTestCustom.ctest file below, but basically I want to suppress warning messages that occur because of third party libraries built

[CMake] Is it possible to use ADD_TEST to execute multiple commands

2006-04-24 Thread Kent Williams
Here's the problem. I have a test that invokes an external program. So I have this in my CMakeLists.txt ADD_TEST(ExampleTest exampleprogram a b c) The problem is that exampleprogram requires the first parameter to be the name of an output file, and will exit with an error return code if

<    1   2