Re: [CMake] append command

2011-08-13 Thread Clifford Yapp
On Sat, Aug 13, 2011 at 5:14 AM, Glenn Coombs glenn.coo...@gmail.com wrote: I haven't seen any discussion yet of my 2nd alternative of getting cmake to automatically convert lists to space separated strings for certain variables like CMAKE_EXE_LINKER_FLAGS_RELEASE.  If cmake did this then

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

2011-07-20 Thread Clifford Yapp
On Mon, Jul 18, 2011 at 8:42 AM, Valentin-Daniel Boca db...@eservicios.indracompany.com wrote: gen_code xxx.idl - xxxIdl.h, xxxIdl.cc, xWrappers.h and xxxWData.h So for every keyword struct there is one more file generated. The first three files are always the same. Given this, I can't know

Re: [CMake] Wiki: version compatibility matrix

2011-07-14 Thread Clifford Yapp
On Tue, Jul 12, 2011 at 4:58 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: now cmake 2.8.5 has been released, could you please if you find the time update that page ? It's really useful :-) Second that motion - it just helped me figure out another issue! :-) Cheers, CY

[CMake] test linker flags?

2011-07-14 Thread Clifford Yapp
Is there a way to test flags supplied to the linker (CMAKE_SHARED_LINKER_FLAGS) in the same way we can test compiler flags with CHECK_C_COMPILER_FLAG? I'd like to check if -Wl,--no-undefined works or not before using it. Cheers, CY ___ Powered by

[CMake] umask settings?

2011-06-29 Thread Clifford Yapp
I'm noticing that a make install done with CMake is not respecting umask settings on Linux - is there some setting I need to tweak to get it to do so? Thanks, CY ___ Powered by www.kitware.com Visit other Kitware open-source projects at

Re: [CMake] Forcing CMake to never search install path

2011-05-19 Thread Clifford Yapp
Michael, At first glance those would be what I need (although it is not clear if I need to specify bin/lib/include for CMAKE_SYSTEM_IGNORE_PATH as well as CMAKE_IGNORE_PATH.) I have tested both out, and unfortunately they do not seem to exclude the CMAKE_INSTALL_PREFIX path when I supply it - I

Re: [CMake] Forcing CMake to never search install path

2011-05-16 Thread Clifford Yapp
I could probably work around the problem by making my own custom Find* modules that checked the paths of results against the CMAKE_INSTALL_PREFIX path, or (eek) maybe even do find_library/_find_library wrapping to filter results globally, but that seems like an awful hack - wouldn't it make more

Re: [CMake] Forcing CMake to never search install path

2011-05-16 Thread Clifford Yapp
On Mon, May 16, 2011 at 4:00 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: So you basically want an opposite to HINTS and PATHS, like e.g. EXCLUDE ? Doesn't sound too bad. Yes, that would work - ideally though I'd like to EXCLUDE the path from ALL finds by defining it once in the

[CMake] Forcing CMake to never search install path

2011-05-15 Thread Clifford Yapp
I've been struggling to find a way to prevent CMake from using CMAKE_INSTALL_PREFIX in any of its FIND_* routines. Generally speaking, stripping it out of CMAKE_SYSTEM_PREFIX_PATH seems to work, but we're still getting situations on Windows where it is finding old libraries from previous program

[CMake] Generating archives and binaries with different PREFIX settings using CPack

2011-04-25 Thread Clifford Yapp
I'm trying to generate both source tarballs and binary packages using CPack, and I'm at something of a loss as to how to achieve the following: I want the binaries (RPM, DEB, etc.) to respect the CMAKE_INSTALL_PREFIX. I want the source tarballs to expand into their directory like a standard

Re: [CMake] Generating archives and binaries with different PREFIX settings using CPack

2011-04-25 Thread Clifford Yapp
Eric, Thanks - that looks like it will do the trick, testing now. Is there a bug report somewhere proposing using CMake-level per-generator variables to control these things? Cheers, CY ___ Powered by www.kitware.com Visit other Kitware open-source

Re: [CMake] Ninja: a small build system closest in spirit to Make

2011-02-11 Thread Clifford Yapp
We could start with the CMakeLists.txt file :-). It doesn't want to do an out of source dir build either, have to see why... On Fri, Feb 11, 2011 at 9:58 AM, David Cole david.c...@kitware.com wrote: I tried compiling it on Windows yesterday with just the following CMakeLists.txt file, and

[CMake] add_custom_target and output file dependencies

2011-02-10 Thread Clifford Yapp
I'm seeing an extremely strange behavior with add_custom_command/add_custom_target, and I'm not sure what's causing it. Background: I'm trying to copy large numbers of files in batch lots during the make process, with a custom target that depends on a list of files and runs a single copy process

Re: [CMake] add_custom_target and output file dependencies

2011-02-10 Thread Clifford Yapp
On Thu, Feb 10, 2011 at 10:48 AM, David Cole david.c...@kitware.com wrote: Show us the surrounding code (i.e. -- the actual copy command) nods - sorry, should have provided more detail. This is an example file that does the copying: SET(FILES_TO_COPY

Re: [CMake] Ninja: a small build system closest in spirit to Make

2011-02-10 Thread Clifford Yapp
That does indeed look interesting. If you can get a generator working I'd be very interested to see what its performance numbers look like and would be glad to test it out - faster building would be great :-). How much work is involved to make a new generator? Cheers, CY 2011/2/10 Nicolas

Re: [CMake] add_custom_target and output file dependencies

2011-02-10 Thread Clifford Yapp
Yep, that looks like it will work - thanks! CY On Thu, Feb 10, 2011 at 11:21 AM, David Cole david.c...@kitware.com wrote: Sorry. Correction here... Make that:   COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel (The touch is the rather important part of

[CMake] Adding a custom line to CMake's makefiles?

2011-02-02 Thread Clifford Yapp
Is there any way to customize the Makefile output from CMake to include user-defined lines (say, something like #include Makefile.inc) at the end of each Make file? Cheers, CY ___ Powered by www.kitware.com Visit other Kitware open-source projects at

Re: [CMake] FindTCL.cmake has a problem?

2011-01-31 Thread Clifford Yapp
It's still being developed, but you might try the version in the BRL-CAD subversion repository, cmake branch: svn co https://brlcad.svn.sf.net/svnroot/brlcad/brlcad/branches/cmake/misc/CMake brlcad_cmake I'm trying to get it as bullet-proof as possible, although I'm not sure how well it will do

Re: [CMake] Get the list of all TARGETS?

2011-01-18 Thread Clifford Yapp
Sounds like this issue: http://www.cmake.org/pipermail/cmake/2010-September/039388.html I can confirm the wrapper function approach works, using it in BRL-CAD. CY On Tue, Jan 18, 2011 at 5:10 AM, Michael Wild them...@gmail.com wrote: On 01/18/2011 10:55 AM, Eric Noulard wrote: Hi All, Is

Re: [CMake] FindX11.cmake - add paths?

2011-01-18 Thread Clifford Yapp
Let me check - it's possible that was a change I ended up making early in the process, before I had some other variables set... CY On Tue, Jan 18, 2011 at 3:12 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Sunday 19 December 2010, Clifford Yapp wrote: Looking at my local copy

Re: [CMake] From autotools to cmake for existing project

2011-01-16 Thread Clifford Yapp
(whoops, meant to CC the list) On Tue, Jan 11, 2011 at 7:40 AM, Carlos Lopez Gonzalez carloslopezgonza...@yahoo.es wrote: So the question is: which is the best strategy to allow synfig to use cmake? I know that it might be a very complex question but I want to know which are the major

[CMake] Maintainer for FindX11, FindOpenGL, and FindTCL (and friends)

2010-12-20 Thread Clifford Yapp
Looking at http://www.cmake.org/Wiki/CMake:Module_Maintainers (thanks Brad for the link) it looks like my best option may be to actually volunteer for the maintainership of FindX11, FindOpenGL and FindTCL(sh/stubs/etc...), as they are not listed as being actively maintained. Since I need these

Re: [CMake] Maintainer for FindX11, FindOpenGL, and FindTCL (and friends)

2010-12-20 Thread Clifford Yapp
On Mon, Dec 20, 2010 at 8:23 PM, Alan W. Irwin ir...@beluga.phys.uvic.ca wrote: I agree that finding Tcl extensions such as Tk that are consistent with the version of Tcl that is found is important.  We have run across this issue with the CMake-based PLplot build system and would welcome a

[CMake] Enhanced FindTCL.cmake

2010-12-19 Thread Clifford Yapp
In the course of my work converting BRL-CAD to CMake, I have had to expand quite a bit on the standard FindTCL.cmake included with CMake. Among other issues, BRL-CAD needs to be able to: 1) detect threaded vs. non-threaded tcl 2) determine if Tk is built for X11 or Aqua graphics systems (OSX) 3)

[CMake] Suggest change to FindOpenGL.cmake

2010-12-19 Thread Clifford Yapp
Currently, the FindOpenGL.cmake file in CMake doesn't have much support for X11 OpenGL on APPLE - I'd like to suggest a relatively small change that I've had pretty good luck with and would make this much simpler for a CMakeLists.txt file to address:

[CMake] FindX11.cmake - add paths?

2010-12-19 Thread Clifford Yapp
Looking at my local copy of FindX11.cmake, I note that the only change is to add a number of directories to the X11_INC_SEARCH_PATH and X11_LIB_SEARCH_PATH variables. Perhaps these could be added to the default FindX11.cmake? --- cmake-2.8.3/Modules/FindX11.cmake 2010-11-03 15:58:27.0

Re: [CMake] Enhanced FindTCL.cmake

2010-12-19 Thread Clifford Yapp
Hmm... - on second thought perhaps this isn't a bug tracker issue? I thought since it was a change to an existing module instead of a new module these Tcl/Tk improvements (and the opengl suggestion) were suitable for reporting, but perhaps not - if not my apologies. If the bug needs to be closed

[CMake] Ensuring spaces in CFLAGS reach Visual Studio project files

2010-12-17 Thread Clifford Yapp
I have a situation where I need to pass strings with spaces in them as definitions in CFLAGS, e.g. SET(CMAKE_C_CFLAGS -DINPUT_STRING=\\\first\\ second\\\) This is NOT working for Visual Studio, which is apparently quite picky about this - it apparently needs to end up with something like:

[CMake] Building a mega library after building smaller component libraries?

2010-12-13 Thread Clifford Yapp
Can anyone tell me what the best way is (without a whole lot of rebuilding) to take several individual libraries and combine them into a single large library? In our autotools Makefile.am, we have the following: libbrlcad_la_SOURCES = libbrlcad_la_LDFLAGS = -version-info 19:1 libbrlcad_la_LIBADD

Re: [CMake] Building a mega library after building smaller component libraries?

2010-12-13 Thread Clifford Yapp
Ah, I'm informed that what I was after was this: http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F and I won't be able to duplicate this result with CMake (at least, using that mechanism.) CY On Mon, Dec 13, 2010 at 6:13 PM, Clifford Yapp cliffy...@gmail.com

Re: [CMake] Wiki: version compatibility matrix

2010-12-04 Thread Clifford Yapp
Wow that is impressive. Not only does it lay out the version information well, it also represents a very nice overview of available knobs to tweak - I've already spotted one or two I need to roll back into my own CMake scripts, and I'm sure there are more.Thank you for all the time and effort

Re: [CMake] cmake config.h

2010-11-27 Thread Clifford Yapp
To the best of my knowledge, there is no automatic feature available in CMake for this. Fortunately, it is not terribly hard to set up something reasonably functional yourself with a few Macros - autoheader uses some fairly standard naming conventions. For BRL-CAD I've wrapped the key tests in

Re: [CMake] Converting from autoconf to cmake problem

2010-11-02 Thread Clifford Yapp
On Tue, Nov 2, 2010 at 12:24 PM, Aaron Turner synfina...@gmail.com wrote: Michael brings up a good point and I'd take it one step further. Rather then re-creating the laundry list of Autoconf macros, I'd rather just see a few macros like: CMAKE_CHECK_C99_COMPATIBILITY

Re: [CMake] Converting from autoconf to cmake problem

2010-10-30 Thread Clifford Yapp
CMake does not provide replacements for all the specific AC_* tests, although in most cases the functionality can be created with what it does provide. I'm having to do a fair bit of this kind of AC_* function re-creation for Tcl, and had to do a bit for BRL-CAD as well - I imagine as more

[CMake] Bootstrap script generation?

2010-10-15 Thread Clifford Yapp
CMake itself, when building from source, has a bootstrap script it uses to get going. Can such scripts be generated by CMake for other project to enable building on machines without CMake? ___ Powered by www.kitware.com Visit other Kitware open-source

[CMake] Adding a library to link in during TRY_RUN with Windows/nmake?

2010-10-12 Thread Clifford Yapp
I'm trying to compile some C code using TRY_RUN that uses gethostname, but in order for this code to succeed on Windows it needs /link ws2_32.lib added to the compile line. I have tried putting this string into the ARGS variable of TRY_RUN and a couple of CMake variables, but the compile still

[CMake] Basic example of adding an MSVC project with ExternalProject_Add?

2010-10-08 Thread Clifford Yapp
I would like to use the ExternalProject_Add command to add a pre-existing MSVC build system into a CMake generated MSVC project, but I can't seem to find any examples of this and I haven't the least idea what commands to supply for CONFIGURE/BUILD/etc. in order to bring in the MSVC files. Can

Re: [CMake] How would I use parallel make on ExternalProjects?

2010-10-06 Thread Clifford Yapp
I use $(MAKE) in my BUILD_COMMAND and that seems to do OK, although I don't know if it works universally. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages

[CMake] Re-configuration, ExternalProjects, etc.

2010-09-29 Thread Clifford Yapp
After working for a while at converting a project to CMake, I would like to ask a question/suggest a feature for CMake. The project I am working on (BRL-CAD) includes various external libraries that it relies on on a subdirectory, with a variety of options for enabling and disabling use of the

[CMake] Ensuring correct linkage to local target library

2010-09-18 Thread Clifford Yapp
I have a situation where there exists on some systems a library (/lib/librt.so.1) that conflicts with the name we use for BRL-CAD's raytracing library (also librt). For various reasons, I can't rename our lib - this means I have to deal with the situation where there exists a system library with

[CMake] RPATH_CHECK and make install

2010-09-09 Thread Clifford Yapp
I've got rather an odd problem, and I'm not even sure how to start debugging it. I am building a library and exec files with CMake, and the build appears to succeed. But when I run make install, the files are gone - erased. I've traced it as far as a FILE(RPATH_CHECK ...) test in the install

Re: [CMake] RPATH_CHECK and make install

2010-09-09 Thread Clifford Yapp
Nevermind, got the build output variables and the install variables mixed - was causing funny behavior. On Thu, Sep 9, 2010 at 10:45 AM, Clifford Yapp cliffy...@gmail.com wrote: I've got rather an odd problem, and I'm not even sure how to start debugging it.  I am building a library and exec

Re: [CMake] Getting a list of all targets?

2010-09-06 Thread Clifford Yapp
Ah, I'm starting to get the idea now - the use of the _cmd-name effect didn't click right away. That just might do the trick - nifty! Thanks everyone for your help! CY Well, if Michael's correct about the original form being available with an _ prefix, then at least you wouldn't have to

[CMake] Getting a list of all targets?

2010-09-05 Thread Clifford Yapp
Is there any way within a CMakeLists.txt file to get a list of all the currently defined targets? I'm interested in this for two primary reasons, and if anyone can point me to other solutions for these that would be great, but I'm sort of stumped. 1) I have a timestamp rule that prints out the

Re: [CMake] Getting a list of all targets?

2010-09-05 Thread Clifford Yapp
I was hoping I wouldn't need to do a custom wrapper for every target, particularly since I'm building some sub-projects using foreign CMakeLists.txt files and I'd really rather not change them from their default state - that's an extra maintainance burden and one of the advantages I'm most hoping

[CMake] FIND_PATH and CMAKE_INSTALL_PREFIX

2010-09-02 Thread Clifford Yapp
I have a setup in CMake where I am deliberately re-setting a few variables to NOTFOUND in macros in order to allow an option change to re-populate them. Unfortunately, I have run into a rather curious behavior that I'm not quite sure how to disable. The FIND_* routines on the first configure

Re: [CMake] FIND_PATH and CMAKE_INSTALL_PREFIX

2010-09-02 Thread Clifford Yapp
Nevermind, carry on - I realized that all I had to do was set CMAKE_INSTALL_PREFIX to at the beginning of the file - it's off for the Find* routines and re-set by the end of the process. CY On 9/2/10, Clifford Yapp cliffy...@gmail.com wrote: I have a setup in CMake where I am deliberately re

Re: [CMake] Example using ExternalProject for configure+make and/or Win32?

2010-08-19 Thread Clifford Yapp
On Thu, Aug 19, 2010 at 11:14 PM, Brian Davis bitmi...@gmail.com wrote: there is :     [CONFIGURE_COMMAND cmd...]  # Build tree configuration command so may be this works.  I have not used it so I can not speak to it. problem will be if on Windows systems is finding an autotools that

[CMake] Solaris bootstrap?

2010-08-17 Thread Clifford Yapp
I tried to bootstrap CMake on Solaris, and got the following error: cmake-build/Source/cmsys/FundamentalType.h, line 50: Error: #error Cannot determine sizeof(int). Does anyone know if this has been fixed in the development tree? Cheers, CY ___

[CMake] Start-of-Build timestamp?

2010-08-13 Thread Clifford Yapp
Does anybody have an example where they use CMake (and probably a little C code) to generate a file with a timestamp for the beginning and/or end of the build in a cross-platform manner? I know CMake can't do this itself if you assume only the Makefiles/Visual Studio build logic at build time,

[CMake] autoheader-like functionality?

2010-07-29 Thread Clifford Yapp
I'm now at the point in writing CMake logic where I need to handle the config.h.in situation, and either have missed the autoheader equivalent functionality in CMake or it doesn't exist yet. Can anybody point me to the right approach to this? I have so-far found: The #cmakedefine mechanism and

[CMake] library name from subdirectory and setting the CACHE - a listening variable?

2010-07-28 Thread Clifford Yapp
OK, I've had more time to play with CMake and subdirectory CMakeList.txt files, and I'm getting close to the behavior I want. I can conditionally override key variables to use either local or system versions of a library, and I can trigger the builds conditionally as well. Using the strings

Re: [CMake] library name from subdirectory and setting the CACHE - a listening variable?

2010-07-28 Thread Clifford Yapp
Ironically, I now see this issue (almost exactly) was discussed long ago: http://www.cmake.org/pipermail/cmake/2005-September/007204.html However, when I try: get_directory_property(PNG_LIB_NAME DIRECTORY src/other/libpng DEFINITION PNG_LIB_NAME) MESSAGE(getdirprop: ${PNG_LIB_NAME}) I get

Re: [CMake] library name from subdirectory and setting the CACHE - a listening variable?

2010-07-28 Thread Clifford Yapp
Got it - was using a VTK macro for third_party inclusion that was using SUBDIRS - switching it to ADD_DIRECTORY got me going. Awesome! Thanks! CY ___ Powered by www.kitware.com Visit other Kitware open-source projects at

[CMake] Subdirectories and FIND_LIBRARY routines

2010-07-26 Thread Clifford Yapp
Hi! I have a rather oddball question, and I'm not quite sure if I'm even asking the right question, but I'll describe the circumstances and see if it makes sense... I am trying to set up a CMake project which includes as subdirectories other CMake projects, but it does so only conditionally.

Re: [CMake] Subdirectories and FIND_LIBRARY routines

2010-07-26 Thread Clifford Yapp
Olaf, zlib is just an example. I'm working on building BRL-CAD, which has a number of such libs, some of them not common at all. Also, the project policy is to have the libs in src/other available for local compile at need, so that part of it isn't up to me :-/. CY On Mon, Jul 26, 2010 at

Re: [CMake] Subdirectories and FIND_LIBRARY routines

2010-07-26 Thread Clifford Yapp
It looks like the thread Configuring targets software that isn't yet built also touches on the issue I'm facing. Hmm - wonder if I can work a trick with setting ZLIB_LIBRARY to just the name of the subdirectory library target... looks like I have some tests to run. CY

<    1   2