Re: [cmake-developers] [CMake 0012280]: FindSWIG won't find swig 1.3
On 2011-06-15 16:19-0400 Mantis Bug Tracker wrote: The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=12280 == Reported By:Julien Malik Assigned To: == Project:CMake Issue ID: 12280 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2011-06-15 16:19 EDT Last Modified: 2011-06-15 16:19 EDT == Summary:FindSWIG won't find swig 1.3 Description: I have swig 1.3 installed, but not 2.0 CMake won't find swig automatically. If I install 2.0, swig is found correctly. The attached patch fixes it. Seems like find_program is not called with conventions from the documentation. Steps to Reproduce: project(TestFindSWIG) cmake_minimum_required(VERSION 2.8) find_package(SWIG) Brad has accepted this patch and closed the bug. However, I am interested because PLplot uses swig-1.3 with no user reports of problems (has done for years). I personally have never seen swig finding problems for Linux and also a MinGW/MSYS/wine platform. Furthermore, I cannot reproduce the bug even with the simple test example above for my platform (Debian stable with CMake-2.8.4 that I built myself, and swig version 1.3.40-3). On the other hand, the patch does look correct to me. So, Brad, how in the world does find_package(SWIG) work at all for both my Linux and wine platforms? Or to put it another way, for what platforms (with swig-1.3) will this bug be triggered (until the fix goes into a release)? Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [CMake 0012280]: FindSWIG won't find swig 1.3
On 06/16/2011 12:54 PM, Alan W. Irwin wrote: Brad has accepted this patch and closed the bug. However, I am interested because PLplot uses swig-1.3 with no user reports of problems (has done for years). I personally have never seen swig finding problems for Linux and also a MinGW/MSYS/wine platform. Furthermore, I cannot reproduce the bug even with the simple test example above for my platform (Debian stable with CMake-2.8.4 that I built myself, and swig version 1.3.40-3). On the other hand, the patch does look correct to me. So, Brad, how in the world does find_package(SWIG) work at all for both my Linux and wine platforms? Or to put it another way, for what platforms (with swig-1.3) will this bug be triggered (until the fix goes into a release)? The fix was obviously a modernization independent of any behavior correction so I took the patch without actually verifying a behavior change. It might well have worked before. Perhaps the submitter had other issues interacting during testing. Since you're looking at this anyway please verify that the new version works for you! -Brad ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0012283]: Cmake -E echo kills performance of MinGW Makefiles
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=12283 == Reported By:Jérôme Gardou Assigned To: == Project:CMake Issue ID: 12283 Category: CMake Reproducibility:always Severity: tweak Priority: normal Status: new == Date Submitted: 2011-06-16 15:07 EDT Last Modified: 2011-06-16 15:07 EDT == Summary:Cmake -E echo kills performance of MinGW Makefiles Description: Instead of '@echo some text', MinGW Makefiles generator use '@cmake -E echo some text' Quoting cmake source code comment : // mingw32-make has trouble running code like // // @echo message with spaces // // If quotes are added // // @echo message with spaces // // it runs but the quotes are displayed. Instead just use cmake to // echo. which I am unable to confirm. Maybe an old version of mingw32-make? Furthermore, using @echo avoids garbage output in case of a parallel build Please find patch attached :-) Steps to Reproduce: Just trigger a mingw32-make help into the build directory of a library, and benchmark it with/without the patch. I can see the difference even with a medium sized library. == Issue History Date ModifiedUsername FieldChange == 2011-06-16 15:07 Jérôme Gardou New Issue 2011-06-16 15:07 Jérôme Gardou File Added: 0004-MinGW-Makefile-Generator-use-native-echo-command.patch == ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Adding argument OPTIONAL to find_package() and add_subdirectory
On Thursday 09 June 2011, Brad King wrote: On 6/9/2011 8:50 AM, Alexander Neundorf wrote: ... I think this can be handled. find_package() should error out in this case, because Bar was required but it was disabled. Maybe this option to disable a find_package() could even be provided for all find_package() calls, and for each REQUIRED one it will cause an error. This would create a bunch of unusable options, but would be very consistent ;-) Okay. However, the option does not need to be provided as a gui-settable value for packagers to be able to disable things from build scripts. The command could honor the value if it is present but not advertise it. I'll push a branch to the stage once 2.8.5 is released. Or can I do that earlier ? Alex ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Adding argument OPTIONAL to find_package() and add_subdirectory
On 06/16/2011 04:15 PM, Alexander Neundorf wrote: I'll push a branch to the stage once 2.8.5 is released. Or can I do that earlier ? You can push it any time but skip merging it. Don't expect it to be in 2.8.5 though ;) Thanks, -Brad ___ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [CMake] Please help with procedure for making contributions
On Wed, Jun 15, 2011 at 8:48 PM, Steven Velez sbv1...@gmail.com wrote: Hi All, After having searched the cmake web site and wiki, I have been unable to find a documented procedure for submitting patches to CMake. Via brwosing the bug tracker and watching this list, it seems generally apparent that a non-committer who wants to make a contribution simply opens an issue and attaches his (or her) patch. Is that all there is to it? Yes, that's it. This list and its traffic are the living documentation of CMake, if you will. While we do have the official help documentation web pages, and there is some good stuff on the Wiki, asking here is the way to get answers when searching teh Interwebz yields nothing. To contribute a patch, please search the bug database for an existing issue (or open a new one if necessary), and attach it there. To preserve your authorship in the patch, prepare a git commit with the correct authorship in it, and then use the git command: git format-patch -1 I imagine that like most developers working for an organization focusing on closed source software, everything I produce is legally theirs, so I have been very careful about getting permission from them to make a contribution. However, they would like me to be completely sure of all formalities that must be followed in doing so. For example, do you have contributors sign an assignment of copyright or some other contributor's agreement? Are there any cases in which contributions will not be covered by the same BSD license that CMake is covered by. (be aware, that my patch is very small, and we are just crossing t's). Any information would be appreciated. We do not have an official contributor's agreement that needs to be signed. But if your patch just blends stuff into the existing code base (crossing t's or dotting i's), then it becomes part of the existing code base, covered by the same license CMake is covered by. I am not a lawyer, but the intent of contributing code to an open source project is to allow that project to copy it around and freely distribute it. So if you want to keep any kind of copyright for yourself (or your company), do not contribute it unless you're willing to allow the project to do that even though you retain your own copyright. (You'll notice some of the module files have additional copyrights on top of the standard CMake copyright notice.) Thanks, Steven You're welcome, David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindOpenEXR.cmake inclusion in cmake modules?
First, ask if the module is really necessary. If, instead, you can add an OpenEXRConfig.cmake file to the OpenEXR project itself, and install it in a place that cmake's find_package will automatically find it, then a find module is unnecessary. However, if that's not possible or practical, then... Follow the directions here on becoming a module maintainer: http://www.cmake.org/Wiki/CMake:Module_Maintainers If anything is unclear, ask here for clarification. Thanks, David On Wed, Jun 15, 2011 at 11:25 PM, Campbell Barton ideasma...@gmail.comwrote: Recently I decided to start moving some of our projects hard coded paths into Find***.cmake modules. Incidentally the libs are libsamplerate, libFFTW3, libsndfile, libjemalloc, OpenEXR, OpenJPEG, libpcre. I started out with OpenEXR, and tried to comply with the module readme.txt, and used FindTIFF/Boost/OpenGL as references too. Heres the module, https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmake/Modules/FindOpenEXR.cmake _after_ writing this I found that there are 3 other projects who also wrote their own FindOpenEXR.cmake modules, http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/FindOpenEXR.cmake?r=HEAD http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/CMakeModules/FindOpenEXR.cmake?rev=HEAD http://www.openlibraries.org/browser/trunk/FindOpenEXR.cmake From a quick look at all of them I'm not worried that I wrote my own since they don't support defining a custom root or follow cmake's guidelines very well, The main issue with mine is it only works on *nix right now, so MSVC support has to be added (which I will add). If OpenEXR is not considered too niche a library which to bother including, whats the best way to get this module included with CMake? -- - Campbell ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] git log automation in cmake
Hi, Is there anyway to produce ChangeLog file from git, when running cmake on the code? For start, I would like the simple command: git log ChangeLog I'm running cmake like that: mkdir /tmp/builddir cd /tmp/builddir cmake /path/to/my/project Can this last command also generate ChangeLog on the fly? Regards, Kfir ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] git log automation in cmake
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:execute_process On Thu, Jun 16, 2011 at 8:45 AM, Kfir Lavi lavi.k...@gmail.com wrote: Hi, Is there anyway to produce ChangeLog file from git, when running cmake on the code? For start, I would like the simple command: git log ChangeLog I'm running cmake like that: mkdir /tmp/builddir cd /tmp/builddir cmake /path/to/my/project Can this last command also generate ChangeLog on the fly? Regards, Kfir ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to set a preprocessor define for all build configurations except one ?
On 13 June 2011 02:53, Michael Hertling mhertl...@online.de wrote: AFAIK, there's no other approach to take account of single- and multi- config generators at the same time for this purpose, but perhaps, you could design the loop a bit smarter: FOREACH(i IN LISTS CMAKE_CONFIGURATION_TYPES ITEMS ${CMAKE_BUILD_TYPE}) STRING(TOUPPER ${i} j) IF(NOT j MATCHES RELEASENOOUTFILES) SET_PROPERTY(...) ENDIF() ENDFOREACH() I wasn't aware of that syntax of the foreach command - that does tidy it up a bit. and rely on the assumption that (1) the FLAGS are mentioned after the COMPILE_DEFINITIONS, and (2) the last -D/-U argument in the command line will take effect. At least, GCC guarantees that (2) holds, but I have not found any explicit assertion in the documentation that CMake guarantees (1), though it seems to work in this way. I'm not overly keen on that solution. BTW, is an inverted logic an option, i.e. a preprocessor definition NO_GEN_OUTFILES enabled for the RELEASENOOUTFILES configuration only? This would be much easier and fit that configuration's intent better. The default is to generate outfiles and the code is littered with blocks like this: #ifdef GEN_OUTFILES ... #endif Changing them to #ifndef NO_GEN_OUTFILES would work but the double negative makes the code less readable. I'll stick with what I already have for the moment, but add your modification to the foreach loop. Thanks, -- Glenn ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Generated files and dependencies
Hi all, I have one issue with organising dependencies between projects. I have three projects, - first is application which contain static code of the application, - second is library which is contain code for the library, - third is library which generates the source code and headers, and provide library. First project is link against static library, and generated library. Generated headers from third project are used by first and second project. the application project looks like (in a hudge simplification): project(application) add_subdirectory(librarygen) add_subdirectory(library) add_executable(application sources1..x) My question is what is the common practice of creating dependencies? e.g library project is not aware about how to generate the headers, generated makefiles will try to run generation of librarygen and compilation library at the same time, since it is wrong the situation is changing when I manualy specify dependencies: add_dependencies(library librarygen) Is there any other mechanism inside cmake to manage dependencies between cmake projects to files that will be generated? What is the common practice with code generation? thanks in advance, Lukasz -- Lukasz Tasz ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Support for Custom LANG in CMAKE (CUDA and general case)
I don't understand what you mean by partially. If you had cuda_add_executable(demo main.cxx demo1.cu demo2.cu), then main.cxx will be compiled by the host compiler, demo1.cu and demo2.cu will be compiled by nvcc (CUDA + host compiler), and then all will be linked by the host linker. In this case I need to agree with you. But I would still vote to have transparency, provide common interface to developers. From my perspective cuda is the same compiler like c++, that's why I would vote to provide the same interface like for CXX or C. The problem with dependencies I think relates to how the build system represents them. In makefiles the dependencies are explicitly defined, while in Visual Studio the dependencies for C code is handled by the IDE and other files are explicit. It seems like a lot of effort to extend CMake dependency scanning capabilities when this functionality can only be extended to makefiles. Is this what you are desiring? As far as I correctly understood patch from Peter, implementation for makefile dependency is on place. For me makefile dependency is fine, since I'm using only makefiles. I just tried to understand idea of LANGUAGE inside cmake. I think that in this particular case having new language on place is really good idea. This is what for language was. regards Lukasz -- Lukasz Tasz ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to set a preprocessor define for all build configurations except one ?
On 06/16/2011 03:18 PM, Glenn Coombs wrote: On 13 June 2011 02:53, Michael Hertling mhertl...@online.de wrote: AFAIK, there's no other approach to take account of single- and multi- config generators at the same time for this purpose, but perhaps, you could design the loop a bit smarter: FOREACH(i IN LISTS CMAKE_CONFIGURATION_TYPES ITEMS ${CMAKE_BUILD_TYPE}) STRING(TOUPPER ${i} j) IF(NOT j MATCHES RELEASENOOUTFILES) SET_PROPERTY(...) ENDIF() ENDFOREACH() I wasn't aware of that syntax of the foreach command - that does tidy it up a bit. and rely on the assumption that (1) the FLAGS are mentioned after the COMPILE_DEFINITIONS, and (2) the last -D/-U argument in the command line will take effect. At least, GCC guarantees that (2) holds, but I have not found any explicit assertion in the documentation that CMake guarantees (1), though it seems to work in this way. I'm not overly keen on that solution. BTW, is an inverted logic an option, i.e. a preprocessor definition NO_GEN_OUTFILES enabled for the RELEASENOOUTFILES configuration only? This would be much easier and fit that configuration's intent better. The default is to generate outfiles and the code is littered with blocks like this: #ifdef GEN_OUTFILES ... #endif Changing them to #ifndef NO_GEN_OUTFILES would work but the double negative makes the code less readable. I'll stick with what I already have for the moment, but add your modification to the foreach loop. IMO, the default should not need to be explicitly enabled but the exception, and readability - though important - is subordinate to functionality, but probably, this is a matter of personal taste. However, if you stick with the GEN_OUTFILES definition, be aware of the single-config generator with an empty build type. In that case, only the COMPILE_DEFINITIONS property is in effect, so you must add the GEN_OUTFILES definition to it, but with a non-empty build type, this config-less property is in effect, too, so you must *not* add GEN_OUTFILE to it. Thus, you need to differentiate these cases: IF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) FOREACH(... IN LISTS ... ITEMS ...) # Set COMPILE_DEFINITIONS_CONFIG. ENDFOREACH() ELSE() # Set COMPILE_DEFINITIONS. ENDIF() Clearly, this cuts down the elegance of the FOREACH loop, while the inverted approach with NO_GEN_OUTFILES would be unalteredly smooth. Regards, Michael ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Generated files and dependencies
On Thu, Jun 16, 2011 at 10:00 AM, Łukasz Tasz luk...@tasz.eu wrote: Hi all, I have one issue with organising dependencies between projects. I have three projects, - first is application which contain static code of the application, - second is library which is contain code for the library, - third is library which generates the source code and headers, and provide library. First project is link against static library, and generated library. Generated headers from third project are used by first and second project. the application project looks like (in a hudge simplification): project(application) add_subdirectory(librarygen) add_subdirectory(library) add_executable(application sources1..x) My question is what is the common practice of creating dependencies? e.g library project is not aware about how to generate the headers, generated makefiles will try to run generation of librarygen and compilation library at the same time, since it is wrong the situation is changing when I manualy specify dependencies: add_dependencies(library librarygen) Is there any other mechanism inside cmake to manage dependencies between cmake projects to files that will be generated? What is the common practice with code generation? thanks in advance, Lukasz -- Lukasz Tasz ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake add_dependencies(library librarygen) is the common practice when custom inter-dependent steps are spread across multiple directories. HTH, David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] ccmake options organization
On Mon, Jun 13, 2011 at 6:23 PM, Bill Hoffman bill.hoff...@kitware.com wrote: On 6/13/2011 11:02 AM, Szilárd Páll wrote: I would also very much like to see some form of grouping to be possible in ccmake. Right now, the only way to avoid clutter is to mark the large majority of the variables as advanced and keep only the ones that would be used frequently used and this is still just a half-baked solution. One neat way would be to have a tree-like structure (like aptitude) based on variable prefix or even manually listed grouping would be very helpful. We would be very interested in added features to ccmake. However, we really do not have a curses expert on the team at the moment. If someone has that experience and would like to contribute, that would be great. Other than that, I don't think much will happen to ccmake. I'm not a curses expert but I will try to enhance ccmake on my spare time. -Nico ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] TGZ installer following links
I am using the TGZ packager. My dist looks something like topdir nextdir link - nextdir/lowerdir lowerdir It seems that CPACK, instead of copying the link, follows the link so that I get two copies of lowerdir. Is this expected? Can I change this behavior? ThxJohn Cary ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Interrogate header files without TRY_RUN
Hi All, Is there a way for CMake to search for macro definitions in header files without doing a try_run? The reason I'm asking is that eventually I'll require FindPython.cmake to report the version of python that it finds. But I don't want to do this by checking the directory names (which is unreliable) or by doing a try_run (for the sake of cross-compilation). Running the python executable itself to find the version is also out, due to cross-compilation. For the VTK wrappers I've written a pseudo-preprocessor (vtkWrapPreprocess.c) that does essentially what I need, but not at configure time. I'm thinking of the same thing for CMake... a simple built-in preprocessor that can emulate a compiler and give cmake access to macro definitions without the need for a try_run. Or equivalently the real compiler could run its preprocessor stage and then present the results to cmake. The main thing is to avoid the try_run. Any thoughts? - David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Doesn't support SHARED libraries during cross compiling using ARM RVCT40.
On Thursday 16 June 2011, jianhua wrote: Hi Neundorf; Thanks for your continuous help, you have helped me to solve 2 threads now. After remove line SET (CMAKE_SYSTEM_NAME Generic) now it works. The target device OS is Brew MP, something like eCos, but it is much simpler, powered by Qualcomm. And this supports shared libraries ? http://www.brewmp.com/platform/platform I think the better choice would be to create a Platform/BrewMP.cmake which has all the right stuff, and use set(CMAKE_SYSTEM_NAME BrewMP) in your toolchain file. Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How does cmake find libraries?
On Thursday 16 June 2011, Doug wrote: I've not had a problem with this before, but I'm having an odd issue where cmake is finding libpng when it doesn't exist on an OSX machine. I'm using Findlibpng.cmake: include(LibFindMacros) find_path(LIBPNG_INCLUDE_DIR NAMES png.h PATHS ${LIBPNG_PKGCONF_INCLUDE_DIRS}) find_library(LIBPNG_LIBRARY NAMES png PATHS ${LIBPNG_PKGCONF_LIBRARY_DIRS}) set(LIBPNG_PROCESS_INCLUDES LIBPNG_INCLUDE_DIR) set(LIBPNG_PROCESS_LIBS LIBPNG_LIBRARY LIBPNG_LIBRARIES) libfind_process(LIBPNG) And in my cmake file: FIND_PACKAGE(libpng REQUIRED) When I run cmake it says it found LIBPNG (cmake-gui doesn't request I search for the path manually) and when compile it's erroring: [ 74%] Built target test_sethandler make[2]: *** No rule to make target `/usr/local/lib/libpng.dylib', needed by `tests/na/common/test_common'. Stop. make[1]: *** [tests/na/common/CMakeFiles/test_common.dir/all] Error 2 The obvious reason is that /usr/local/lib/libpng.dylib doesn't exist: arc:mbuild douglasl$ ls /usr/local/lib/ | grep png arc:mbuild douglasl$ But my cmake cache shows: LIBPNG_INCLUDE_DIR:PATH=/Library/Frameworks/Mono.framework/Headers LIBPNG_LIBRARY:FILEPATH=/usr/local/lib/libpng.dylib //ADVANCED property for variable: LIBPNG_INCLUDE_DIR LIBPNG_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: LIBPNG_LIBRARY LIBPNG_LIBRARY-ADVANCED:INTERNAL=1 Can someone shed some light on how cmake is finding that module? That's weird, since cmake checks for existing files. Maybe that file existed before and has been removed, but it is still in the cmake cache ? What does libfind_process() do, what is LibFindMacros.cmake for a file ? Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How does cmake find libraries?
[ 74%] Built target test_sethandler make[2]: *** No rule to make target `/usr/local/lib/libpng.dylib', needed by `tests/na/common/test_common'. Stop. make[1]: *** [tests/na/common/CMakeFiles/test_common.dir/all] Error 2 The obvious reason is that /usr/local/lib/libpng.dylib doesn't exist: arc:mbuild douglasl$ ls /usr/local/lib/ | grep png arc:mbuild douglasl$ But my cmake cache shows: LIBPNG_INCLUDE_DIR:PATH=/Library/Frameworks/Mono.framework/Headers LIBPNG_LIBRARY:FILEPATH=/usr/local/lib/libpng.dylib //ADVANCED property for variable: LIBPNG_INCLUDE_DIR LIBPNG_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: LIBPNG_LIBRARY LIBPNG_LIBRARY-ADVANCED:INTERNAL=1 Can someone shed some light on how cmake is finding that module? Sounds like the machine config is broken, but I'm not sure exactly how to fix it. Does png.h exist in this folder /Library/Frameworks/Mono.framework/Headers John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindOpenEXR.cmake inclusion in cmake modules?
On Thursday 16 June 2011, David Cole wrote: First, ask if the module is really necessary. If, instead, you can add an OpenEXRConfig.cmake file to the OpenEXR project itself, and install it in a place that cmake's find_package will automatically find it, then a find module is unnecessary. However, if that's not possible or practical, then... Follow the directions here on becoming a module maintainer: http://www.cmake.org/Wiki/CMake:Module_Maintainers If anything is unclear, ask here for clarification. Thanks, David On Wed, Jun 15, 2011 at 11:25 PM, Campbell Barton ideasma...@gmail.comwrote: Recently I decided to start moving some of our projects hard coded paths into Find***.cmake modules. Incidentally the libs are libsamplerate, libFFTW3, libsndfile, libjemalloc, OpenEXR, OpenJPEG, libpcre. I started out with OpenEXR, and tried to comply with the module readme.txt, and used FindTIFF/Boost/OpenGL as references too. Heres the module, https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmak e/Modules/FindOpenEXR.cmake I think you should not need to set _openexr_SEARCH_DIRS, I think all these paths are included in the standard search paths. _after_ writing this I found that there are 3 other projects who also wrote their own FindOpenEXR.cmake modules, http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/F indOpenEXR.cmake?r=HEAD http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/C MakeModules/FindOpenEXR.cmake?rev=HEAD http://www.openlibraries.org/browser/trunk/FindOpenEXR.cmake And another one: http://quickgit.kde.org/?p=kdelibs.gita=blobh=405b892d436823ac3b102b4eb0a1126bc168aec7hb=9be5b41d4e933d019d3d30cead9143b3703d10f4f=cmake/modules/FindOpenEXR.cmake Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Interrogate header files without TRY_RUN
On Thursday 16 June 2011, David Gobbi wrote: Hi All, Is there a way for CMake to search for macro definitions in header files without doing a try_run? The reason I'm asking is that eventually I'll require FindPython.cmake to report the version of python that it finds. But I don't want to do this by checking the directory names (which is unreliable) or by doing a try_run (for the sake of cross-compilation). Running the python executable itself to find the version is also out, due to cross-compilation. For the VTK wrappers I've written a pseudo-preprocessor (vtkWrapPreprocess.c) that does essentially what I need, but not at configure time. I'm thinking of the same thing for CMake... a simple built-in preprocessor that can emulate a compiler and give cmake access to macro definitions without the need for a try_run. Or equivalently the real compiler could run its preprocessor stage and then present the results to cmake. The main thing is to avoid the try_run. You could simply read the header file and try to grep fpor the version numbers. Works quite good in many cases. Or you could try to mess around with try_compile(), and search in the produced binary for the version strings. This may need some clever tricks to actually create such a string in the executable. CMake does that for a few things, e.g. to determine the sizes of types, compiler ID, and I think more, see e.g. Modules/CheckTypeSize.*. Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] TGZ installer following links
2011/6/16 John R. Cary c...@txcorp.com: I am using the TGZ packager. Which version of CMake/CPack ? On which platform(s) ? Do you use CPack alone or CMake+CPack? My dist looks something like topdir nextdir link - nextdir/lowerdir lowerdir It seems that CPACK, instead of copying the link, follows the link so that I get two copies of lowerdir. Is this expected? I guess not, symlinks should be packaged just fine on platform where it is supported. Can I change this behavior? Where does the symlinks comes from ? In which CMake INSTALL commands are they found? I use CMake generated symlinks (for versioned shared libs) all the time and this works well with CPack TGZs? May be you can provide us with a minimal example project exhibiting the issue or at least send us your CPackConfig.cmake file. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Interrogate header files without TRY_RUN
On Thu, Jun 16, 2011 at 10:58 AM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: You could simply read the header file and try to grep fpor the version numbers. Works quite good in many cases. Or you could try to mess around with try_compile(), and search in the produced binary for the version strings. This may need some clever tricks to actually create such a string in the executable. CMake does that for a few things, e.g. to determine the sizes of types, compiler ID, and I think more, see e.g. Modules/CheckTypeSize.*. Grepping the headers wouldn't be as reliable as I would like... usually version numbers are stored in an internal config header file that might be moved or renamed from version to the next. Searching the binaries... that would really be a last resort. Does CMake provide a cross-platform way of running the preprocessor and dumping all macros? For example with gcc, I can do gcc -E -dD but I would have to do the same for all other compilers. - David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindOpenEXR.cmake inclusion in cmake modules?
2011/6/16 Alexander Neundorf a.neundorf-w...@gmx.net: On Thursday 16 June 2011, David Cole wrote: First, ask if the module is really necessary. If, instead, you can add an OpenEXRConfig.cmake file to the OpenEXR project itself, and install it in a place that cmake's find_package will automatically find it, then a find module is unnecessary. However, if that's not possible or practical, then... Follow the directions here on becoming a module maintainer: http://www.cmake.org/Wiki/CMake:Module_Maintainers If anything is unclear, ask here for clarification. Thanks, David Is writing a ***Config.cmake file documented?, does this rely on OpenEXR using cmake for their builds? I wasn't aware of this. On Wed, Jun 15, 2011 at 11:25 PM, Campbell Barton ideasma...@gmail.comwrote: Recently I decided to start moving some of our projects hard coded paths into Find***.cmake modules. Incidentally the libs are libsamplerate, libFFTW3, libsndfile, libjemalloc, OpenEXR, OpenJPEG, libpcre. I started out with OpenEXR, and tried to comply with the module readme.txt, and used FindTIFF/Boost/OpenGL as references too. Heres the module, https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmak e/Modules/FindOpenEXR.cmake I think you should not need to set _openexr_SEARCH_DIRS, I think all these paths are included in the standard search paths. does this work for FIND_PATH as well as FIND_LIBRARY? _after_ writing this I found that there are 3 other projects who also wrote their own FindOpenEXR.cmake modules, http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/F indOpenEXR.cmake?r=HEAD http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/C MakeModules/FindOpenEXR.cmake?rev=HEAD http://www.openlibraries.org/browser/trunk/FindOpenEXR.cmake And another one: http://quickgit.kde.org/?p=kdelibs.gita=blobh=405b892d436823ac3b102b4eb0a1126bc168aec7hb=9be5b41d4e933d019d3d30cead9143b3703d10f4f=cmake/modules/FindOpenEXR.cmake Alex Noticed KDE's FineOpenEXR.cmake uses pkg-config, Is this considered best practice? -- - Campbell ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] TGZ installer following links
On 6/16/11 12:09 PM, Eric Noulard wrote: 2011/6/16 John R. Caryc...@txcorp.com: I am using the TGZ packager. Sorry, my error in not providing more complete info: Which version of CMake/CPack ? On which platform(s) ? octet.cary$ cmake --version cmake version 2.8.3 octet.cary$ uname -a Linux octet.carys.home 2.6.30.10-105.2.23.fc11.x86_64 #1 SMP Thu Feb 11 07:06:34 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux octet.cary$ Do you use CPack alone or CMake+CPack? I have CPACK inside my CMakeLists.txt. My dist looks something like topdir nextdir link - nextdir/lowerdir lowerdir It seems that CPACK, instead of copying the link, follows the link so that I get two copies of lowerdir. Is this expected? I guess not, symlinks should be packaged just fine on platform where it is supported. Can I change this behavior? Where does the symlinks comes from ? In which CMake INSTALL commands are they found? if (NOT Win32) install(CODE foreach (subdir foo bin current) execute_process(COMMAND ln -s Bar/\${subdir} . WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/${FLAVOR_INSTALL_ROOT} ) endforeach () ) endif () I use CMake generated symlinks (for versioned shared libs) all the time and this works well with CPack TGZs? I am using links for a directory instead of a library. May be you can provide us with a minimal example project exhibiting the issue or at least send us your CPackConfig.cmake file. If the above does not immediately suggest a solution to someone, I will create a test case. Thx for your help.John Cary ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] FindOpenEXR.cmake inclusion in cmake modules?
On Thursday 16 June 2011, Campbell Barton wrote: 2011/6/16 Alexander Neundorf a.neundorf-w...@gmx.net: On Thursday 16 June 2011, David Cole wrote: First, ask if the module is really necessary. If, instead, you can add an OpenEXRConfig.cmake file to the OpenEXR project itself, and install it in a place that cmake's find_package will automatically find it, then a find module is unnecessary. However, if that's not possible or practical, then... Follow the directions here on becoming a module maintainer: http://www.cmake.org/Wiki/CMake:Module_Maintainers If anything is unclear, ask here for clarification. Thanks, David Is writing a ***Config.cmake file documented?, Yes. There should be something in the wiki, and the make page for cmake, under find_package(). Here is also an exmaple how to do it for a library: https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/master/show/buildsystem/HowToInstallALibrary does this rely on OpenEXR using cmake for their builds? Well, they can be also written manually, but for somebody who isn't fluent with cmake it's IMO not really an option. I wasn't aware of this. On Wed, Jun 15, 2011 at 11:25 PM, Campbell Barton ideasma...@gmail.comwrote: Recently I decided to start moving some of our projects hard coded paths into Find***.cmake modules. Incidentally the libs are libsamplerate, libFFTW3, libsndfile, libjemalloc, OpenEXR, OpenJPEG, libpcre. I started out with OpenEXR, and tried to comply with the module readme.txt, and used FindTIFF/Boost/OpenGL as references too. Heres the module, https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/c mak e/Modules/FindOpenEXR.cmake I think you should not need to set _openexr_SEARCH_DIRS, I think all these paths are included in the standard search paths. does this work for FIND_PATH as well as FIND_LIBRARY? Yes. _after_ writing this I found that there are 3 other projects who also wrote their own FindOpenEXR.cmake modules, http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmak e/F indOpenEXR.cmake?r=HEAD http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trun k/C MakeModules/FindOpenEXR.cmake?rev=HEAD http://www.openlibraries.org/browser/trunk/FindOpenEXR.cmake And another one: http://quickgit.kde.org/?p=kdelibs.gita=blobh=405b892d436823ac3b102b4eb 0a1126bc168aec7hb=9be5b41d4e933d019d3d30cead9143b3703d10f4f=cmake/modul es/FindOpenEXR.cmake Alex Noticed KDE's FineOpenEXR.cmake uses pkg-config, Is this considered best practice? Personally, I don't consider it best practice. Alex ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Please help with procedure for making contributions
Thanks for the follow-up. We are aware that the idea is to copy and freely distribute the code and all contributions. I think the idea is that IF we are required to sign an agreement, then it doesn't impose any odd, additional requirements/request of us. I think our legal department also mentioned something about being clear on the intentions of expectations of other contributors when we are USING the software, but I believe this is secondary in the contribution case. Thanks, and hopefully I will actually be able to submit the patch soon. Steven On Thu, Jun 16, 2011 at 7:36 AM, David Cole david.c...@kitware.com wrote: On Wed, Jun 15, 2011 at 8:48 PM, Steven Velez sbv1...@gmail.com wrote: Hi All, After having searched the cmake web site and wiki, I have been unable to find a documented procedure for submitting patches to CMake. Via brwosing the bug tracker and watching this list, it seems generally apparent that a non-committer who wants to make a contribution simply opens an issue and attaches his (or her) patch. Is that all there is to it? Yes, that's it. This list and its traffic are the living documentation of CMake, if you will. While we do have the official help documentation web pages, and there is some good stuff on the Wiki, asking here is the way to get answers when searching teh Interwebz yields nothing. To contribute a patch, please search the bug database for an existing issue (or open a new one if necessary), and attach it there. To preserve your authorship in the patch, prepare a git commit with the correct authorship in it, and then use the git command: git format-patch -1 I imagine that like most developers working for an organization focusing on closed source software, everything I produce is legally theirs, so I have been very careful about getting permission from them to make a contribution. However, they would like me to be completely sure of all formalities that must be followed in doing so. For example, do you have contributors sign an assignment of copyright or some other contributor's agreement? Are there any cases in which contributions will not be covered by the same BSD license that CMake is covered by. (be aware, that my patch is very small, and we are just crossing t's). Any information would be appreciated. We do not have an official contributor's agreement that needs to be signed. But if your patch just blends stuff into the existing code base (crossing t's or dotting i's), then it becomes part of the existing code base, covered by the same license CMake is covered by. I am not a lawyer, but the intent of contributing code to an open source project is to allow that project to copy it around and freely distribute it. So if you want to keep any kind of copyright for yourself (or your company), do not contribute it unless you're willing to allow the project to do that even though you retain your own copyright. (You'll notice some of the module files have additional copyrights on top of the standard CMake copyright notice.) Thanks, Steven You're welcome, David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] TGZ installer following links
2011/6/16 John R. Cary c...@txcorp.com: On 6/16/11 12:09 PM, Eric Noulard wrote: 2011/6/16 John R. Caryc...@txcorp.com: I am using the TGZ packager. Sorry, my error in not providing more complete info: Which version of CMake/CPack ? On which platform(s) ? octet.cary$ cmake --version cmake version 2.8.3 octet.cary$ uname -a Linux octet.carys.home 2.6.30.10-105.2.23.fc11.x86_64 #1 SMP Thu Feb 11 07:06:34 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux octet.cary$ cpack 2.8.3 should be ok w.r.t. symlinks at least some bugs were fixed between 2.8.2 and 2.8.3. Where does the symlinks comes from ? In which CMake INSTALL commands are they found? if (NOT Win32) install(CODE foreach (subdir foo bin current) execute_process(COMMAND ln -s Bar/\${subdir} . WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/${FLAVOR_INSTALL_ROOT} ) endforeach () ) endif () I never used install(CODE ... but besides that this should work. did you have a look at the symlinks found in the CPack temp install dir: _CPack_Packages/xxx/TGZ/yyy are they local as they should be or are they pointing to some absolute path. CPack uses DESTDIR so may be you should use: WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${FLAVOR_INSTALL_ROOT} instead of: WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/${FLAVOR_INSTALL_ROOT} If the above does not immediately suggest a solution to someone, I will create a test case. No clue beside the DESTDIR thing. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] vtk iOS
Hi! Im trying to build vtk for iOS and get the following issue when when running cmake with my modified cmake file. -- Check if the system is big endian -- Searching 16 bit integer CMake Error at /Applications/CMake 2.8-4.app/Contents/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (MESSAGE): no suitable type found Call Stack (most recent call first): CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) CMakeLists.txt:469 (INCLUDE) What do I do about this? /Sason ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to set a preprocessor define for all build configurations except one ?
On 16 June 2011 15:45, Michael Hertling mhertl...@online.de wrote: IMO, the default should not need to be explicitly enabled but the exception, and readability - though important - is subordinate to functionality, but probably, this is a matter of personal taste. However, if you stick with the GEN_OUTFILES definition, be aware of the single-config generator with an empty build type. In that case, only the COMPILE_DEFINITIONS property is in effect, so you must add the GEN_OUTFILES definition to it, but with a non-empty build type, this config-less property is in effect, too, so you must *not* add GEN_OUTFILE to it. Thus, you need to differentiate these cases: IF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) FOREACH(... IN LISTS ... ITEMS ...) # Set COMPILE_DEFINITIONS_CONFIG. ENDFOREACH() ELSE() # Set COMPILE_DEFINITIONS. ENDIF() Clearly, this cuts down the elegance of the FOREACH loop, while the inverted approach with NO_GEN_OUTFILES would be unalteredly smooth. Luckily I already have this in my CMakeLists.txt: if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() to force the default build to use the Release configuration. Otherwise I would have fallen foul of the case you are suggesting. Is COMPILE_DEFINITIONS only used in single-config generators if CMAKE_BUILD_TYPE is not set ? That might explain why my initial attempts to do this failed. I had added GEN_OUTFILES to COMPILE_DEFINITIONS thinking this would apply to all configs. And then when I tried to remove that option from COMPILE_DEFINITIONS_RELEASENOOUTFILES it failed to have the desired effect. Would that approach have worked for the multi-config generators ? Do they use the concatenation of COMPILE_DEFINITIONS and COMPILE_DEFINITIONS_active config ? -- Glenn ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Dependencies and libraries..How does it work?
Hi, I am new to CMake - and whilst I am immediately impressed with it's relative ease of use - I have a 'noob' question, I'm sure! I have the following: A library called MY_LIB that builds with a cmake command (I have created a nice CMakeLists.txt file) An application called MY_APP that builds a nice application - and even links in MY_LIB using: link_directories(../MY_LIB) target_link_libraries(MY_APP MY_LIB) Now, first of all I know that I'm not supposed to use relative paths.. but we'll call a side issue.. (though I'd be happy to hear the correct way of doing things!) - the real problem that I have is this: Give than MY_LIB is built using CMake and MY_APP is built using CMake.. how can I setup my build scripts so that I can call CMake once for MY_APP, it'll realise that it needs MY_LIB, which hasn't yet been built, invoke CMake for MY_LIB and then link itself with MY_APP? I ask because I use libraries heavily to organise my code (and reuse) and would love to switch to CMake for all my building (XCode 4 has forced my hand!) but I can't seem to figure this out. Please help a newcomer out - any help is greatly appreciated! Thanks, David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Library numeric extension?
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.so, and then everything worked. Why was this .2 introduced? Is there either 1) a way to stop it from getting introduced or 2) a way to tell it just use the closest file so it would use the libgeotiff.so without me needing to make a symlink? Thanks, David ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Library numeric extension?
On 06/16/2011 11:56 PM, David Doria wrote: 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.so, and then everything worked. Why was this .2 introduced? Is there either 1) a way to stop it from getting introduced or 2) a way to tell it just use the closest file so it would use the libgeotiff.so without me needing to make a symlink? Thanks, David This is not the fault of CMake. The file should actually be called libgeotif.so.2, and the symlink should be called libgeotif.so and point to libgeotif.so.2. The symlink is only used for linking, while the real file, libgeotif.so.2, will be used at runtime. This is to make it possible to have multiple versions of libgeotif installed, but only one version will be used for linking. See here for more info: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html HTH Michael ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v2.8.4-1770-g8b4d14c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 8b4d14c735de706995138e830fa015a49193fac3 (commit) via 6b4d3ad32a93b4bedbc76c03cbf088cf31138163 (commit) from 069f57df5b278b2e65937dbe90a737d987d24e00 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b4d14c735de706995138e830fa015a49193fac3 commit 8b4d14c735de706995138e830fa015a49193fac3 Merge: 069f57d 6b4d3ad Author: Brad King brad.k...@kitware.com AuthorDate: Thu Jun 16 15:55:43 2011 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Jun 16 15:55:43 2011 -0400 Merge topic 'mingw-make-use-native-echo-issue-12283' into next 6b4d3ad MinGW: Remove old workaround and use native echo (#12283) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b4d3ad32a93b4bedbc76c03cbf088cf31138163 commit 6b4d3ad32a93b4bedbc76c03cbf088cf31138163 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Jun 16 15:43:17 2011 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Jun 16 15:43:17 2011 -0400 MinGW: Remove old workaround and use native echo (#12283) The workaround added by commit 7e92f0b4 (Hack to make echo command work properly in mingw32-make, 2006-10-05) and updated by commit 69356d8a (Juse use cmake -E echo instead of the native echo, 2006-10-13) no longer seems necessary with modern mingw32-make. Furthermore it slows performance due to the time spent loading a cmake process instead of plain echo. diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx index 2f558dc..a9e7798 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.cxx +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -66,18 +66,6 @@ cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator() lg-SetPassMakeflags(false); lg-SetUnixCD(true); lg-SetMinGWMake(true); - - // mingw32-make has trouble running code like - // - // @echo message with spaces - // - // If quotes are added - // - // @echo message with spaces - // - // it runs but the quotes are displayed. Instead just use cmake to - // echo. - lg-SetNativeEchoCommand(@$(CMAKE_COMMAND) -E echo , false); return lg; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5c2cda1..6ab5c2a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -68,8 +68,6 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3() this-ColorMakefile = false; this-SkipPreprocessedSourceRules = false; this-SkipAssemblySourceRules = false; - this-NativeEchoCommand = @echo ; - this-NativeEchoWindows = true; this-MakeCommandEscapeTargetTwice = false; this-IsMakefileGenerator = true; this-BorlandMakeCurlyHack = false; @@ -1235,9 +1233,8 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vectorstd::string commands, if(color_name.empty()) { // Use the native echo command. - cmd = this-NativeEchoCommand; - cmd += this-EscapeForShell(line.c_str(), false, - this-NativeEchoWindows); + cmd = @echo ; + cmd += this-EscapeForShell(line.c_str(), false, true); } else { diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 9ff6e5e..0994222 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -127,14 +127,6 @@ public: void SetSilentNoColon(bool v) {this-SilentNoColon = v;} /** - * Set the command to use for native make shell echo. The value - * should include all parts of the command up to the beginning of - * the message (including a whitespace separator). - */ - void SetNativeEchoCommand(const char* cmd, bool isWindows) -{ this-NativeEchoCommand = cmd; this-NativeEchoWindows = isWindows; } - - /** * Set the string used to include one makefile into another default * is include. */ @@ -365,8 +357,6 @@ private: std::string IncludeDirective; std::string MakeSilentFlag; std::string ConfigurationName; - std::string NativeEchoCommand; - bool NativeEchoWindows; bool DefineWindowsNULL; bool UnixCD; bool PassMakeflags; --- Summary of changes: Source/cmGlobalMinGWMakefileGenerator.cxx | 12 Source/cmLocalUnixMakefileGenerator3.cxx |7 ++- Source/cmLocalUnixMakefileGenerator3.h| 10 -- 3 files changed, 2
[Cmake-commits] CMake branch, next, updated. v2.8.4-1772-g3b379b5
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 3b379b56dfd07e96b812248c7df239c57aebe195 (commit) via 03809b14429edb14ffbb4e83d2cda32e86555de1 (commit) from 8b4d14c735de706995138e830fa015a49193fac3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b379b56dfd07e96b812248c7df239c57aebe195 commit 3b379b56dfd07e96b812248c7df239c57aebe195 Merge: 8b4d14c 03809b1 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Jun 16 16:13:42 2011 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Thu Jun 16 16:13:42 2011 -0400 Merge topic 'FindSWIG-find_program-NAMES-issue-12280' into next 03809b1 FindSWIG: Use NAMES in find_program directives (#12280) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03809b14429edb14ffbb4e83d2cda32e86555de1 commit 03809b14429edb14ffbb4e83d2cda32e86555de1 Author: Julien Malik julien.ma...@gmail.com AuthorDate: Fri Apr 29 00:16:32 2011 +0200 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Jun 16 16:10:16 2011 -0400 FindSWIG: Use NAMES in find_program directives (#12280) Without this, regular swig (not 2.0) executable is not found automatically. Commit 55b7c87e (Add support for new swig 2.0 application, 2011-03-28) added support for finding swig 2.0 at the (accidental) expense of not finding 1.x. Fix this regression. diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake index 8c60bcb..2e34eb1 100644 --- a/Modules/FindSWIG.cmake +++ b/Modules/FindSWIG.cmake @@ -27,7 +27,7 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -FIND_PROGRAM(SWIG_EXECUTABLE swig2.0 swig) +FIND_PROGRAM(SWIG_EXECUTABLE NAMES swig2.0 swig) IF(SWIG_EXECUTABLE) EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -swiglib --- Summary of changes: hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v2.8.4-573-g594681d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 594681d2c4b99024a667b6dc0d6d354a93392069 (commit) from 0751106f2fbfd1a5eb8c4572f60209cc9b22f841 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=594681d2c4b99024a667b6dc0d6d354a93392069 commit 594681d2c4b99024a667b6dc0d6d354a93392069 Author: KWSys Robot kwro...@kitware.com AuthorDate: Fri Jun 17 00:01:08 2011 -0400 Commit: KWSys Robot kwro...@kitware.com CommitDate: Fri Jun 17 00:12:26 2011 -0400 KWSys Nightly Date Stamp diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index beca75b..7acb1d0 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_MONTH 06) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 16) +SET(KWSYS_DATE_STAMP_DAY 17) --- Summary of changes: Source/kwsys/kwsysDateStamp.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits