[CMake] FindICU.cmake setting ICU_FOUND to "FALSE" with quotes?
I was trying to do this: find_package(ICU 59.1 QUIET COMPONENTS data i18n io tu uc ) if(ICU_FOUND) include_directories(BEFORE ${ICU_INCLUDE_DIRS}) message("ICU_LIBRARIES=${ICU_LIBRARIES}") endif() And at configuration time, ICU_FOUND was turning up with double quotes around it, and as we all know from CMake 101, the string "FALSE" has a truth value of TRUE in the if statement. This is with cmake 3.16. I fixed this by changing the expression to IF(ICU_FOUND AND NOT "${ICU_FOUND}" STREQUAL "\"FALSE\"") but that doesn't seem right somehow! -- Powered by kitware.com/cmake Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services Visit other Kitware open-source projects at https://www.kitware.com/platforms Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake This mailing list is deprecated in favor of https://discourse.cmake.org
[CMake] configuring FCGI2 -- check typedefs in include files?
There are some things I'm trying to do in setting up a config file for the FCGI2 library: https://github.com/FastCGI-Archives/fcgi2.git And in going from an autoconf configuration to a CMake configuration there are some stumpers: /* Define if the fpos_t typedef is in stdio.h */ /* #undef HAVE_FPOS */ This is definitely defined, but the closest module that's applicable is CheckTypeSize, and this doesn't seem to work: set(CMAKE_EXTRA_INCLUDE_FILES stdio.h) CHECK_TYPE_SIZE("fpos_t" HAVE_FPOS) set(CMAKE_EXTRA_INCLUDE_FILES) And this one, I wouldn't be able to handle without writing a custom test. /* Define if va_arg(arg, long double) crashes the compiler */ /* #undef HAVE_VA_ARG_LONG_DOUBLE_BUG */ -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Centos8 FindICU problems
That works for me, but is this a documented thing anywhere? On 10/22/19 4:22 PM, Roger Leigh wrote: On 22/10/2019 21:51, Kent Williams wrote: find_package(ICU REQUIRED) It reports failure to find ICU, and I can't work out what I'm supposed to do: CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Failed to find all ICU components (missing: ICU_LIBRARY) (found version "60.2") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindICU.cmake:317 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:3 (find_package) Any suggestions? Hi Kent, You need to specify the ICU libraries you want to link with as COMPONENTS. E.g. find_package(ICU REQUIRED COMPONENTS data i18n io tu) If you don't specify any components, then it won't find any libraries at all and that will cause the check to fail which caused the above error. Regards, Roger -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Centos8 FindICU problems
This is a development system we're just standing up using Centos 8. Linux build8.leepfrog.com 4.18.0-80.7.1.el8_0.x86_64 #1 SMP Sat Aug 3 15:14:00 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux cmake version 3.11.4 gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC) Installed Packages harfbuzz-icu.x86_64 1.7.5-3.el8 @AppStream icu.x86_64 60.2-7.el8 @BaseOS libicu.x86_64 60.2-7.el8 @BaseOS libicu-devel.x86_64 60.2-7.el8 @BaseOS Using the stock CMake FindICU.cmake And this test CMakeLists.txt: cmake_minimum_required(VERSION 2.8) project(testICU) find_package(ICU REQUIRED) It reports failure to find ICU, and I can't work out what I'm supposed to do: CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Failed to find all ICU components (missing: ICU_LIBRARY) (found version "60.2") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindICU.cmake:317 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:3 (find_package) -- Configuring incomplete, errors occurred! See also "/home/kwilliams/develop/junk/CMakeFiles/CMakeOutput.log". Any suggestions? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Why can't I build CMake on Centos6 32-bit?
This used to work. Linux build6.leepfrog.com 2.6.32-642.6.2.el6.i686 #1 SMP Wed Oct 26 06:14:53 UTC 2016 i686 i686 i386 GNU/Linux gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) The first part of the bootstrap succeeds, and then running the second stage yields this: loading initial cache file /home/kwilliams/develop/cmake/build6/Bootstrap.cmk/InitialCacheFlags.cmake CMake Error at Modules/CMakeCompilerIdDetection.cmake:28 (list): list sub-command REMOVE_ITEM requires two or more arguments. Call Stack (most recent call first): Modules/CMakeDetermineCompilerId.cmake:114 (compiler_id_detection) Modules/CMakeDetermineCompilerId.cmake:132 (CMAKE_DETERMINE_COMPILER_ID_WRITE) Modules/CMakeDetermineCompilerId.cmake:30 (CMAKE_DETERMINE_COMPILER_ID_BUILD) Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:11 (project) CMake Error at Modules/CMakeDetermineCompilerId.cmake:131 (file): file problem creating directory: /home/kwilliams/develop/cmake/build6/CMakeFiles/3.7.2/CompilerIdC Call Stack (most recent call first): Modules/CMakeDetermineCompilerId.cmake:30 (CMAKE_DETERMINE_COMPILER_ID_BUILD) Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:11 (project) CMake Error at Modules/CMakeDetermineCompilerId.cmake:131 (file): file problem creating directory: /home/kwilliams/develop/cmake/build6/CMakeFiles/3.7.2/CompilerIdC Call Stack (most recent call first): Modules/CMakeDetermineCompilerId.cmake:30 (CMAKE_DETERMINE_COMPILER_ID_BUILD) Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:11 (project) CMake Error at Modules/CMakeDetermineCompilerId.cmake:131 (file): file problem creating directory: /home/kwilliams/develop/cmake/build6/CMakeFiles/3.7.2/CompilerIdC Call Stack (most recent call first): Modules/CMakeDetermineCompilerId.cmake:30 (CMAKE_DETERMINE_COMPILER_ID_BUILD) Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:11 (project) -- The C compiler identification is unknown CMake Error: Could not find cmake module file: /home/kwilliams/develop/cmake/build6/CMakeFiles/3.7.2/CMakeCCompiler.cmake CMake Error at Modules/CMakeCompilerIdDetection.cmake:28 (list): list sub-command REMOVE_ITEM requires two or more arguments. Call Stack (most recent call first): Modules/CMakeDetermineCompilerId.cmake:114 (compiler_id_detection) Modules/CMakeDetermineCompilerId.cmake:132 (CMAKE_DETERMINE_COMPILER_ID_WRITE) Modules/CMakeDetermineCompilerId.cmake:30 (CMAKE_DETERMINE_COMPILER_ID_BUILD) Modules/CMakeDetermineCXXCompiler.cmake:104 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:11 (project) CMake Error at Modules/CMakeDetermineCompilerId.cmake:131 (file): file problem creating directory: /home/kwilliams/develop/cmake/build6/CMakeFiles/3.7.2/CompilerIdCXX Call Stack (most recent call first): Modules/CMakeDetermineCompilerId.cmake:30 (CMAKE_DETERMINE_COMPILER_ID_BUILD) Modules/CMakeDetermineCXXCompiler.cmake:104 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:11 (project) -- The CXX compiler identification is unknown CMake Error: Could not find cmake module file: /home/kwilliams/develop/cmake/build6/CMakeFiles/3.7.2/CMakeCXXCompiler.cmake -- Check for working C compiler: /usr/bin/gcc CMake Error at Modules/CMakeTestCCompiler.cmake:37 (try_compile): Unknown extension ".c" for file /home/kwilliams/develop/cmake/build6/CMakeFiles/CMakeTmp/testCCompiler.c try_compile() works only for enabled languages. Currently these are: C CXX See project() command to enable other languages. Call Stack (most recent call first): CMakeLists.txt:11 (project) -- Check for working C compiler: /usr/bin/gcc -- broken CMake Error at Modules/CMakeTestCCompiler.cmake:51 (message): The C compiler "/usr/bin/gcc" is not able to compile a simple test program. It fails with the following output: CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:11 (project) -- Configuring incomplete, errors occurred! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] ExternalProject git checkout --depth=1 ???
I'm building the Mozilla Spidermonkey JS interpreter as an ExternalProject. So far so good, but I had a question/feature request: Wouldn't it be grand to be able to add --depth 1 to the git clone? This is perfect for grabbing giant repositories. Mozilla is more than 3 gigabytes with a full clone, and a depth=1 checkout is a 1/3 that. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] How about a CMake debugger?
As I'm now deep in tracing through 80K lines of cmake --trace output, man I'd love some sort of CMake debugger! Actually if you use Emacs you can kinda sorta do tracing -- run CMake with the --trace parameter in the compile bufffer (i.e. alt-x compile command) and then the Emacs next-error steps a line at a time through the trace output, just like a source debugger. But it doesn't give you the option of seeing the values of CMake variables, or to change them. I know this is asking for a major feature change, but CMake has grown up. We now have multi-thousand-line CMake build systems, and the only debugging tool we have is MESSAGE() -- 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] Why dont FindTIFF.cmake and FindJPEG.cmake consider pkg_DIR variables?
Are FindTIFF.cmake and FindJPEG.cmake really old and neglected? Neither seems to bother looking at TIFF_DIR or JPEG_DIR -- you have to set TIFF_LIBRARY and TIFF_INCLUDE_DIR (or JPEG_LIBRARY and JPEG_INCLUDE_DIR). find_package is a great facility but I find myself having to look at the actual FindPackage.cmake file when I incorporate a new package to see what its actual requirements are. -- 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] Best way to 'pull through' dependencies of External projects?
The specific problem I'm trying to solve: Build DCMTK library, along with libraries upon which it depends, for use by ITK as a 'system library' The problem: Setting up the External Projects is simple enough; the problem is that the revision/configuration of TIFF -- 3.9.4 -- by default requires ZLib. DCMTK builds against this external TIFF library just fine. What doesn't happen? The TIFF's ZLib dependency doesn't get propogated to builds that depend on DCMTK, so Zlib is not on the DCMTK library list. This wouldn't be a problem if TIFF and DCMTK were proper CMake builds. If they were when they export their libraries, find_package would carry along the dependencies of the imported libraries. There doesn't appear to be either an elegant or a quick dirty solution to this. The problem is that until DCMTK creates proper CMake config files that clue in ITK to DCMTK's own dependencies, ITK's own CMake config files will not reflect those dependencies. Suggestions? Oh, and by the way I am trying to get DCMTK to generate proper configuration files for find_package(NO_MODULE): https://github.com/InsightSoftwareConsortium/DCMTK/tree/AddProperConfig -- 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] Wrapper for cmake (configure-script)
This is a good start. There's only one problem: What happens if CMake isn't installed. Searching for a proper version of CMake should be dine in the script as well. It should also generate a config.status file. This need not be incredibly sophisticated, but since autoconf always generates one, I suspect there are people that do depend on it. On Thu, Feb 14, 2013 at 2:59 AM, Richard Wiedenhöft richard.wiedenho...@gmail.com wrote: Hello, I recently started writing a configure shell-script that is calling cmake and accepts options similar to the autotools configure script. https://github.com/Richard-W/cmake-configure-wrapper Maybe it is useful to some of you. As of now it is only supporting the CC, CXX and --prefix option, because they are sufficient for me. Contributions however are very welcome. ~Richard -- 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] Best way to 'pull through' dependencies of External projects?
@Nick find_package(DCMTK) does an OK job. The specific issue I ran into is that TIFF depends on Zlib and that dependency isn't pulled through into DCMTK's dependencies. The FindDCMTK.cmake that is in the current CMake distro has issues. @Ansis -- if all I cared about was getting one package built, I would do what you suggest. But I am trying to build robust CMake infrastructure here, that will be useful beyond the one project I'm starting with. On Thu, Feb 14, 2013 at 9:54 AM, Ansis Māliņš ansis.mal...@gmail.comwrote: If I guessed right, your problem is linker errors when building your project. My solution is to just manually add whatever extra target_link_libraries are needed to shut the linker up and move on. On Thu, Feb 14, 2013 at 5:48 PM, Nick Overdijk n...@astrant.net wrote: I don't really get your specific problem... CMake can find and install ITK and DCMTK just fine here? (I had to manipulate the linker-order of DCMTK a bit but that's almost to be expected, sadly). You're saying that when you find_package(DCMTK) it's libraries doesn't include some library it needs? On 2013-14-02, at 16:45:12 , Kent Williams wrote: The specific problem I'm trying to solve: Build DCMTK library, along with libraries upon which it depends, for use by ITK as a 'system library' The problem: Setting up the External Projects is simple enough; the problem is that the revision/configuration of TIFF -- 3.9.4 -- by default requires ZLib. DCMTK builds against this external TIFF library just fine. What doesn't happen? The TIFF's ZLib dependency doesn't get propogated to builds that depend on DCMTK, so Zlib is not on the DCMTK library list. This wouldn't be a problem if TIFF and DCMTK were proper CMake builds. If they were when they export their libraries, find_package would carry along the dependencies of the imported libraries. There doesn't appear to be either an elegant or a quick dirty solution to this. The problem is that until DCMTK creates proper CMake config files that clue in ITK to DCMTK's own dependencies, ITK's own CMake config files will not reflect those dependencies. Suggestions? Oh, and by the way I am trying to get DCMTK to generate proper configuration files for find_package(NO_MODULE): https://github.com/InsightSoftwareConsortium/DCMTK/tree/AddProperConfig -- 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 -- 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] CMAKE_OSX_ variables lacking documentation
I was looking for documentation in the CMake manual for CMAKE_OSX_ARCHITECTURES. This is a list of architectures, the possible choices are: i386;x86_64;ppc;ppc64 But this is not mentioned in the CMake documentation. Shouldn't it be? -- 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] Building CMake 2.8.10.2 -- package created named cmake-2.8.10.2-Darwin-i386.dmg?
Building on OS X 10.7.5 with XCode 4.5.2 Compiling with default compiler Apple clang version 4.1 (tags/Apple/clang-421.11.66) The packages available for download on cmake.org are named http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Darwin64-universal.dmg My question is this: how is the architecture name chosen? Why, in this case, is it wrong? -- 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] Building CMake 2.8.10.2 -- package created named cmake-2.8.10.2-Darwin-i386.dmg?
I meant that when I build cmake and then ran 'make package' it cmake out i386, even though by default it only generates 64-bit binaries. Jean-Christophe pointed out that on Kitware's builds they override this with a better CPACK_SYSTEM_NAME. And the reason it says i386 is that CPACK_SYSTEM_NAME defaults to the output of uname -p which on OS X 10.7.5 is 'i386' So CMake is behaving as documented, and OS X is wrong ;-) Quelle Surprise! On Tue, Feb 5, 2013 at 9:08 AM, David Cole dlrd...@aol.com wrote: What do you mean by it's wrong? It's a universal binary with x86_64 being one of them. On Feb 5, 2013, at 10:04 AM, Jean-Christophe Fillion-Robin jchris.filli...@kitware.com wrote: Hi Kent, Probably because the CPACK_SYSTEM_NAME is explicitly specified. See http://cmake.org/gitweb?p=cmake.git;a=blob;f=Utilities/Release/dashmacmini5_release.cmake;h=36b095287e80d26ed1b684b6c1a69d9bda1963ba;hb=HEAD#l19 Hth Jc On Tue, Feb 5, 2013 at 9:47 AM, Kent Williams nkwmailingli...@gmail.comwrote: Building on OS X 10.7.5 with XCode 4.5.2 Compiling with default compiler Apple clang version 4.1 (tags/Apple/clang-421.11.66) The packages available for download on cmake.org are named http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Darwin64-universal.dmg My question is this: how is the architecture name chosen? Why, in this case, is it wrong? -- 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 -- +1 919 869 8849 -- 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] When should I use add_subdirectory and when ExternalProject?
They are two different things entirely. add_subdirectory is used when you have a project structured hierarchically in directories and subdirectories, but you want the entire project configured at one time. ExternalProject is used to download, configure and build a project that is a prerequisite to your project, but not part of your project. The most common use-case is the SuperBuild pattern. In this case all prerequisites to your project are built, and then YOUR project is built as an ExternalProject. Why? Because almost always, the prerequisites need to be built and perhaps installed BEFORE configuring your projects. It is sometimes possible to use ExternalProject from within your source tree, but it requires that configuring your project requires nothing from the ExternalProject at configure time. On Mon, Feb 4, 2013 at 2:23 AM, Ansis Māliņš ansis.mal...@gmail.com wrote: If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory just fine, should I still use ExternalProject_Add instead? Given both ways work, what should I prefer? What are the tradeoffs? -- 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] When should I use add_subdirectory and when ExternalProject?
The real world example is Slicer -- http://www.slicer.org/pages/DeveloperOrientation This is rather a large and complex project and the way they do somethings is hard to decode. Make sure you read through and understand this: http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html The simplest setup is this: Add a directory SuperBuild to your project. Within SuperBuild, write a CMakeLists.txt that contains ExternalProject_add for each of the prerequisite libraries. Then use an ExternalProject to configure and build your actual project. Since SuperBuild is a subdirectory of your actual project, there's no need to download source, so you suppress the download and update steps, and specify where to find the source. ExternalProject_Add(MyProject DEPENDS ${Prerequisite_List} # this is the list of all the prerequisite ExternalProjects you've added. DOWNLOAD_COMMAND # no need to download UPDATE_COMMAND # or update. SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..# source is relative to where this CMakeLists.txt is BINARY_DIR MyProject-build # otherwise build is nested down in MyProject-prefix CMAKE_ARGS ${MyProject_CMAKE_ARGS} # set to allow your project to find prerequisites # e.g. -DITK_DIR:PATH=${PATH_TO_ITK_BUILD} ) On Mon, Feb 4, 2013 at 9:23 AM, Ansis Māliņš ansis.mal...@gmail.com wrote: SuperBuild pattern Tell me all about it! -- 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] Any portable way in CMake build tree to find Source tree path?
Thanks for all your help. It does seem like you can spend a long time working with CMake (nearly 10 years for me) and still learn new things! On Sat, Jan 26, 2013 at 8:48 AM, Cory Quammen cquam...@cs.unc.edu wrote: Oops, I didn't know about that command. I tried it out, and it works like a charm. Thanks for pointing it out, Alex! Cory On Sat, Jan 26, 2013 at 3:25 AM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Saturday 26 January 2013, Cory Quammen wrote: Kent, I have a CMake function that may be of interest to you (see attached file). For your purposes, use it as follows: GetCMakeCacheValue( ${ABC_BUILD_DIR} ABC_SOURCE_DIR ) where the project against which you want to build is named ABC. The first argument must always be the build directory of a project configured with CMake. The second (and an arbitrary number of subsequent arguments) are variables whose values you want to retrieve from the CMakeCache.txt file. Assuming everything goes well, two new variables will be defined in the scope in which you called GetCMakeCacheValue: ABC_SOURCE_DIR ABC_SOURCE_DIR_TYPE If there is no entry for ABC_SOURCE_DIR, then the above variables will take on the values ABC_SOURCE_DIR-NOT_FOUND ABC_SOURCE_DIR_TYPE-NOT_FOUND I hope this is useful to you and others. It would be great if CMake had similar functionality built in. Have you tried the load_cache() command ? According to the documentation it does that, but I haven't used it myself yet. Alex -- Cory Quammen Research Associate Department of Computer Science The University of North Carolina at Chapel Hill -- 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] Backslashes in path names on Windows?
I am testing a ITK patch I'm working on in Windows. That involves entering a path in cmake-gui or ccmake. The first time I tried it, I entered the path 'windows-wise' with backslashes as path separators. That caused a syntax error at the point where that variable is used. When I re-entered the path with unix-style forward slashes, the CMake configure/generate succeeded. Is one supposed to always use Unix forward slashes when specifying paths to CMake? If so is it documented to do that? If you're curious this is the ITK patch I'm working on: http://review.source.kitware.com/#/c/9308/ -- 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] Any portable way in CMake build tree to find Source tree path?
I'm trying to write a Findpackage.cmake file for a library that doesn't generate a proper packageConfig.cmake file. The problem I'm trying to solve is how to build against a build tree instead of an install tree. On OS X and Windows (well, probably any Makefile generator) CMake helpfully adds CMakeDirectoryInformation.cmake files to the build tree, which makes it straightforward to recover the root of the source tree. Come to find out, that doesn't work on Windows with Visual Studio build system, and probably won't work with other build systems besides Makefile on OS X and Linux. So the question is, given that I can't go in and fix the CMake build system for this package, is there a portable way to find the source tree by looking at the build tree? -- 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] CMake 2.8.9 CMake-GUI locks up during initial configuration?
OS: Windows 7 (64-bit) CMake 2.8.9 generator: NMake Makefiles Trying to configure ITK (with my patches) Problem: CMake-GUI seems to lock up -- the progress bar moves about 10% to the right and stops, and the process output from the command line CMake stops. If I run the configure from the command line, e.g. cmake -g NMake Makefiles ../ITK It will run to completion. -- 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] how to find current Windows build configuration?
On platforms other than Windows, the build type is a single value stored in CMAKE_BUILD_TYPE, and can be accessed if you want your build to different things in Debug, Release, etc modes. On Windows with Visual Studio, there's a variable CMAKE_CONFIGURATION_TYPE that is a list of the builds that will be done. How do I recover the actual, current build type? The reason I need to do this: I need to import libraries built in an ExternalProject. On OS X or Linux, the libraries generated by the ExternalProject are in one predictable place. So I can do this: set(EP_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EP_NAME}-build/lib) On windows this will need to be # fictional variable WINDOWS_CURRENT_BUILD_TYPE giving current build type set(EP_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EP_NAME}-build/${WINDOWS_CURRENT_BUILD_TYPE}) Unfortunately, there's no such variable. And, given how Visual Studio works, where you can have a build that actually builds any number of build_types at one go, I'm not sure how to handle this. One thought I had was to always build the External Project as Release on Windows; then the libraries are someplace predictable. -- 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] FindDCMTK.cmake bug, asking for a bump.
I logged this bug earlier this year: http://www.cmake.org/Bug/view.php?id=12916 The problem is that the FindDCMTK.cmake file leaves out a required library from DCMTK_LIBRARIES. I included a one line patch to fix the problem. According to the comment in the bug from David Cole, this is where I come to appeal for a CMake developer to adopt this bug and fix it. So, please, pretty please? -- 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] All right all you CMake test writers....
Here's something I find really annoying: Someone who names tests such that the name of one is a prefix of the name of another! So if you do this: ctest -V -R testname You get every test whose name begins with testname. Just had to vent. -- 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] Can imported libraries depend on ExternalProject targets?
That seems like it should work, but it actually does not. There's two types of precedence in CMake. 1. Textual -- as CMake munches through a project and its subdirectory, it generates a build system where the build order is the same as the textual order. In a single process build, for example: project(x) add_library(xlib ...) add_executable(xexec ...) 'xlib' will get built before 'xexec' 2. The dependency graph. Targets which do not depend on any other target get built first, then targets that depend on the 'leaf' targets. In the example above, adding target_link_libraries(xexec xlib) will make 'xexec' depend on 'xlib', and even if you build using more than one process (i.e. make -j 8), xexec will be built after xlib. I've verified that the approach you use below doesn't work, because imported libraries are targets to which you can add dependencies. I tried this approach and it didn't work -- in fact that is what my original e-mail is about. David Cole indicated in essence, I was doing it wrong. My position is that it's the only way to do it without completely revamping the ITK build system, which is above my pay grade. I thought of a sneaky workaround: Create a dummy library, with one object file that does nothing, and will never actually be loaded. Make the dummy library depend on the ExternalProject target, and add it to library list along with the ExternalProject's libraries. But that seems kind of ugly, creating a library no program actually needs. On Sat, Jun 23, 2012 at 9:06 AM, Stefan Reuschl li...@stefanreuschl.de wrote: The following once worked fine for me using CMake 2.8.8: ExternalProject_Add( ep ) add_library( epLib IMPORTED ) set_target_properties( epLib PROPERTIES IMPORTED_LOCATION ... ) add_dependencies( epLib ep ) -- 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] Can imported libraries depend on ExternalProject targets?
I meant to say 'the approach you use doesn't work, because imported libraries are targets to are targets to which you CANNOT add dependencies. On Tue, Jun 26, 2012 at 9:33 AM, Kent Williams nkwmailingli...@gmail.com wrote: That seems like it should work, but it actually does not. There's two types of precedence in CMake. 1. Textual -- as CMake munches through a project and its subdirectory, it generates a build system where the build order is the same as the textual order. In a single process build, for example: project(x) add_library(xlib ...) add_executable(xexec ...) 'xlib' will get built before 'xexec' 2. The dependency graph. Targets which do not depend on any other target get built first, then targets that depend on the 'leaf' targets. In the example above, adding target_link_libraries(xexec xlib) will make 'xexec' depend on 'xlib', and even if you build using more than one process (i.e. make -j 8), xexec will be built after xlib. I've verified that the approach you use below doesn't work, because imported libraries are targets to which you can add dependencies. I tried this approach and it didn't work -- in fact that is what my original e-mail is about. David Cole indicated in essence, I was doing it wrong. My position is that it's the only way to do it without completely revamping the ITK build system, which is above my pay grade. I thought of a sneaky workaround: Create a dummy library, with one object file that does nothing, and will never actually be loaded. Make the dummy library depend on the ExternalProject target, and add it to library list along with the ExternalProject's libraries. But that seems kind of ugly, creating a library no program actually needs. On Sat, Jun 23, 2012 at 9:06 AM, Stefan Reuschl li...@stefanreuschl.de wrote: The following once worked fine for me using CMake 2.8.8: ExternalProject_Add( ep ) add_library( epLib IMPORTED ) set_target_properties( epLib PROPERTIES IMPORTED_LOCATION ... ) add_dependencies( epLib ep ) -- 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] Can imported libraries depend on ExternalProject targets?
If I understand what's going on in that bug report, yes add_dependency(imported_library EP_target) should work. But I found that in fact it did not. So maybe that is a bug; if this was fixed in 2.8.4, I don't understand why I still have a problem. On Tue, Jun 26, 2012 at 11:12 AM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Tuesday 26 June 2012, Kent Williams wrote: I meant to say 'the approach you use doesn't work, because imported libraries are targets to are targets to which you CANNOT add dependencies. This should work since I think cmake 2.8.4. http://public.kitware.com/Bug/view.php?id=10395 Or am I misunderstanding what you said ? 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 to add dependency on parent directories?
Dependencies are between targets, not projects or CMakeLists.txt. You would need to have a target in one project depend on a target defined in another. Some of these dependencies are managed automatically, as when you build one or more libraries, and then reference them when you build a program. For example: add_library(lib1 a.cxx b.cxx c.cxx) add_executable(exec1 exec1.cxx) target_link_libraries(exec1 lib1) In this case, CMake would generate build recipes (Makefile, Visual Studio, etc) such that a.cxx,b.cxx, and c.xx would be compiled, and lib1 generated from the object files, before exec1 was linked. In the case where you want a depency that wasn't straightforward (like a library depends on it's objects, or an executable on it's objects and libraries) you can add explicit dependencies, with add_dependency. Also, if you have tests depend on other tests. This is important if one test generates a file, and a second test checks the generated file: add_test(NAME GenerateFile COMMAND generate_file) add_test(NAME TestFileContents COMMAND test_generated_file) add_property(TEST test_generated_file APPEND PROPERTY DEPENDS generate_file) On Wed, Apr 25, 2012 at 7:31 AM, Vyacheslav Karamov ubuntul...@yandex.ru wrote: Hi All! My project's (named Compare) structure is similar to this: Root | SphinX | sphinxbase (autotools project) Sound | |-DoScoring (my Cmake-based project) |-Compare (my Cmake-based project) |-CMakeLists.txt |-src (source files for project Compare) |-ATLAS (autotools project) How add dependencies on other projects to CMakeLists.txt of my project Compare? Thank you in advance, Vyacheslav. -- 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] Can imported libraries depend on ExternalProject targets?
Say I have an ExternalProject that generates several libraries ExternalProject_Add(foo # the usual mumbo jumbo ) set(foo_LIBRARIES) # foo makes 3 libraries foreach(lib a b c) # import the libraries add_library(${lib} STATIC IMPORTED) # tell CMake where the library file is set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION ${imported_library_filename}) # add to the library list list(APPEND foo_LIBRARIES ${lib}) # this doesn't work apparently add_dependencies(${lib} foo) endforeach() In order for parallel make to work, the foo ExternalProject must complete successfully before any programs that link to ${foo_LIBRARIES} are compiled and linked. I thought that making the imported library targets depend on the ExternalProject target would behave in a transitive manner - i.e. add_executable(foo_user foo.cxx) target_link_libraries(foo_user ${foo_LIBRARIES}) But this is not the case. In a parallel build, the foo_user build doesn't wait for the foo ExternalProject to finish. If I add add_dependencies(foo_user foo) Everything behaves fine. But that requires explicitly add a dependency on an ExternalProject target everywhere it's outputs are used. Is this a bug? A feature request? Or is there another way to make this work? -- 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] Can imported libraries depend on ExternalProject targets?
OK, I guess. The only reason I bring this up is ITK. If you're familiar with the ITK build process, it has a 'module' concept -- not a module in the CMake sense (where it is a library intended for runtime loading), but in the sense that the build process is modular. Each of the ITK libraries is a module, which is defined by a standardised directory layout and cmake files. I made an Module for DCMTK that satisfies the requirements of an ITK module -- it builds DCMTK as an External Project, and uses add_library(name lib-type IMPORTED) on each of the libraries DCMTK creates, and connects the imported library with the actual library file in the file system. This all works fine EXCEPT for this one conundrum, you can't have the imported libraries depend on the ExternalProject target, so if you want to make sure the ExternalProject gets built before the targets that try to link to them, you have to make the executable (or library) target depend on the ExternalProject target to serialize the build of the dependee before the depnder. So really it would be easy to just say 'too bad, make ITK its own external project, and build the prerequisite' or 'too bad, add the 3rd party library source to ITK/Modules/ThirdParty the way we've always done it, but it would be kind of awesome if CMake could handle imported libraries depending on targets. If you're curious about what I've done: http://review.source.kitware.com/#/c/5989/ On Fri, Jun 22, 2012 at 12:29 PM, David Cole david.c...@kitware.com wrote: On Fri, Jun 22, 2012 at 11:33 AM, Kent Williams nkwmailingli...@gmail.com wrote: Say I have an ExternalProject that generates several libraries ExternalProject_Add(foo # the usual mumbo jumbo ) set(foo_LIBRARIES) # foo makes 3 libraries foreach(lib a b c) # import the libraries add_library(${lib} STATIC IMPORTED) # tell CMake where the library file is set_property(TARGET ${lib} PROPERTY IMPORTED_LOCATION ${imported_library_filename}) # add to the library list list(APPEND foo_LIBRARIES ${lib}) # this doesn't work apparently add_dependencies(${lib} foo) endforeach() In order for parallel make to work, the foo ExternalProject must complete successfully before any programs that link to ${foo_LIBRARIES} are compiled and linked. I thought that making the imported library targets depend on the ExternalProject target would behave in a transitive manner - i.e. add_executable(foo_user foo.cxx) target_link_libraries(foo_user ${foo_LIBRARIES}) But this is not the case. In a parallel build, the foo_user build doesn't wait for the foo ExternalProject to finish. If I add add_dependencies(foo_user foo) Everything behaves fine. But that requires explicitly add a dependency on an ExternalProject target everywhere it's outputs are used. Is this a bug? A feature request? Or is there another way to make this work? It's neither a bug nor a feature request, it's just the way it works. The explicit dependency is the only way to connect up the outputs of one ExternalProject call to another, which by their nature are independent of one another unless explicitly connected via arguments / cache entries. If you want foo_user to depend on the actual libraries, then it should be its own project that does a find_package(foo) to get them. And then *also* have a SuperBuild that builds foo and then foo_user, where foo_user as an ExternalProject depends on foo as an ExternalProject. The best way to use ExternalProject is to have a SuperBuild project that builds *everything* as an ExternalProject. It's not easy (or advisable, in my thinking) to combine ExternalProject calls with non-ExternalProject CMake targets. That's why I recommend a SuperBuild, with exclusively ExternalProject targets, as the best bet. 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 -- 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] Return code from CMake script
If CMake is running a script via -P, doesn't it return a non-zero status if there's any error? I'd think it would be sufficient to run to the end of the script if everything works fine, but have something like if(something_went_wrong) message(FATAL_ERROR ¡OH NO! ¡SUCEDIO ALGO TERRIBLE!!!) endif(something_went_wrong) On Fri, Jun 22, 2012 at 9:35 AM, Pere Mato Vila pere.m...@cern.ch wrote: On Jun 22, 2012, at 4:25 PM, David Cole wrote: As an alternative (workaround), perhaps you could write the status value into a file that you inspect after CMake returns? Unfortunately this is not possible because who calls by script is ctest. Then it should definitely be possible. I meant ctest as the one that calls the test I have declared with add_test(). What I have is something like this: add_test(cmake -D... -P myscript.cmake) Cheers, Pere - Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland e-mail: pere.m...@cern.ch tel: +41 22 76 78696 fax: +41 22 76 68792 gsm: +41 76 48 70855 -- 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] Zero coverage being reported on gcc/Linux builds.
I've verified that the gdca files are there. And it displays coverage on CDash -- indicating coverage reports are being pushed to the CDash server -- but reports zero coverage. I am using a SuperBuild/ExternalProject build system but for the purposes of dashboards, I do the top level build, then go to the build subdirectory for the project I'm interested in testing, make clean, and then make Experimental. I have to do this anyway, because the top-level 'SuperBuild' has a bunch of stuff the program needs, but isn't relevant to the dashboard, and because you have to go to your application's directory for CTest to find any tests to run. On Tue, Apr 24, 2012 at 6:32 AM, David Cole david.c...@kitware.com wrote: Ugh. You're probably doing everything right, and there's just a bug of some sort. Unfortunately, debugging these things is neither easy nor fun. First, look for Coverage*.log files in the Testing/ subdirectories of your build tree. Are there any errors mentioned in there? Next, verify that there are some *.gcda files in the build tree: find . -name *.gcda There is a known/reported issue with the coverage not reporting correctly right now for gcc 4.7, but this is the first problem I've heard of with an earlier gcc... http://public.kitware.com/Bug/view.php?id=13121 On Mon, Apr 23, 2012 at 5:18 PM, Kent Williams nkwmailingli...@gmail.com wrote: cmake: 2.8.6 gcc/g++: 4.4.6-3 Red Hate Enterprise Linux 6.2 I follow the instructions here: http://www.cmake.org/Wiki/CTest/Coverage And I have 2 different dashboards that report zero coverage: http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINSStandalone http://testing.psychiatry.uiowa.edu/CDash/index.php?project=ANTS I don't know what's going on because I remember coverage working, and it's obviously doing something for other projects, e.g. ITK: http://public.kitware.com/dashboard.php?name=itk Call me an idiot, but I can follow instructions, and following the instructions I can find isn't doing the trick. -- 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] Zero coverage being reported on gcc/Linux builds.
cmake: 2.8.6 gcc/g++: 4.4.6-3 Red Hate Enterprise Linux 6.2 I follow the instructions here: http://www.cmake.org/Wiki/CTest/Coverage And I have 2 different dashboards that report zero coverage: http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINSStandalone http://testing.psychiatry.uiowa.edu/CDash/index.php?project=ANTS I don't know what's going on because I remember coverage working, and it's obviously doing something for other projects, e.g. ITK: http://public.kitware.com/dashboard.php?name=itk Call me an idiot, but I can follow instructions, and following the instructions I can find isn't doing the trick. -- 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] Can string(REGEX REPLACE match multiple lines?
I'm trying to write a CMake patch script for a package that needs a TARGET_LINK_LIBRARIES command replaced. In the original it covers multiple lines, e.g. TARGET_LINK_LIBRARIES(targetname1 boguslib1 boguslib2 boguslib3 ) I tried this to replace it: string(REGEX REPLACE TARGET_LINK_LIBRARIES(targetname1.*) TARGET_LINK_LIBRARIES(\${VTK_LIBRARIES} QVTK \${ITK_LIBRARIES} \${QT_LIBRARIES} \${QWT_LIBRARIES}) code ${code}) But the regular expression doesn't appear to handle spanning lines. Is there a good way to do this? What's the most CMake-lish way to accomplish this? -- 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] add_subdirectory inheritance
20:54, Kent Williams wrote: I think then that you shouldn't use add_subdirectory. I'd suggest using the ExternalProject module in this case, because it uncouples the subdirectory's project from the parent project. In that case, each subdirectory can be its own project and maintain private configurations. You can manage dependencies between ExternalProjects with the DEPENDS keyword. I think that what you're describing doesn't really make any sense to me. I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Another way you can manage this sort of thing is to use Source file properties -- see SET_SOURCE_FILE_PROPERTIES in the CMake documentation and the Properties on Source Files section as well. On Tue, Apr 17, 2012 at 1:27 PM, irukandji irukan...@voidptr.eu wrote: Oh, hi :) Well, the add_subdirectory takes all the preprocessor defines and include/library paths defined before calling it into the added subdirectory cmakelists.txt. If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where the cmakelists.txt for building library B resides then the library B is going to be built with -DWhatever. This is probably great behaviour for some cases but can also be undesired: in my case, each library has its own description file, residing in same directory as its cmakelists.txt, with only one function, which is included and called with few parameters to specify runtime etc. by each binary which has a dependancy to library. The description file function sets the -I to itself for caller, the -l to its output and, if the output file is not found, also calls add_subdirectory on its own directory. This is a perfect situation for developers as we can just do out of source configuration for whatever directory (where project resides) and only the dependancy tree for that particular binary is built. It also brings additional benefit that the team which takes care about specific library also takes care for description file and needed defines which splits the ownership of projects and also presents a single point of inclusion for that particular library, meaning only one file has to be changed for library specializations. For the nightly builds, only executables are added to the build while everything else is built only if actually used. It works great, but the add_subdirectory is propagating the settings from executable to dependant libraries and messes the build. The question actually is: can i workaround this behaviour and if not, can you please include the parameter to add_subdirectory function to NOT propagate the settings. Regards, Irukandji On 2012-04-17 17:58, Kent Williams wrote: Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji irukan...@voidptr.eu wrote: Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake will take months) The add_subdirectory inheritance striked which is practically a show stopper, it was already discussed here http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed (DONT_INHERIT) was a great idea and improvement to versability of CMake and also harmless for backward compatibility so i dont really understand why forcing subproject to inherit all the settings. Yes, what is added with add_subdirectory is not a child but a sibling or even some other part of the tree but the point is that it doesnt stop the cmake from building it correctly but this inheritance is a problem as it adds include directories to wrong versions of headers in public libs (due to bugs in different versions, affecting different platforms,... the unification is impossible), the flags are used on wrong places etc. Is there a way to workaround it? Thank you. -- 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 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com
Re: [CMake] add_subdirectory inheritance
Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji irukan...@voidptr.eu wrote: Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake will take months) The add_subdirectory inheritance striked which is practically a show stopper, it was already discussed here http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed (DONT_INHERIT) was a great idea and improvement to versability of CMake and also harmless for backward compatibility so i dont really understand why forcing subproject to inherit all the settings. Yes, what is added with add_subdirectory is not a child but a sibling or even some other part of the tree but the point is that it doesnt stop the cmake from building it correctly but this inheritance is a problem as it adds include directories to wrong versions of headers in public libs (due to bugs in different versions, affecting different platforms,... the unification is impossible), the flags are used on wrong places etc. Is there a way to workaround it? Thank you. -- 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] add_subdirectory inheritance
I think then that you shouldn't use add_subdirectory. I'd suggest using the ExternalProject module in this case, because it uncouples the subdirectory's project from the parent project. In that case, each subdirectory can be its own project and maintain private configurations. You can manage dependencies between ExternalProjects with the DEPENDS keyword. I think that what you're describing doesn't really make any sense to me. I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Another way you can manage this sort of thing is to use Source file properties -- see SET_SOURCE_FILE_PROPERTIES in the CMake documentation and the Properties on Source Files section as well. On Tue, Apr 17, 2012 at 1:27 PM, irukandji irukan...@voidptr.eu wrote: Oh, hi :) Well, the add_subdirectory takes all the preprocessor defines and include/library paths defined before calling it into the added subdirectory cmakelists.txt. If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where the cmakelists.txt for building library B resides then the library B is going to be built with -DWhatever. This is probably great behaviour for some cases but can also be undesired: in my case, each library has its own description file, residing in same directory as its cmakelists.txt, with only one function, which is included and called with few parameters to specify runtime etc. by each binary which has a dependancy to library. The description file function sets the -I to itself for caller, the -l to its output and, if the output file is not found, also calls add_subdirectory on its own directory. This is a perfect situation for developers as we can just do out of source configuration for whatever directory (where project resides) and only the dependancy tree for that particular binary is built. It also brings additional benefit that the team which takes care about specific library also takes care for description file and needed defines which splits the ownership of projects and also presents a single point of inclusion for that particular library, meaning only one file has to be changed for library specializations. For the nightly builds, only executables are added to the build while everything else is built only if actually used. It works great, but the add_subdirectory is propagating the settings from executable to dependant libraries and messes the build. The question actually is: can i workaround this behaviour and if not, can you please include the parameter to add_subdirectory function to NOT propagate the settings. Regards, Irukandji On 2012-04-17 17:58, Kent Williams wrote: Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji irukan...@voidptr.eu wrote: Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake will take months) The add_subdirectory inheritance striked which is practically a show stopper, it was already discussed here http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed (DONT_INHERIT) was a great idea and improvement to versability of CMake and also harmless for backward compatibility so i dont really understand why forcing subproject to inherit all the settings. Yes, what is added with add_subdirectory is not a child but a sibling or even some other part of the tree but the point is that it doesnt stop the cmake from building it correctly but this inheritance is a problem as it adds include directories to wrong versions of headers in public libs (due to bugs in different versions, affecting different platforms,... the unification is impossible), the flags are used on wrong places etc. Is there a way to workaround it? Thank you. -- 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 -- 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
[CMake] FindDCMTK Not setting up DCMTK_INCLUDE_DIRECTORIES Correctly?
I'm running into problems using the DCMTK library. I've set up an ExternalProject to build and install it, and the CMake 2.8.5 FindDCMTK.cmake finds the library if I set DCMTK_DIR. But the DCMTK_INCLUDE_DIRS variable created by FindDCMTK.cmake isn't 100% correct. It does a good job of enumerating all the include directories, but the include files themselves have the bad manners to use #include statements like this: #include dcmtk/config/osconfig.h Which would mean that ${prefix}/include should be added to DCMTK_INCLUDE_DIRS ${prefix}/include/dcmtk/config ${prefix}/include/dcmtk/dcmdata ${prefix}/include/dcmtk/dcmimage ${prefix}/include/dcmtk/dcmimgle ${prefix}/include/dcmtk/dcmjpeg ${prefix}/include/dcmtk/dcmnet ${prefix}/include/dcmtk/dcmpstat ${prefix}/include/dcmtk/dcmqrdb ${prefix}/include/dcmtk/dcmsign ${prefix}/include/dcmtk/dcmsr ${prefix}/include/dcmtk/dcmtls ${prefix}/include/dcmtk/ofstd ${prefix}/include/dcmtk Or am I doing something dumb? -- 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] FindDCMTK Not setting up DCMTK_INCLUDE_DIRECTORIES Correctly?
I actually install DCMTK in a subdirectory of my top-level build, and then my program that uses DCMTK is configured with DCMTK_DIR. The problem isnt MY source, the problem is that the DCMTK headers use the dcmtk/x/y.h path form to include OTHER DCMTK headers. I am doing exactly what you're doing, and if you don't have this problem I'm interested in how you got it to work. While I'm whining -- FindDCMTK.cmake doesn't include liboflog.a in DCMTK_LIBRARIES either. On Tue, Nov 29, 2011 at 10:47 AM, Thomas Sondergaard t...@medical-insight.com wrote: On 2011-11-29 17:28, kent williams wrote: I'm running into problems using the DCMTK library. I've set up an ExternalProject to build and install it, and the CMake 2.8.5 FindDCMTK.cmake finds the library if I set DCMTK_DIR. But the DCMTK_INCLUDE_DIRS variable created by FindDCMTK.cmake isn't 100% correct. It does a good job of enumerating all the include directories, but the include files themselves have the bad manners to use #include statements like this: #include dcmtk/config/osconfig.h Which would mean that ${prefix}/include should be added to DCMTK_INCLUDE_DIRS ${prefix}/include/dcmtk/config ${prefix}/include/dcmtk/dcmdata ${prefix}/include/dcmtk/dcmimage ${prefix}/include/dcmtk/dcmimgle ${prefix}/include/dcmtk/dcmjpeg ${prefix}/include/dcmtk/dcmnet ${prefix}/include/dcmtk/dcmpstat ${prefix}/include/dcmtk/dcmqrdb ${prefix}/include/dcmtk/dcmsign ${prefix}/include/dcmtk/dcmsr ${prefix}/include/dcmtk/dcmtls ${prefix}/include/dcmtk/ofstd ${prefix}/include/dcmtk If the source has #include dcmtk/config/osconfig.h then it will not help you to have ${prefix}/include/dcmtk/config in the search path, you need to have ${prefix}/include. Or am I doing something dumb? That's probably a bit strong. Why don't you try some modern printf-style debugging? :-) Modify the FindDCMTK.cmake file with some message(...) calls and see what is going on? I use FindDCMTK.cmake, but I use it against an installation directory nor against a source directory. The installation directory is created by dcmtk when building the install target. I use the cmake tool chain for dcmtk as well. The macro is supposed to work against both source and installation trees. Regards, Thomas -- 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] MakeCommand unset in CTestConfiguration.ini
OS X CMake 2.8.5 I was trying to get our nightly build script correct, and ran into this: MakeCommand: Cannot find MakeCommand key in the DartConfiguration.tcl First of all we don't use Dart, there is no DartConfiguration.tcl in the build directory. There is a CTestConfiguration.ini, which does have this line: MakeCommand: Which is to say, the MakeCommand isn't set to anything. What governs setting MakeCommand in the CTestConfiguration.ini file? -- 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] ExternalProject: avoiding rebuilds
In general it's better to make your project into an ExternalProject itself, and have it depend on all other ExternalProject upon which it depends. That way all prerequisites get built, and then your package get built. It ensures that all prerequisites are fully built and installed before your project is configured. You can specify DOWNLOAD_COMMAND as and set SOURCE_DIR to your project's source directory, in which case ExternalProject_add doesn't try and download your source. Slicer has a trick for doing this with a single top-level CMakeLists.txt that works like this option(Do_SuperBuild Build all prerequisites and this project ON) if(Do_SuperBuild) # build prerequisites... Project(SuperBuild) #now build this project ExternalProjectAdd(MyProject DEPENDS dependency_list SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CMAKE_ARGS -DDo_SuperBuild:BOOL=OFF ) else(Do_SuperBuild) # # all the CMake stuff to build your program endif(Do_SuperBuild) On Mon, Sep 26, 2011 at 12:45 PM, Rolf Eike Beer e...@sf-mail.de wrote: Am Montag, 26. September 2011, 10:37:57 schrieb Ben Medina: John is right. The external project may be at the bottom of a chain of (my own) project dependencies. I need to preserve the ability to easily rebuild just my projects (and their dependencies), not external projects. Think of ExternalProject as a replacement for pre-built libraries, and you'll see where I'm coming from. Perhaps I need to file a feature request on Mantis. You may try, but I don't think that this will help. AFAICT this clean and then rebuild stuff is a Visual Studio thing. Eike -- 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] Setting CMAKE_C_COMPILER CMAKE_CXX_COMPILER Deletes Cache?
I guess that's fair; but what appears to be happening is that it's deleting the cache even if the -D compiler string is the same as what's already in Cache. On Mon, May 23, 2011 at 4:45 PM, David Cole david.c...@kitware.com wrote: On Mon, May 23, 2011 at 5:37 PM, kent williams nkwmailingli...@gmail.com wrote: Ran into this with CMake 2.8.4 on Linux -- though apparently not on my OS X machine, go figure. I had a nightly build shell script that as a matter of course set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER on the command line. I was getting mysteriously unnamed builds in our Dashboard. What I traced it down to: When I ran cmake in a batch that sets the compiler variables, cmake decided that the compilers had been changed and deleted the cache and reran itself. Unfortunately it also forgot BUILDNAME -- which I also set on the command line, and the BUILDNAME reverted to its default value (set in my top level CMakelists.txt) of UNKNOWN-build. So is there any way not to descend into this hell of deleted cache variables? ___ 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 If you start with a clean build tree, there shouldn't be a problem. If you start with a non-clean build tree, be sure to use the same compiler used last time. Neither of those ways should descend into hell. If you prove me wrong, I will bring you a cold beer in hell. Also, I would recommend using the environment variables CC and CXX to set the compiler. CMake only even looks at those env vars if the compiler is not already cached in the first place. If you pass them in via -D args, then those -D args override what's in the cache... :-) 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] Setting CMAKE_C_COMPILER CMAKE_CXX_COMPILER Deletes Cache?
Ran into this with CMake 2.8.4 on Linux -- though apparently not on my OS X machine, go figure. I had a nightly build shell script that as a matter of course set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER on the command line. I was getting mysteriously unnamed builds in our Dashboard. What I traced it down to: When I ran cmake in a batch that sets the compiler variables, cmake decided that the compilers had been changed and deleted the cache and reran itself. Unfortunately it also forgot BUILDNAME -- which I also set on the command line, and the BUILDNAME reverted to its default value (set in my top level CMakelists.txt) of UNKNOWN-build. So is there any way not to descend into this hell of deleted cache variables? ___ 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] Confusing problem with building VTK via external project
I've all of a sudden started having trouble building VTK via an ExternalProject. OS X, CMake 2.8.4, Standard GCC 4.2 compilers, stock VTK 5.6.1. output of make VERBOSE=1 of the top-level project, you can see that QT_QMAKE_EXECUTABLE is set, but when CMake runs, it somehow ignores the variables set on the command line. The only clue I can see is this line: Re-run cmake no build system arguments What's going on? [ 0%] Performing configure step for 'VTK' cd /scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/VTK-build /opt/cmake-2.8.4-Darwin-universal/CMake 2.8-4.app/Contents/bin/cmake -DCMAKE_INSTALL_PREFIX:PATH=/scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/src -DCMAKE_CXX_COMPILER:STRING=/usr/bin/c++ -DCMAKE_CXX_COMPILER_ARG1:STRING= -DCMAKE_C_COMPILER:STRING=/usr/bin/gcc -DCMAKE_C_COMPILER_ARG1:STRING= -DCMAKE_CXX_FLAGS:STRING= -Wall -Wextra -Wlong-long -fopenmp -Wno-invalid-offsetof -DCMAKE_C_FLAGS:STRING= -Wall -Wextra -Wlong-long -fopenmp -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DVTK_DEBUG_LEAKS:BOOL=ON -DVTK_WRAP_TCL:BOOL=ON -DVTK_USE_RPATH:BOOL=ON -DTCL_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tcl.framework/Headers -DTCL_LIBRARY:FILEPATH=/System/Library/Frameworks/tcl.framework -DTCL_TCLSH:FILEPATH=/usr/bin/tclsh -DTK_INCLUDE_PATH:PATH=/System/Library/Frameworks/Tk.framework/Headers -DTK_LIBRARY:FILEPATH=/System/Library/Frameworks/tk.framework -DVTK_WRAP_PYTHON:BOOL=OFF -DPYTHON_INCLUDE_DIR:PATH=/scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/python-build/include/python2.6 -DPYTHON_LIBRARY:FILEPATH=/scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/python-build/lib/libpython2.6.dylib -DVTK_USE_CARBON:BOOL=OFF -DVTK_USE_COCOA:BOOL=ON -DVTK_USE_X:BOOL=OFF -DVTK_USE_RPATH:BOOL=ON -DDESIRED_QT_VERSION:STRING=4 -DVTK_USE_GUISUPPORT:BOOL=ON -DVTK_USE_QVTK_QTOPENGL:BOOL=ON -DVTK_USE_RENDERING:BOOL=ON -DVTK_USE_QT:BOOL=ON -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DVTK_USE_PARALLEL:BOOL=ON -GUnix Makefiles /scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/VTK Re-run cmake no build system arguments -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Performing Test HAVE_GCC_ERROR_RETURN_TYPE -- Performing Test HAVE_GCC_ERROR_RETURN_TYPE - Success -- Performing Test HAVE_GCC_VISIBILITY -- Performing Test HAVE_GCC_VISIBILITY - Success -- Performing Test Support for 64 bit file systems -- Performing Test Support for 64 bit file systems - Success CMake Error at CMakeLists.txt:307 (MESSAGE): Qt 4.5.0 or greater not found. Please check the QT_QMAKE_EXECUTABLE variable. -- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib -- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /opt/local/lib/libX11.dylib -- Checking to see if CXX compiler accepts flag -no-cpp-precomp -- Checking to see if CXX compiler accepts flag -no-cpp-precomp - Yes -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of int -- Check size of int - done -- Check size of long -- Check size of long - done -- Check size of void* -- Check size of void* - done -- Check size of char -- Check size of char - done -- Check size of short -- Check size of short - done -- Check size of float -- Check size of float - done -- Check size of double -- Check size of double - done -- Looking for include files CMAKE_HAVE_LIMITS_H -- Looking for include files CMAKE_HAVE_LIMITS_H - found -- Looking for include files CMAKE_HAVE_UNISTD_H -- Looking for include files CMAKE_HAVE_UNISTD_H - found -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for
Re: [CMake] Confusing problem with building VTK via external project
Strange as it may seem, there must have been something fracked up in my Emacs environment because this craziness went away when I restarted Emacs. Though the particulars of how this began are mysterious. On Wed, Apr 13, 2011 at 10:26 AM, David Cole david.c...@kitware.com wrote: On Wed, Apr 13, 2011 at 11:04 AM, kent williams nkwmailingli...@gmail.com wrote: I've all of a sudden started having trouble building VTK via an ExternalProject. OS X, CMake 2.8.4, Standard GCC 4.2 compilers, stock VTK 5.6.1. output of make VERBOSE=1 of the top-level project, you can see that QT_QMAKE_EXECUTABLE is set, but when CMake runs, it somehow ignores the variables set on the command line. The only clue I can see is this line: Re-run cmake no build system arguments What's going on? [ 0%] Performing configure step for 'VTK' cd /scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/VTK-build /opt/cmake-2.8.4-Darwin-universal/CMake 2.8-4.app/Contents/bin/cmake -DCMAKE_INSTALL_PREFIX:PATH=/scratch/kent/Testing/pandora.psychiatry.uiowa.edu/Fast/src -DCMAKE_CXX_COMPILER:STRING=/usr/bin/c++ -DCMAKE_CXX_COMPILER_ARG1:STRING= ... -- Performing Test HAVE_GCC_ERROR_RETURN_TYPE -- Performing Test HAVE_GCC_ERROR_RETURN_TYPE - Success -- Performing Test HAVE_GCC_VISIBILITY -- Performing Test HAVE_GCC_VISIBILITY - Success -- Performing Test Support for 64 bit file systems -- Performing Test Support for 64 bit file systems - Success CMake Error at CMakeLists.txt:307 (MESSAGE): Qt 4.5.0 or greater not found. Please check the QT_QMAKE_EXECUTABLE variable. -- Looking for XOpenDisplay in /opt/local/lib/libX11.dylib;/opt/local/lib/libXext.dylib The error message reported is: CMake Error at CMakeLists.txt:307 (MESSAGE): Qt 4.5.0 or greater not found. Please check the QT_QMAKE_EXECUTABLE variable. What does /usr/bin/qmake --version report? Is it an older Qt? Did you change the system Qt recently? 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
[CMake] Status of FindHDF5.cmake in CMake?
Hi! I'm working on some classes for ITK4 that use the HDF library, and I've run into a quandary. If you build install HDF5 with CMake, you MUST use find_package(HDF5 [REQUIRED] NO_MODULE) in order to use HDF5. If you use the more natural command find_package(HDF5 [REQUIRED]) then the cmake/share/cmake-2.8/Modules/FindHDF5.cmake fails to find the installation. The FindHDF5.cmake depends on HDF5 using the autoconf-based build system, and searches for one of the HDF utilities to run. This doesn't feel like a good situation. Shouldn't the FindHDF5.cmake perhaps look for both sorts of HDF5 installs? ___ 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] Why is ExternalProject trigger-happy about re-downloading source?
I've been running into this every since we updated to CMake 2.8.4, but I don't know if it's revision specific. Sometimes if I change CMakeLists.txt in various directories so that make will re-run cmake to pickup CMakeLists.txt changes, it triggers re-downloading VTK ITK from scratch. Is using GIT_REPOSITORY dumber than CVS_REPOSITORY SVN_REPOSITORY? If I set UPDATE_COMMAND to , it never re-downloads. But GIT_REPOSITORY seems to blow away the downloaded source for an external project and re-download it, even if the CMakeLists.txt change is unrelated to to the ExternalProject in question. Is there a way to suppress this behavior? ___ 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] CMake 2.8.4 -- FindITK.cmake fails to find ITK even when ITK_DIR is properly set.
My first subject line was Who decided to break FindITK.cmake in 2.8.4? but that isn't probably very tactful. We have a whole bunch of projects that used to configure and build just fine with CMake 2.8.3. With 2.8.4 they fail. The error message we get is: CMake Error at /opt/cmake-2.8.4-Darwin-universal/CMake 2.8-4.app/Contents/share/cmake-2.8/Modules/FindITK.cmake:52 (MESSAGE): Please set ITK_DIR to the directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation. Call Stack (most recent call first): BuildScripts/CMakeCommonExternalDefinitions.cmake:23 (find_package) CMakeLists.txt:70 (PACKAGE_NEEDS_ITK) We DO set ITK_DIR at configure time, and I HAVE verified that ITKConfig.cmake DOES exist in ${ITK_DIR}. Looking at the difference between FindITK.cmake in 2.8.3 and 2.8.4 it looks like someone replaced trusting the ITK_DIR variable and using it directly if defined, with FIND_PACKAGE(ITK QUIET NO_MODULE NAMES ITK InsightToolkit CONFIGS ITKConfig.cmake) Which doesn't work -- it appears to ignore ITK_DIR and doggedly insist that it can't find ITK. What gives? ___ 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] find_package(Qt4 REQUIRED) doesn't include QtNetwork?
To use Qt in my projects with CMake, up until now all it seemed to require was this: find_package(Qt4 REQUIRED) include(${QT_USE_FILE}) But then I tried to use QTcpServer and QTcpSocket, and the compiles failed because it couldn't find the include files. Then I read through the FindQt4.cmake file that comes with CMake 2.8.4, and found that I could fix the problem with find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED) But I'm confused that all my programs I built before I tried to use networking had worked. I thought the first, simpler find_package statement would just include everything by default. Is that wrong? Did something change in recent CMake versions? ___ 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] FindTCL.cmake has a problem?
Unfortunately, I can't provide this because we had to get the builds running, and installed the proper packages. But I don't think I was imagining things. On Wed, Feb 2, 2011 at 6:57 AM, Michael Hertling mhertl...@online.de wrote: On 01/31/2011 05:26 PM, kent williams wrote: I found this out on a RHEL6 machine, which comes stock with tclsh and wish but without the C header files for development. FindTCL.cmake sets TCL_FOUND, even though TCL_INCLUDE_PATH:PATH=TCL_INCLUDE_PATH-NOTFOUND Imagine the hilarity that ensues! The FindTCL module from CMake 2.8.3 contains the line FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH) so TCL_FOUND shouldn't come out as TRUE if TCL_INCLUDE_PATH isn't TRUE also. Is the questionable FindTCL module the same as the official one? Could you provide the complete output of a FIND_PACKAGE(TCL) resulting in TCL_FOUND==TRUE and TCL_INCLUDE_PATH==FALSE from a clean build? 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 ___ 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] FindTCL.cmake has a problem?
What are you changing, and if what you're doing is valid, why not work to get it integrated with the main CMake development? For better or worse we will be sticking with the official CMake releases. It's the devil we know. On Mon, Jan 31, 2011 at 9:13 PM, Clifford Yapp cliffy...@gmail.com wrote: 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 in all situations yet. Cheers, CY On Mon, Jan 31, 2011 at 11:26 AM, kent williams nkwmailingli...@gmail.com wrote: I found this out on a RHEL6 machine, which comes stock with tclsh and wish but without the C header files for development. FindTCL.cmake sets TCL_FOUND, even though TCL_INCLUDE_PATH:PATH=TCL_INCLUDE_PATH-NOTFOUND Imagine the hilarity that ensues! ___ 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] FindTCL.cmake has a problem?
I found this out on a RHEL6 machine, which comes stock with tclsh and wish but without the C header files for development. FindTCL.cmake sets TCL_FOUND, even though TCL_INCLUDE_PATH:PATH=TCL_INCLUDE_PATH-NOTFOUND Imagine the hilarity that ensues! ___ 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] CMake Function, how do I pass out strings or lists?
The CMakeLists.txt below illustrates the problem: - cmake_minimum_required(VERSION 2.8) project(testo) function(set_a_var var value) set(${var} ${value}) message(${var} = ${${var}}) endfunction() set_a_var(testo HELLO!) message(outside func testo=${testo}) The output is: cmake ../CompilerFlags testo = HELLO! outside func testo= -- Configuring done -- Generating done -- Build files have been written to: /scratch/kent/CompilerFlags/build - I gather from looking in the CMake Modules that you have to set the variable to be Cached, but won't this result in some cases in the CMakeCache.txt getting stuffed full of definititions only relevant to function calls? Not that I want to, but what if you started computing factorials? ___ 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] Any way to make/fake subdirectories depending on ExternalProject?
I kinda know the simple answer is 'no.' I hope there's a creative *couch*sneaky*cough* way to do this. I'm trying to build CableSwig as a external project as part of ITK. I have this working for a single-process build. It works in that case because the ExternalProject_add happens textually before all the add_subdirectory clauses at the bottom of ITK's top level CMakeLists.txt file. If you run a parallel build, CableSwig gets downloaded and built in parallel with subdirectories that need CableSwig to build, so the compile fails, obviously. The problem is that subdirectories aren't targets, and can't depend on CableSwig. What I need is a trick to fake out CMake such that it guarantees the CableSwig subproject get built completely before moving on into subdirectories. Any ideas? Or am I just abusing the very spirit of 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] How to have a target depend on an External Project
For better or worse (mostly better) we are now heavy users of ExternalProject. That module works really well to pull in external dependencies and get them built. ExternalProject_add has a DEPENDS keyword that lets you specify dependencies on other External Projects. But an ExternalProject isn't an actual CMake target, so I can't figure out how to make a regular CMake target depend on an External Project. Suggestions? ___ 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 have a target depend on an External Project
Ironically the reason I want to make a target depend on an external project is that our top level project is already built as an ExternalProject for all the reasons that have been mentioned. I need a custom target to depend on THAT external project, just in the sense that I want it to be built only after my MAIN project is built. There's no chicken V egg problems -- my custom target is independent from that target at configure time. It just needs to happen after that ExternalProject is built successfully. On Wed, Jan 12, 2011 at 1:12 PM, David Cole david.c...@kitware.com wrote: add_dependencies does work to make sure that ExternalProject targets build before internal targets, if you need that. But, like Marcus said, you probably need the ExternalProject to be configured and built before your own calls to find_package... so if you have that chicken and egg problem, you should also build your project as an ExternalProject. Almost all of the projects I know of that are using ExternalProject are producing a so-called SuperBuild of themselves, wherein all the targets of the SuperBuild are ExternalProject_Add calls, and the last one is the project of interest. HTH, David On Wed, Jan 12, 2011 at 2:09 PM, Allen D Byrne b...@hdfgroup.org wrote: While Marcus states what is likely the preferred way, I just added an ADD_DEPENDENCIES(internal_target external_target) statement that seems to always work? Allen Date: Wed, 12 Jan 2011 13:23:52 -0500 From: Marcus D. Hanwell marcus.hanw...@kitware.com Subject: Re: [CMake] How to have a target depend on an External Project To: kent williams nkwmailingli...@gmail.com Cc: CMake ML cmake@cmake.org Message-ID: aanlktindoc6guenk7rxq=0yy+sxacoium52ix8zih...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jan 12, 2011 at 12:53 PM, kent williams nkwmailingli...@gmail.com wrote: For better or worse (mostly better) we are now heavy users of ExternalProject. ?That module works really well to pull in external dependencies and get them built. ExternalProject_add has a DEPENDS keyword that lets you specify dependencies on other External Projects. ?But an ExternalProject isn't an actual CMake target, so I can't figure out how to make a regular CMake target depend on an External Project. Suggestions? Don't mix external projects and real targets. An external project dependency is different to a target dependency. When expressing external project dependencies you are stating that this external project needs these others to be built before it is even configured. With regular targets there is an assumption that the dependency is part of the current build, and so CMake knows everything about it, or it was already built. If you have Qt in an external project, and a Qt based application depending on it, the find_package(Qt4) will fail during initial configure, as there is no Qt built/installed. Instead you would normally have your own project as an external project that depends on the others it requires to build. That way, when your external project is configured the others will have been built and therefore could be found. I hope that makes the mechanism a little clearer. You could take a look at the Titan project as one example where we have many external projects that we build, and the Libraries/Applications external projects that depend upon them and use them. Marcus ___ 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 ___ 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] Anyone gotten OpenSSL to build as an external project?
This shouldn't be a big deal -- something like this should work: ExternalProject_add(OpenSSL URL http://www.openssl.org/source/openssl-1.0.0c.tar.gz; URL_MD5 ff8fb85610aef328315a9decbb2712e4 CONFIGURE_COMMAND ./config --prefix=${CMAKE_CURRENT_BINARY_DIR}/OpenSSL BUILD_IN_SOURCE 1 INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/OpenSSL ) set(OPENSSL_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/include) link_directories(${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/libs) set(OPENSSL_LIBRARIES ssl ssleay32 ssleay32MD) The problem is that OpenSSL doesn't handle configuration scripts in the usual way -- the configure script wants you to specify your platform/compiler string. They provide an 'automatic' script instead called config, so config --prefix=... Does mostly what you want, but they make you handle the OS X 64-bit case manually -- it wants you to run configure and tell it explicitly about the platform: ./Configure darwin64-x86_64-cc This is kind of crazy, but OK, whatever. So I need to try and figure out at configure time if it's an OS X build and if it's a 64 bit build. I can use if(APPLE) to detect an Mac platform, but there's no way I can figure out to determine if the currently selected build type is 64 bits. And I think that the stock OpenSSL distribution would completely lose its mind if you tried to configure a Universal Binary build! Any suggestions? ___ 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] Anyone gotten OpenSSL to build as an external project?
That's kind of a solution, but as near as I can figure CMAKE_SIZEOF_VOID_P doesn't change if I set CMAKE_OSX_ARCHITECTURE to i386. The following seems to work, but I explicitly test CMAKE_OSX_ARCHITECTURE so that if I'm building i386 on a system with x86_64 as the default, it correctly configures OpenSSL. enable_language(CXX) if(APPLE) if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT ${CMAKE_OSX_ARCHITECTURES} MATCHES i386) set(OPENSSL_CONFIG_CMD ./Configure darwin64-x86_64-cc --prefix=${CMAKE_CURRENT_BINARY_DIR}/OpenSSL) else() set(OPENSSL_CONFIG_CMD ./config --prefix=${CMAKE_CURRENT_BINARY_DIR}/OpenSSL) endif() else(APPLE) set(OPENSSL_CONFIG_CMD ./config --prefix=${CMAKE_CURRENT_BINARY_DIR}/OpenSSL) endif(APPLE) if(NOT ExternalProject_loaded) include(ExternalProject) set(ExternalProject_loaded 1) endif(NOT ExternalProject_loaded) ExternalProject_add(OpenSSL URL http://www.openssl.org/source/openssl-1.0.0c.tar.gz; URL_MD5 ff8fb85610aef328315a9decbb2712e4 CONFIGURE_COMMAND ${OPENSSL_CONFIG_CMD} BUILD_IN_SOURCE 1 INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/OpenSSL ) set(OPENSSL_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/include) link_directories(${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/lib) set(OPENSSL_LIBRARIES ssl crypto) ___ 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] Questions about FFTW as an External Project within ITK
I've got a 'Work In Progress' patch for the ITK CMake build system that builds FFTW as an external project. I've got a few CMake questions about how to go about finishing it. 1. When I build FFTW using ExternalProject_add, it does a local install -- The prefix directory is ${CMAKE_BINARY_DIR}/FFTW, the libraries end up in ${CMAKE_BINARY_DIR}/FFTW/lib and the include files in ${CMAKE_BINARY_DIR}/FFTW/include. This is sufficient to build ITK with FFTW turned on. But to deploy an installation, I'd have to copy the libraries and headers into the ITK install, because they're needed if anyone uses an FFTW class. Not sure on how to do the install step CMake-wise. would this be sufficient? install(FILES ${CMAKE_BINARY_DIR}/FFTW/lib/libfftw3.a DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) install(FILES ${CMAKE_BINARY_DIR}/FFTW/include/fftw3.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) I'm thinking thats kind of awful, but I don't know of a more elegant solution. I also don't know the CMake variable to use for the library file extension. 2. I don't know how to make the Algorithms library depend on the FFTW external project. If I do a sequential build, FFTW does get built before everything else, but if I do a parallel build, FFTW builds concurrent with the rest of ITK. This could definitely fail. ___ 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] ExternalProject module in 2.8.2 completely broken with respect to GIT?
Please tell me someone else encountered this and it's fixed. I'm going to have to make a patched version of ExternalProject.cmake a part of my project until it is. In CMake 2.8.2 ExternalProject.cmake, there is no consistency on the capitalization of the Git_EXECUTABLE variable -- which is what gets set by find_package(Git). There are instances of GIT_EXECUTABLE and git_EXECUTABLE. Once I fix those everything works fine. ___ 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] MacOSX, Qt plugins and BundleUtilities -- not building proper bundle?
Like everyone else I started here to build my Qt app with CMake: http://www.cmake.org/Wiki/BundleUtilitiesExample Like a lot of things in CMake this involves copying a bunch of brittle CMake code into your CMakeLists.txt, and seems like it has too many moving parts and failure points, but hey, we shouldn't look a gift horse in the mouth, right? Well, now I understand a little better than when I started about what is going on, and I don't think the right things are happening, when it comes to plugins. There is this code: # # Install needed Qt plugins by copying directories from the qt installation # One can cull what gets copied by using 'REGEX ... EXCLUDE' INSTALL(DIRECTORY ${QT_PLUGINS_DIR}/imageformats DESTINATION ${plugin_dest_dir}/plugins COMPONENT Runtime) I don't know what to make of this, because according to CMake documentation, this should recursively copy the imageformats directory into the app bundle. But when I examine the created bundle appname.app/Contents/MacOS/plugins is empty. But when fixup_bundle does its magic, it copies all the imageformat shared libraries into appname.app/Contents/MacOS/plugins And furthermore, could the Qt.conf file be used to better organize an app bundle? At this point it gets created as an empty file in appname.app/Contents/Resources/qt.conf According to http://doc.qt.nokia.com/4.7/qt-conf.html I could just buck up and do the work to get my app bundle organized properly, but I think this is something that should probably be part of the CMake distribution -- there should be a more streamlined, simpler way to deploy proper app bundles. ___ 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] linking main Fortran and C++
I know you're simplifying to provide an example, but I hope you don't normally set CMAKE_CC_COMPILER, CMAKE_Fortran_COMPILER and CMAKE_CXX_COMPILER in your CMakeLists.txt. That's precisely the sort of thing that CMake is meant to find for you. It will find the compilers needed to compile your source, and then you can override CMake's default choice if you want to. On Mon, Oct 18, 2010 at 11:35 PM, Michael Scot Breitenfeld brtn...@uiuc.edu wrote: Thanks, this works now: PROJECT( Test) SET(PACKAGE_NAME TEST) CMAKE_MINIMUM_REQUIRED (VERSION 2.6) SET (CMAKE_Fortran_COMPILER gfortran) SET (CMAKE_CC_COMPILER gcc) SET (CMAKE_CXX_COMPILER g++) # libraries are all shared by default option(BUILD_SHARED_LIBS Build shared libraries OFF) ENABLE_LANGUAGE(Fortran) SET(F_OBJ submain.f90) SET(C_OBJ test.cpp) ADD_LIBRARY (name STATIC ${F_OBJ} ${C_OBJ}) SET_TARGET_PROPERTIES(name PROPERTIES LINKER_LANGUAGE Fortran) ADD_EXECUTABLE(a.out main.f90) SET_TARGET_PROPERTIES(a.out PROPERTIES LINKER_LANGUAGE Fortran) TARGET_LINK_LIBRARIES(a.out name) OUTPUT: Scanning dependencies of target name [ 33%] Building Fortran object CMakeFiles/name.dir/submain.f90.o [ 66%] Building CXX object CMakeFiles/name.dir/test.cpp.o Linking Fortran static library libname.a [ 66%] Built target name Scanning dependencies of target a.out [100%] Building Fortran object CMakeFiles/a.out.dir/main.f90.o Linking Fortran executable a.out [100%] Built target a.out Added bonus is it links -lstdc++ automatically. On 10/18/2010 10:30 PM, Michael Hertling wrote: On 10/19/2010 03:43 AM, Michael Scot Breitenfeld wrote: My main program is in Fortran and I have couple of files that are in C++. When I try to make the library, CMake uses CXX linking (archiving) to make the library. Which I guess is ok, but then when it links the main program it thinks that it is a CXX executable and uses the C++ compiler and not the Fortran compiler so compilation fails. How do I tell cmake to use fortran instead, I thought it would automatically do this from the .f90 suffix. I'm using cmake 2.8.1. Set the LINKER_LANGUAGE property of your main program target to Fortran, and see the CMAKE_LANG_LINKER_PREFERENCE and CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES variables for more information. Regards, Michael My test: PROJECT( Test ) SET(PACKAGE_NAME TEST) CMAKE_MINIMUM_REQUIRED (VERSION 2.6) SET (CMAKE_Fortran_COMPILER gfortran) SET (CMAKE_CC_COMPILER gcc) SET (CMAKE_CXX_COMPILER g++) # libraries are all shared by default option(BUILD_SHARED_LIBS Build shared libraries OFF) ENABLE_LANGUAGE(Fortran) SET(F_OBJ submain.f90) SET(C_OBJ test.cpp) ADD_LIBRARY (name STATIC ${F_OBJ} ${C_OBJ}) ADD_EXECUTABLE(a.out main.f90) TARGET_LINK_LIBRARIES(a.out name) ___ 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 ___ 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] CMake can't handle Unicode files with BOM
OK if anyone is tallying how many hours have been wasted on Unicode files with BOM, add at least one for me. This is a logged bug for CMake: http://public.kitware.com/Bug/view.php?id=11137 I assume that 2.8.4 or whatever will find a way to deal with this. But my quick summary is this: A Unicode file with BOM causes CMake to complain about the syntax of a CMake file, and many modern text editors throw away the 3 byte BOM header -- BOM stands for 'Byte Order Manifest', presumably telling you the byte order for the file. Which, in the case of UTF-8 is silly because characters are only one byte wide. If you run into this, the solution is to strip the 3 characters from the start of the file. This is rather difficult unless you have an editor that will display and allow you to delete them. Here's a perl script that will do it for you: #!/usr/bin/perl @file=; $file[0] =~ s/^\xEF\xBB\xBF//; print(@file); Can CMake handle wide character CMakeLists.txt files? Now that would blow MY mind -- CMakeLists.txt in Arabic or Chinese. ___ 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 would I use parallel make on ExternalProjects?
I think what I'm doing isn't clear to you. I have a CMakeLists.txt that is essentially 'sourceless' -- it defines a bunch of CMake variables, and then builds a bunch of prerequisites and applications added with ExternalProject_add. It doesn't have any add_subdirectory,add_executable, add_library etc of its own. So at build time, the process tree is make # the make of the top level make # build external project 1 . . make # build external project n If I use make -j4, for example, it would build 4 external projects in parallel with make -j1. If any of those projects is on the critical path, and takes significantly longer to build than any other projects, the build process bottlenecks doing the sequential build of that one project. My method -- changing the build command for the external projects to use -j4 for example, will instead do a sequential series of parallel sub-makes, instead of a parallel series of sequential submakes. I've tried it both ways and this is how it works. For the gentleman who suggested distcc -- thanks but no thanks for these reasons: 1) it's something else to add to a very long list of prerequisites for our software and 2) it requires a mostly homogenous network of computers to farm compiles out to. We have, by design, a heterogenous network of OS X and different Linux versions, so that we're testing on as many platforms as possible. On Thu, Oct 7, 2010 at 11:29 AM, Bill Hoffman bill.hoff...@kitware.com wrote: ITK will not do a sequential build. The -j N gets passed down to all the sub projects as well. It will run N build rules at the same time from VTK, ITK and everything else. Just like it was all one big project... ___ 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] Disallowing in-source builds
Two things: You should have your source code under version control, for many reasons, but in this context: 1. The VC system can tell you which files are unknown to it, i.e. those CMake pooped all over your source tree. 2. You can make sure your work is checked in, then delete the source directory and start fresh. Second: The post-CMake cleanup is by no means straightforward, because of what CMake's capabilities. You can have it generate blizzards of thousands of new files if that's what you want. CMake would, in effect, to run its configure process in reverse to truly clean up from any arbitrary set of CMakeLists.txt instructions. This would be a huge effort, and all to solve a problem that is actually between the chair and the keyboard. Software -- especially software for developers -- can't prevent every dumb thing a user can do. If it tries, it will end up tied in knots, and become inflexible and annoying to use. ___ 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 would I use parallel make on ExternalProjects?
On Wed, Oct 6, 2010 at 5:01 PM, Clifford Yapp cliffy...@gmail.com wrote: I use $(MAKE) in my BUILD_COMMAND and that seems to do OK, although I don't know if it works universally. That's an environment variable, as near as I can tell and isn't mentioned in the current CMake documentation. So it's probably not the best thing to do. upon reflection, this would be a little safer: if(${CMAKE_GENERATOR} STREQUAL Unix Makefiles) set(BUILD_COMMAND_STRING ${CMAKE_MAKE_PROGRAM} -j4) else() set(BUILD_COMMAND_STRING $(CMAKE_MAKE_PROGRAM)) endif() ___ 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 would I use parallel make on ExternalProjects?
1. Is that $(MAKE) or is it ${MAKE} ? One thing missing from the CMake documentation -- unless I'm mistaken there's not much explanation of CMake syntax in the documentation. 2. I think it's probably not what one intends to have 'make -j4' (for example) used every time make is invoked. If you configure a program that includes several ExternalProjects, then it would spawn 4 concurrent builds of those ExternalProjects, and then each of those builds would spawn 4 make steps at once, for 16 concurrent processes. On Thu, Oct 7, 2010 at 10:36 AM, Bill Hoffman bill.hoff...@kitware.com wrote: On 10/7/2010 11:25 AM, kent williams wrote: On Wed, Oct 6, 2010 at 5:01 PM, Clifford Yappcliffy...@gmail.com wrote: I use $(MAKE) in my BUILD_COMMAND and that seems to do OK, although I don't know if it works universally. That's an environment variable, as near as I can tell and isn't mentioned in the current CMake documentation. So it's probably not the best thing to do. upon reflection, this would be a little safer: if(${CMAKE_GENERATOR} STREQUAL Unix Makefiles) set(BUILD_COMMAND_STRING ${CMAKE_MAKE_PROGRAM} -j4) else() set(BUILD_COMMAND_STRING $(CMAKE_MAKE_PROGRAM)) endif() By using $(MAKE), the toplevel -j N option should be passed down. The 2.8.3 RC that is out now has some fixes in this area. -Bill ___ 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 would I use parallel make on ExternalProjects?
On Thu, Oct 7, 2010 at 11:05 AM, Bill Hoffman bill.hoff...@kitware.com wrote: What you want is for make to treat the external projects just like any other library or executable in a build. so, if you run this at the top of the build: make -j4 It should run at most 4 concurrent things at once for the whole thing. By using $(MAKE) in the makefiles make will do that. There is one problem with that, which is what I'm trying to address: load balancing. If your project builds ITK, VTK, and sundry other prerequisite libraries, it will spawn 4 sequential builds. In practice this means everything except ITK (which we build with wrapping on) finishes, and then ITK chugs along doing its sequential build. If I do what I'm talking about, I'd sequentially conduct parallel builds of ITK VTK etc. In which case the big hairy libraries, like ITK with wrapping, get built in parallel. That said, CMake will do this by default for make based builds and external projects now. From ExternalProject.cmake: get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR) if(${CMAKE_GENERATOR} MATCHES Make AND (${cmake_generator} STREQUAL ${CMAKE_GENERATOR} OR NOT cmake_generator)) # The project uses the same Makefile generator. Use recursive make. set(cmd $(MAKE)) if(step STREQUAL INSTALL) set(args install) endif() -Bill ___ 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] Disallowing in-source builds
You could try, though it makes my brain hurt to think about it. Why go to such lengths to protect users from themselves? On Thu, Oct 7, 2010 at 11:57 AM, aaron.mead...@thomsonreuters.com wrote: Yeah, I think I'll go with something like what you are saying. I wonder if I can remove the CMakeFiles directory and the CMakeCache.txt file from within the CMakeLists script... Aaron C. Meadows Hi all. Is there a good way to disallow in-source builds? Ideally, I'd like to prevent it before any cruft is written into the source tree. I experimented with writing a function into my CMakelists file and calling it. The function checked if CMAKE_BINARY_DIR was equal to CMAKE_SOURCE_DIR and messaged a FATAL_ERROR if that was the case. This works ok, but still generates a CMakeFiles directory and a CMakeCache.txt file. I don't think there's a way to prevent that from happening. The bad thing about this is that if the user doesn't clean away the in-source CMakeCache.txt file, subsequent out-of-source builds will fail. Perhaps you can do something like this: # check for polluted source tree if(EXISTS ${CMAKE_SOURCE_DIR}/CMakeCache.txt OR EXISTS ${CMAKE_SOURCE_DIR}/CMakeFiles) message(FATAL_ERROR CMakeCache.txt or CMakeFiles exists in source directory!) endif() # make sure the user doesn't play dirty with symlinks get_filename_component(srcdir ${CMAKE_SOURCE_DIR} REALPATH) get_filename_component(bindir ${CMAKE_BINARY_DIR} REALPATH) # disallow in-source builds if(${srcdir} STREQUAL ${bindir}) message(FATAL_ERROR In-source builds are forbidden!) endif() The second half of the question is of course, is there an easy way to clean out a source tree if an in-source build was accidentally kicked off? (short of dividing the files by their timestamp and removing the newer ones, etc..) No, simply because CMake cannot. Your build system might have something like the following: execute_process(COMMAND echo BOOM ${CMAKE_BINARY_DIR}/boom.txt VERBATIM) CMake never knows that the file boom.txt is written, and therefor can't clean it away. The only reasonable way I know of is using git (http://git-scm.com): git clean -df will remove all the files and directories that are not part of the repository. With tar-ball builds it's easier. Just wipe the source tree and unpack again. Michael This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters. ___ 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] How would I use parallel make on ExternalProjects?
I'd like to use parallel make to build libraries like ITK and VTK which are rather time-consuming. This simple-minded (and non portable) method works: In the ExternalProject_Add macro, add BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -j4 But that only works if CMAKE_MAKE_PROGRAM understands the '-j4' flag. I can test the generator, i.e. if(${CMAKE_GENERATOR} STREQUAL Unix Makefiles) set(BUILD_COMMAND_STRING ${CMAKE_PROGRAM} -j4) endif and later use in the ExternalProjectAdd BUILD_COMMAND ${BUILD_COMMAND_STRING} But if the generator is not Unix Makefiles this will expand to the empty string, with the result of suppressing builds from ever happening. The only solution I can imagine is to have 2 ExternalProject_Add macros inside a conditional if(${CMAKE_GENERATOR} STREQUAL Unix Makefiles) ExternalProjectAdd( BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -j4 ) else() ExternalProjectAdd( # let the build command be the default for this generator ) endif() Anyone have a better idea? ___ 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] HOWTO: Generate Use*.cmake files for installation
No, I didn't get any clues as to how this is handled. In ITK it is handled subtly, which is to say I couldn't figure out how it worked from reading the CMakeLists.txt. What I ended up doing is to create the Config file twice -- once for the eventual installation, and once for the in-place usage. The one that gets installed can be pretty straightforward, if you can depend on things being installed in readily knowable paths with respect to the moduleConfig.cmake file: # find out where this file is get_filename_component(CONFIG_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) # # assume you're installed in ${CMAKE_INSTALL_PREFIX}/lib/MODULE # include directory is parallel to lib set(MODULE_INCLUDE_DIR ${CONFIG_DIR}/../../include/MODULE) # assume Config file goes into lib/MODULE along with libraries set(MODULE_LIBRARY_DIR ${CONFIG_DIR}) # The Use file should be in same directory set(MODULE_USE_FILE ${CONFIG_DIR}/UseMODULE.cmake) Then the Use file you can include after find_package(MODULE REQUIRED) sets things up for the user: include_directories(BEFORE ${ModuleDescriptionParser_INCLUDE_DIRS}) link_directories(${MODULE_LIBRARY_DIR}) ___ 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] HOWTO: Generate Use*.cmake files for installation
I need to do what ITK does -- generate one set of *Config.cmake and Use*.cmake files for the build tree, so it can be used in place, and a second set to be installed when 'make install' is run. Looking through the Insight CMakeLists.txt files I'm not seeing how or where the files intended for the installed package are generated. What am I missing? ___ 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] CDash dashboard fail: Errors/Warning/Tests counts all zero?
Consider if you will this dashboard page: http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINS3date=2010-09-13 I have several machines submitting Nightly builds to this dashboard and they all appear to be generating non-empty XML files to upload, and yet I'm getting blanks where I expect to see counts of warnings/errors/etc. Is this something other people have seen and it's a head-slappingly simple problem to fix on either the client or server side? ___ 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] CDash dashboard fail: Errors/Warning/Tests counts all zero?
I'm using what is a pretty naive script that does the actual submission with 'make Nightly' I'll include it at the end of the post. Using 'ctest -D Nightly' has the same result. The quotes on the site and build names are in the CTestConfiguration.ini They are not quoted in CMakeCache.txt The big catch with our build system is that our actual project is built as part of a 'Superbuild' based on the Slicer3 superbuild system. So our actual application that we want to text is actually an ExternalProject with respect to the top level build, which also builds ITK, VTK, FFTW, etc. So in the script, I let the monster build run to completion. Then I go into the build directory for our application, and run 'make Nightly' This, as a matter of course, doesn't end up building much, since the project's already been built by the monster as an ExternalProject. The main thing was to run our regression tests. And this isn't just one project; we have a ton of them that do their own, standalone builds that appear to be running more or less normally. I'm waiting for my boss to give me full access to our CDash server so I can look at the logs and configuration, but I just read through all the available CDash documentation and didn't see anything that addressed this issue. On Thu, Sep 16, 2010 at 12:31 PM, David Cole david.c...@kitware.com wrote: Can you point us to a sample script used to submit these dashboard results? I've never seen dashboard submissions where the what version of ctest submitted these results icon did not show up. I've also never seen dashboard submissions where the appear around the site names and build names. Are you using ctest to submit these results? Or is there a home-grown xml file generator sending them to CDash? #!/bin/sh package=BRAINS3 # # when run by cron, the path variable is only /bin:/usr/bin export PATH=/usr/local/bin:/usr/sbin:$PATH ThisComputer=`hostname` # # the default is to use /brainsdev/kent -- which is # appropriate on the b2dev VMs. if [ $# = 0 ] ; then startdir=/brainsdev/kent/Testing else startdir=$1 fi mkdir -p ${startdir} if [ ! -d ${startdir} ] ; then echo ${startdir} cannot be created, exiting exit 1 fi cd ${startdir} echo checking out test data in `pwd` svn co --username kentwilliams https://www.nitrc.org/svn/brainstestdata if [ $? != 0 ] then echo brainstestdata checkout failed, continuing with old version fi mkdir -p ${startdir}/${ThisComputer} cd ${startdir}/${ThisComputer} top=`pwd` echo WORKING IN $top svn co --username slicerbot https://www.nitrc.org/svn/brains/BRAINS/trunk ${package} OsName=`uname` which gcc /dev/null 21 if [ $? == 0 ] ; then Compiler=gcc-`gcc -dumpversion`-`gcc -dumpmachine` else Compiler=unknown fi for BUILD_TYPE in Debug Fast do B3Build=${top}/${BUILD_TYPE} mkdir -p ${B3Build} cd ${B3Build} # build clean echo Deleting old builds rm -fr * ldpaths=${B3Build}/src/lib/vtk-5.6:${B3Build}/src/lib/InsightToolkit:${B3Build}/src/lib if [ `uname` = Darwin ] then if [ ${DYLD_LIBRARY_PATH} ] ; then set ldpaths=${ldpaths}:${DYLD_LIBRARY_PATH} fi export DYLD_LIBRARY_PATH=${ldpaths} else if [ ${LD_LIBRARY_PATH} ] ; then set ldpaths=${ldpaths}:${LD_LIBRARY_PATH} fi export LD_LIBRARY_PATH=${ldpaths} fi echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH cmake -DSITE:STRING=${ThisComputer} \ -DBUILDNAME:STRING=${OsName}-${Compiler}-${BUILD_TYPE} \ -DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE} ${top}/BRAINS3/SuperBuild echo Building in `pwd` # # get rid of the thousands of 'Up-to-date' messages so you can # actually see what happens make 21 | grep -v 'Up-to-date:' cd src/src-build make Nightly done ___ 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] CMake 2.8.2 going crazy on my 'Superbuild Project'
I have a CMakeLists.txt file that builds a bunch of prerequisite library, and then my application I'm working on. This is done all with External_Project macros. Once everything I need is built, I build my code as an external project: set(proj BRAINSTracerQT) ExternalProject_Add(${proj} URL file://${CMAKE_CURRENT_SOURCE_DIR}/${proj} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${proj} DOWNLOAD_COMMAND DEPENDS ${VTK_DEPEND} ${SEM_DEPEND} CMAKE_GENERATOR ${gen} CMAKE_ARGS ${LOCAL_CMAKE_BUILD_OPTIONS} -DModuleDescriptionParser_DIR:PATH=${MDP_DIR} -DITK_DIR:PATH=${ITK_DIR} -DVTK_DIR:PATH=${VTK_DIR} -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} INSTALL_DIR ${BRAINSTracer_BINARY_DIR} UPDATE_COMMAND ) Everything worked in CMake 2.8.1, now I get the errors below. Very weird. CMake Error at CMakeLists.txt:139 (add_subdirectory): The binary directory /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/vtkRenderingAddOn is already used to build a source directory. It cannot be used to build source directory /scratch/kent/newbuild/BRAINSTracerQT/BRAINSTracerQT/vtkRenderingAddOn Specify a unique binary directory name. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_BTMainWindow.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QVtkImageViewer.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_qtcolorpicker.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QVtkPropertyDialog.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QModuleParameterWidget.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QImageParameterWidget.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QFileBrowserParameterWidget.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QImageTransformDialog.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_MyQTreeWidget.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QImageSaveFileDialog.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QRunProgramDialog.cxx.rule which already has a custom rule. CMake Error: Attempt to add a custom rule to output /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QEnumSpinBox.cxx.rule which already has a custom rule. -- ITK LIBRARIES ITKAlgorithms;ITKStatistics;ITKFEM;itkNetlibSlatec;itkv3p_lsqr;ITKEXPAT;itksys -- FIXUP_BUNDLE_DIRS = /opt/Qt4.6.3/lib;/scratch/kent/newbuild/BT-build/lib/InsightToolkit;/scratch/kent/newbuild/BT-build/lib/vtk-5.6;/scratch/kent/newbuild/BT-build/lib;/scratch/kent/newbuild/BT-build/lib/ModuleDescriptionParser;/lib;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/vtkRenderingAddOn;/opt/Qt4.6.3/plugins/imageformats -- ITK LIBRARIES ITKAlgorithms;ITKStatistics;ITKFEM;itkNetlibSlatec;itkv3p_lsqr;ITKEXPAT;itksys;itkNetlibSlatec;itkv3p_lsqr;ITKEXPAT;itksys CMake Error at CMakeLists.txt:328 (add_executable): add_executable cannot create target BRAINSTracerQT because another target with the same name already exists. The existing target is an executable created in source directory /scratch/kent/newbuild/BRAINSTracerQT/BRAINSTracerQT. See documentation for policy CMP0002 for more details. ___ 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] CMake 2.8.2 going crazy on my 'Superbuild Project'
Problem solved -- in what may have been an Emacs mishap, the entire CMakeLists.txt got included twice. The post-2.4 CMake pickiness caught the problem, but not knowing that I'd somehow duplicated the entire contents of the file, I was faced with utterly baffling error messages. I even thought when I looked at it 'it looks like it's including the CMakeLists.txt twice!' ___ 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] HowTo specify Site/Buildname for Ctest-CDash submissions
I think this used to go into DartConfiguration.tcl but we don't use Dart any more for dashboards. I have read through the instructions http://www.vtk.org/Wiki/CDash:Build_Management#Client_Configuration and it describes how to configure things if you're going to run ctest directly. What it doesn't explain (and it's not explained anywhere I can find out) is how if you use CMake to build and CMake to test (i.e. make Nightly) how to specify the site and build name. So our builds end up with blank site and a generic build name http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINS3 ___ 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] HowTo specify Site/Buildname for Ctest-CDash submissions
Thanks for the prompt reply. It's 'SITE' and 'BUILDNAME' On Tue, Aug 10, 2010 at 2:44 PM, Rolf Eike Beer e...@sf-mail.de wrote: Am Tuesday 10 August 2010 schrieb kent williams: I think this used to go into DartConfiguration.tcl but we don't use Dart any more for dashboards. I have read through the instructions http://www.vtk.org/Wiki/CDash:Build_Management#Client_Configuration and it describes how to configure things if you're going to run ctest directly. What it doesn't explain (and it's not explained anywhere I can find out) is how if you use CMake to build and CMake to test (i.e. make Nightly) how to specify the site and build name. Put SET(BUILDNAME my-buildname) at the beginning of your CMakeLists. I'm too lazy to dig out which module it is that this needs to be before. The other thing is probably SITENAME. You can grep your CMakeCache.txt for the site name that is displayed to be sure. Eike ___ 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] CMake + UIC files -- Is this a bug with CMake or with me?
It's perfectly clear to me now, but I bet I'm not the first (or last!) person to run into issues like this and get roadblocked. Every software task seems to have its stumbling block. In Medical Image Processing we spend a lot of our time debugging issues related to how image volumes are oriented/organized with respect to anatomy. In C++ programming, you spend a lot of your time debugging template programming, which produces awful error messages when it goes wrong. In any shell/scripting language (which CMake is, at least in part) you devote a lot of time to where to put things in quotes, how to deal with spaces inside tokens, etc. On Tue, Jul 20, 2010 at 4:30 PM, Andreas Pakulat ap...@gmx.de wrote: On 20.07.10 16:18:26, kent williams wrote: OK, so set_source_file_properties needs a property value that's a single string. This wasn't clear from the documentation at all or not clear to me at least. Thanks for your help! It doesn't need to be explicit if you've understood cmake variables (yes thats not exactly and easy and straight-forward topic). The problem is that when you have multiple values in a varialy xyz and you pass it as ${xyz} to the function, it'll get expanded and as set_source_files_properties allows multiple properties to be set it takes the second (third, fourth etc.) element of the list you've passed in as next property name instead of value to the first property. Using the quotes you make sure that cmake understands that all individual elements from the list belong to the same value position in the call to the set-function. Andreas -- You are going to have a new love affair. ___ 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] CMake + UIC files -- Is this a bug with CMake or with me?
This is with cmake version 2.8.1 on OS X 10.6. I had a project using CMake and Qt. As long as I only used one QT Designer-generated .ui file, everything worked perfectly. When I added as second UI file, things no longer worked. I was working from the CMake + Qt4 examples on the web. There are two problems: 1. If you give a list of more than one header file as the dependency on set_source_files_properties, it throws a configure-time error: CMake Error at CMakeLists.txt:33 (set_source_files_properties): set_source_files_properties called with incorrect number of arguments. 2. If I work around that error (by setting each header dependency individually), then only one of the UI files seems to get processed to create the corresponding C++ header file: /scratch/kent/qtcmake/src/QTCMake.cxx:4:35: error: ui_qvtkpropertydialog.h: No such file or directory I've put a succinct example illustrating the problem I'm having here: http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz The CMakeLists.txt file is as follows: project(QTCMake) cmake_minimum_required(VERSION 2.8) #uses QT4 and associated CMake Macros find_package( Qt4 REQUIRED ) include(${QT_USE_FILE}) set(QT_USE_QTXML 1) #dummy test program set(QTCMake_SRC QTCMake.cxx) # list of QT Designer-generated XML designs set(QTCMake_UIS qvtkpropertydialog.ui qimagetransformdialog.ui ) # # this is supposed to wrap all the UI files QT4_WRAP_UI(UIHeaders ${QTCMake_UIS} ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(QTCMake ${QTCMake_SRC}) if(GUMBY) # # unless I misunderstood, this should make the objects # depend on the headers generated by UIC. # This doesn't work as it should; I don't know why set_source_files_properties(${QTCMake_SRC} PROPERTIES OBJECT_DEPENDS ${UIHeaders}) else() # # this loops through the list of ui_*.h, and adds the dependency # for each. foreach(hdr ${UIHeaders}) set_source_files_properties(${QTCMake_SRC} PROPERTIES OBJECT_DEPENDS ${hdr}) endforeach() endif() ___ 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] CMake + UIC files -- Is this a bug with CMake or with me?
Sorry -- thanks for trying though. http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz On Tue, Jul 20, 2010 at 1:00 PM, Andreas Pakulat ap...@gmx.de wrote: On 20.07.10 12:06:11, kent williams wrote: This is with cmake version 2.8.1 on OS X 10.6. I had a project using CMake and Qt. As long as I only used one QT Designer-generated .ui file, everything worked perfectly. When I added as second UI file, things no longer worked. I was working from the CMake + Qt4 examples on the web. There are two problems: 1. If you give a list of more than one header file as the dependency on set_source_files_properties, it throws a configure-time error: CMake Error at CMakeLists.txt:33 (set_source_files_properties): set_source_files_properties called with incorrect number of arguments. 2. If I work around that error (by setting each header dependency individually), then only one of the UI files seems to get processed to create the corresponding C++ header file: /scratch/kent/qtcmake/src/QTCMake.cxx:4:35: error: ui_qvtkpropertydialog.h: No such file or directory I've put a succinct example illustrating the problem I'm having here: http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz That url gives a 404. The CMakeLists.txt file is as follows: project(QTCMake) cmake_minimum_required(VERSION 2.8) #uses QT4 and associated CMake Macros find_package( Qt4 REQUIRED ) include(${QT_USE_FILE}) set(QT_USE_QTXML 1) #dummy test program set(QTCMake_SRC QTCMake.cxx) # list of QT Designer-generated XML designs set(QTCMake_UIS qvtkpropertydialog.ui qimagetransformdialog.ui ) # # this is supposed to wrap all the UI files QT4_WRAP_UI(UIHeaders ${QTCMake_UIS} ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(QTCMake ${QTCMake_SRC}) Usually you'd also add the UIHeaders to the list of sources. I'm using qt4_wrap_ui+qt4_automoc and add_executable and nothing else and ui-headers are being generated just fine. Andreas -- Your depth of comprehension may tend to make you lax in worldly ways. ___ 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] CMake + UIC files -- Is this a bug with CMake or with me?
Let's try that again http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz On Tue, Jul 20, 2010 at 1:20 PM, kent williams nkwmailingli...@gmail.com wrote: Sorry -- thanks for trying though. http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz On Tue, Jul 20, 2010 at 1:00 PM, Andreas Pakulat ap...@gmx.de wrote: On 20.07.10 12:06:11, kent williams wrote: This is with cmake version 2.8.1 on OS X 10.6. I had a project using CMake and Qt. As long as I only used one QT Designer-generated .ui file, everything worked perfectly. When I added as second UI file, things no longer worked. I was working from the CMake + Qt4 examples on the web. There are two problems: 1. If you give a list of more than one header file as the dependency on set_source_files_properties, it throws a configure-time error: CMake Error at CMakeLists.txt:33 (set_source_files_properties): set_source_files_properties called with incorrect number of arguments. 2. If I work around that error (by setting each header dependency individually), then only one of the UI files seems to get processed to create the corresponding C++ header file: /scratch/kent/qtcmake/src/QTCMake.cxx:4:35: error: ui_qvtkpropertydialog.h: No such file or directory I've put a succinct example illustrating the problem I'm having here: http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz That url gives a 404. The CMakeLists.txt file is as follows: project(QTCMake) cmake_minimum_required(VERSION 2.8) #uses QT4 and associated CMake Macros find_package( Qt4 REQUIRED ) include(${QT_USE_FILE}) set(QT_USE_QTXML 1) #dummy test program set(QTCMake_SRC QTCMake.cxx) # list of QT Designer-generated XML designs set(QTCMake_UIS qvtkpropertydialog.ui qimagetransformdialog.ui ) # # this is supposed to wrap all the UI files QT4_WRAP_UI(UIHeaders ${QTCMake_UIS} ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(QTCMake ${QTCMake_SRC}) Usually you'd also add the UIHeaders to the list of sources. I'm using qt4_wrap_ui+qt4_automoc and add_executable and nothing else and ui-headers are being generated just fine. Andreas -- Your depth of comprehension may tend to make you lax in worldly ways. ___ 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] CMake + UIC files -- Is this a bug with CMake or with me?
http://www.cornwarning.com/xfer/QTCMakeTest.tar.gz Sorry for the trouble. Safari has a feature, whereby if I type in a URL to test it, it will initiate a successful download, but then change the URL in the URL entry box to the incorrect URL. Steve Jobs wants to ruin my life, and every day he does it in more subtle devious ways. On Tue, Jul 20, 2010 at 1:53 PM, John Drescher dresche...@gmail.com wrote: On Tue, Jul 20, 2010 at 2:48 PM, Andreas Pakulat ap...@gmx.de wrote: On 20.07.10 13:30:51, kent williams wrote: Let's try that again http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz Still the same. Same here. I get a cute image that says Sorry Sam, I can't seem to find that URL. 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 ___ 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] CMake + UIC files -- Is this a bug with CMake or with me?
Thanks. I don't know if you've actually tried the project I put up to illustrate the project, but while what you say makes sense, it doesn't appear to fix the problem. It's frustrating for me; apparently, though I'm following exactly the pattern that's reputed to work, CMake isn't generating the Makefile code to deal with the second .ui file. Either there's something wrong in CMake, or I'm somehow missing something in what should be a really simple CMakeLists.txt. On Tue, Jul 20, 2010 at 2:52 PM, Michael Wild them...@gmail.com wrote: Hi I hope the inline comments below solve your problems. And please, don't cross-post... On 20. Jul, 2010, at 19:06 , kent williams wrote: This is with cmake version 2.8.1 on OS X 10.6. I had a project using CMake and Qt. As long as I only used one QT Designer-generated .ui file, everything worked perfectly. When I added as second UI file, things no longer worked. I was working from the CMake + Qt4 examples on the web. There are two problems: 1. If you give a list of more than one header file as the dependency on set_source_files_properties, it throws a configure-time error: CMake Error at CMakeLists.txt:33 (set_source_files_properties): set_source_files_properties called with incorrect number of arguments. 2. If I work around that error (by setting each header dependency individually), then only one of the UI files seems to get processed to create the corresponding C++ header file: /scratch/kent/qtcmake/src/QTCMake.cxx:4:35: error: ui_qvtkpropertydialog.h: No such file or directory I've put a succinct example illustrating the problem I'm having here: http://www.cornwarning.com/xfer/QTCmakeTest.tar.gz The CMakeLists.txt file is as follows: project(QTCMake) cmake_minimum_required(VERSION 2.8) #uses QT4 and associated CMake Macros find_package( Qt4 REQUIRED ) include(${QT_USE_FILE}) set(QT_USE_QTXML 1) #dummy test program set(QTCMake_SRC QTCMake.cxx) # list of QT Designer-generated XML designs set(QTCMake_UIS qvtkpropertydialog.ui qimagetransformdialog.ui ) # # this is supposed to wrap all the UI files QT4_WRAP_UI(UIHeaders ${QTCMake_UIS} ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(QTCMake ${QTCMake_SRC}) if(GUMBY) # # unless I misunderstood, this should make the objects # depend on the headers generated by UIC. # This doesn't work as it should; I don't know why set_source_files_properties(${QTCMake_SRC} PROPERTIES OBJECT_DEPENDS ${UIHeaders}) Just wrap ${UIHeaders} in quotes: set_source_files_properties(${QTCMake_SRC} PROPERTIES OBJECT_DEPENDS ${UIHeaders}) else() # # this loops through the list of ui_*.h, and adds the dependency # for each. foreach(hdr ${UIHeaders}) set_source_files_properties(${QTCMake_SRC} PROPERTIES OBJECT_DEPENDS ${hdr}) endforeach() This loop isn't going to append to the list of dependencies, it overwrites the previous value instead. If you want appending, you have to use the following instead: foreach(hdr IN LISTS UIHeaders) set_property(SOURCE ${QTCMake_SRC} APPEND PROPERTY OBJECT_DEPENDS ${hdr}) endforeach() endif() 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
Re: [CMake] CMake + UIC files -- Is this a bug with CMake or with me?
I see what you're doing and I have two points: 1. You only have one file in ${${PROJECT_HAME}_UIS} -- what happens if you create a second file with Designer and add it to this project? Believe me, I read through Qt4Macros.cmake, and what's there should work, but in my case it most definitely does not. 2. I don't get adding '*.h' files to the source list in add_executable does anything. It doesn't apparently generate a recipe to make an object file from a header. On Tue, Jul 20, 2010 at 3:26 PM, John Drescher dresche...@gmail.com wrote: On Tue, Jul 20, 2010 at 4:09 PM, kent williams nkwmailingli...@gmail.com wrote: Thanks. I don't know if you've actually tried the project I put up to illustrate the project, but while what you say makes sense, it doesn't appear to fix the problem. It's frustrating for me; apparently, though I'm following exactly the pattern that's reputed to work, CMake isn't generating the Makefile code to deal with the second .ui file. Either there's something wrong in CMake, or I'm somehow missing something in what should be a really simple CMakeLists.txt. I do not do globbing. I just add the result of QT4_WRAP_UI to my target SET( ${PROJECT_NAME}_SRCS ./src/main.cxx ./src/mainwindow.cxx ./src/textwidget.cxx ./src/upmcLungApp.cxx ./src/AppSettingsDlg.cxx ./src/laFileMenu.cxx ) SET( ${PROJECT_NAME}_MOC_HDR ./Include/mainwindow.h ./Include/textwidget.h ./Include/upmcLungApp.h ./Include/AppSettingsDlg.h ./Include/laFileMenu.h ) SET( ${PROJECT_NAME}_HDRS ./Include/ClickedPointEvent.h ./Include/${PROJECT_NAME}Constants.h ./Include/sliceOrientation.h ) # MSVC_PCH_SUPPORT(${PROJECT_NAME}) # some .ui files SET( ${PROJECT_NAME}_UIS ./rc/AppSettings.ui ) # and finally an resource file SET( ${PROJECT_NAME}_RCS ./rc/${PROJECT_NAME}.qrc ) # this command will generate rules that will run rcc on all files from ${PROJECT_NAME}_RCS # in result ${PROJECT_NAME}_RC_SRCS variable will contain paths to files produced by rcc QT4_ADD_RESOURCES( ${PROJECT_NAME}_RC_SRCS ${${PROJECT_NAME}_RCS} ) # and finally this will run moc: QT4_WRAP_CPP( ${PROJECT_NAME}_MOC_SRCS ${${PROJECT_NAME}_MOC_HDR} ) # this will run uic on .ui files: QT4_WRAP_UI( ${PROJECT_NAME}_UI_HDRS ${${PROJECT_NAME}_UIS} ) SOURCE_GROUP(Generated FILES ${${PROJECT_NAME}_RC_SRCS} ${${PROJECT_NAME}_MOC_SRCS} ${${PROJECT_NAME}_UI_HDRS} ) SOURCE_GROUP(Resources FILES ${${PROJECT_NAME}_UIS} ${${PROJECT_NAME}_RCS} ) # ADD_EXECUTABLE( ${PROJECT_NAME} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_MOC_SRCS} ${${PROJECT_NAME}_HDRS} ${${PROJECT_NAME}_MOC_HDR} ${${PROJECT_NAME}_RC_SRCS} ${${PROJECT_NAME}_UI_HDRS} ) Right now I am doing all of my development in Visual Studio. In the past this project did build under linux. 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] CMake + UIC files -- Is this a bug with CMake or with me?
OK, so set_source_file_properties needs a property value that's a single string. This wasn't clear from the documentation at all or not clear to me at least. Thanks for your help! On Tue, Jul 20, 2010 at 4:07 PM, Andreas Pakulat ap...@gmx.de wrote: On 20.07.10 15:43:16, kent williams wrote: I see what you're doing and I have two points: 1. You only have one file in ${${PROJECT_HAME}_UIS} -- what happens if you create a second file with Designer and add it to this project? Believe me, I read through Qt4Macros.cmake, and what's there should work, but in my case it most definitely does not. I've adjusted your CMakeLists.txt to use set_source_files_properties(${QTCMake_SRC} PROPERTIES OBJECT_DEPENDS ${UIHeaders}) The generated Makefiles do generate the headers from the ui files before building the object file for the executable. So this does work as long as you're using quotes around the variable. It also works that after touching a .ui file the header gets re-generated. (I'm using CMake 2.8.1 currently here). 2. I don't get adding '*.h' files to the source list in add_executable does anything. It doesn't apparently generate a recipe to make an object file from a header. It does make sure that _something_ depends on the generated header files. This then triggers generating them from the .ui file. I think thats the problem with your original example, there's nothing (in particular no target) that depends explicitly on the generated header files and hence the all target doesn't generate them. This is pretty similar to your approach with set_source_files_properties, except its a bit more hidden whats going on and the dependency is probably between the target and the header. Andreas -- Expect a letter from a friend who will ask a favor of you. ___ 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] When does fixup_bundle copy or not copy a library
I had an issue with fixup_bundle skipping copying and fixing up a library upon which my application depended. This library's source was in a subdirectory of the application's build directory, and named in an add_subdirectory clause. My fixup_bundle recipe worked fine except for this one library. I managed to get thing fixed by removing the install command from the library's CMakeLists.txt file, and deleting the library that had already been installed. This (I guess) forced the application to link to the locally built library. I don't know if I'm explaining this clearly but the executive summary is this: my application linked to a library, but fixup_bundle skipped copying the library to the bundle directory and fixing up that library's dependencies. And I don't know why that is the case. Any ideas? Do I need to explain myself better? ___ 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] Using CTest without DART??
We don't have Dart installed on some machines we want to do testing on. Consequently including Dart.cmake does nothing to generate DartConfiguration.tcl. If you're not using Dart, how do you set things up such that you avoid this error? running: ctest -V -D NightlyStart -D NightlyConfigure -D NightlyBuild -D NightlyTest -D NightlySubmit UpdateCTestConfiguration from :/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/FAST-build/BRAINS3-build/src-build/DartConfiguration.tcl Cannot find file: /scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/FAST-build/BRAINS3-build/src-build/DartConfiguration.tcl Site: Build name: WARNING: No nightly start time found please set in CTestConfig.cmake or DartConfig.cmake Problem initializing the dashboard. ___ 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] Using CTest without DART??
Jun 4 10:21:12 On Fri, Jun 4, 2010 at 9:59 AM, David Cole david.c...@kitware.com wrote: Are you doing: include(CTest) in your CMakeLists.txt file? On Fri, Jun 4, 2010 at 10:51 AM, kent williams nkwmailingli...@gmail.com wrote: We don't have Dart installed on some machines we want to do testing on. Consequently including Dart.cmake does nothing to generate DartConfiguration.tcl. If you're not using Dart, how do you set things up such that you avoid this error? running: ctest -V -D NightlyStart -D NightlyConfigure -D NightlyBuild -D NightlyTest -D NightlySubmit UpdateCTestConfiguration from :/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/FAST-build/BRAINS3-build/src-build/DartConfiguration.tcl Cannot find file: /scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/FAST-build/BRAINS3-build/src-build/DartConfiguration.tcl Site: Build name: WARNING: No nightly start time found please set in CTestConfig.cmake or DartConfig.cmake Problem initializing the dashboard. ___ 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] Using CTest without DART??
We do have a CTestConfig.cmake: set(CTEST_PROJECT_NAME BRAINS3) set(CTEST_NIGHTLY_START_TIME 00:00:00 EST) set(CTEST_DROP_METHOD http) set(CTEST_DROP_SITE testing.psychiatry.uiowa.edu) set(CTEST_DROP_LOCATION /CDash/submit.php?project=BRAINS3) set(CTEST_DROP_SITE_CDASH TRUE) I ran the ctest command with --debug and the reason it still wants to use DartConfiguration.tcl is that it can't find CTestConfiguration.ini. How is CTestConfiguration.ini generated? Why don't I have one? On Fri, Jun 4, 2010 at 10:55 AM, David Cole david.c...@kitware.com wrote: What are the contents of your CTestConfig.cmake file? If you are going to run dashboards like this: BUILD COMMAND runcmd ctest -V -D NightlyStart -D NightlyConfigure -D NightlyBuild -D NightlyTest -D NightlySubmit running: ctest -V -D NightlyStart -D NightlyConfigure -D NightlyBuild -D NightlyTest -D NightlySubmit Then when you configure, you will have to define BUILDNAME and SITE variables so that the build name and site are known somehow. Our typical dashboard runs that we do nowadays all use -S scripts with those things set in the script. But to run a dashboard with ctest -D args, you have to cache any necessary information that would otherwise be set in the driving script. Hope this helps, David On Fri, Jun 4, 2010 at 11:25 AM, kent williams nkwmailingli...@gmail.com wrote: I'm now finding out that we had include(Dart) in all our Makefiles. I commented that out, and added include(CTest) instead. Then I deleted everything in the build directory, and re-configured. I get these errors still: /scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-lib/CMake-build/bin/cmake -GKDevelop3 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ {-DCMAKE_CXX_FLAGS:STRING=-m32 -UNDEBUG -g -UITKIO_DEPRECATED_METADATA_ORIENTATION -Wall -W -Wcast-qual -Wwrite-strings } {-DCMAKE_CXX_FLAGS_RELEASE:STRING=-m32 -UNDEBUG -g -UITKIO_DEPRECATED_METADATA_ORIENTATION -Wall -W -Wcast-qual -Wwrite-strings } {-DCMAKE_CXX_FLAGS_DEBUG:STRING=-m32 -UNDEBUG -g -UITKIO_DEPRECATED_METADATA_ORIENTATION -Wall -W -Wcast-qual -Wwrite-strings } -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc {-DCMAKE_C_FLAGS:STRING=-m32 -UNDEBUG -g -UITKIO_DEPRECATED_METADATA_ORIENTATION -Wall -W -Wcast-qual -Wwrite-strings } {-DCMAKE_Fortran_FLAGS:STRING=-m32 -UNDEBUG -g -UITKIO_DEPRECATED_METADATA_ORIENTATION -Wall -W -Wcast-qual -Wwrite-strings } -DDART_TESTING_TIMEOUT:STRING=600 {-DMEMORYCHECK_COMMAND_OPTIONS:STRING=--suppressions=/scratch/williamsnk/Testing/BRAINS3/BuildScripts/ValgrindSuppression.supp --verbose --num-callers=40 --leak-check=full --leak-resolution=high --show-reachable=yes} -DMEMORYCHECK_COMMAND:PATH=/usr/bin/valgrind -DCMAKE_SHARED_LINKER_FLAGS:STRING= -DCMAKE_EXE_LINKER_FLAGS:STRING= -DCMAKE_MODULE_LINKER_FLAGS:STRING= -DSITE:STRING=compute6.uiowa -DBUILDNAME:STRING=Linux.DEBUG -DOPENGL_gl_LIBRARY:FILEPATH=/usr/lib/libGL.so -DOPENGL_glu_LIBRARY:FILEPATH=/usr/lib/libGLU.so -DOPENGL_INCLUDE_DIR:PATH=/usr/include -DCMAKE_BUILD_TYPE=Debug -DMAKECOMMAND:STRING=make -j 4 -DITK_DIR:FILEPATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib/InsightToolkit -DKWWidgets_DIR:FILEPATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib/KWWidgets -DVTK_DIR:FILEPATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib/vtk-5.6 -DCMAKE_INSTALL_PREFIX:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build -DCPACK_GENERATOR:STRING=TGZ -DCPACK_PACKAGE_FILE_NAME:STRING=BRAINS3-3.3-alpha-2010-06-04-linux-x86 -DUSE_OLD_BUILD:BOOL=OFF -DBRAINS_BUILD_TESTING:BOOL=ON -DBRAINS_BINARY_DIR:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build -DDISABLE_ITK_TESTING:BOOL=ON -DDISABLE_ALT_DICOM_FILTERS:BOOL=ON -DUSE_GUI:BOOL=OFF -DENABLE_TEST_IN_GUI_MODE:BOOL=OFF -DUSE_BRAINS_BETA:BOOL=ON -DUSE_BRAINS_ALPHA:BOOL=ON -DCMAKE_SKIP_RPATH:BOOL=ON -DUSE_PYTHON:BOOL=OFF -DUSE_TCL:BOOL=ON -DWrapITK_DIR:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-lib/Insight-build/Wrapping/WrapITK -DINSTALL_DEVEL_FILES:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DTCL_INCLUDE_PATH:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-lib/tcl-build/include -DTCL_LIBRARY:FILEPATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib/libtcl8.5.so -DTK_INCLUDE_PATH:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-lib/tcl-build/include -DTK_LIBRARY:FILEPATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib/libtk8.5.so -DvtkINRIA3D_DIR:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib -DNITRC_Standalone:BOOL=ON -DUSE_DEBUG_IMAGE_VIEWER:BOOL=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/bin -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG-build/lib -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=/scratch/williamsnk/Testing/BRAINS-COMPILE/Linux/DEBUG
Re: [CMake] Using CTest without DART??
I have discovered the problem, and it has nothing to do with CTest or CMake. It had everything to do with our overly-complex build system... but I now understand more about CTest/Dart etc than I did, so thanks for your time! ___ 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] SQL errors on CDash nightly submissions?
We have a stock CDash installation on our testing web server (http://testing.psychiatry.uiowa.edu). I get SQL errors when a lot of machines submit nightly and experimental builds -- does this mean the CDash database is corrupt, or is this a known CTest problem with a known solution? Using HTTP submit method Drop site:http://testing.psychiatry.uiowa.edu/CDash/submit.php?project=BRAINS3 Upload file: /scratch/kent/BT/BRAINS-COMPILE/Darwin/DEBUG-build/BRAINS3-build/src-build/Testing/20100602-0500/Build.xml to http://testing.psychiatry.uiowa.edu/CDash/submit.php?project=BRAINS3FileName=bloch.uiowa___Darwin.DEBUG___20100602-0500-Nightly___XML___Build.xml Size: 939 Uploaded: /scratch/kent/BT/BRAINS-COMPILE/Darwin/DEBUG-build/BRAINS3-build/src-build/Testing/20100602-0500/Build.xml Upload file: /scratch/kent/BT/BRAINS-COMPILE/Darwin/DEBUG-build/BRAINS3-build/src-build/Testing/20100602-0500/Configure.xml to http://testing.psychiatry.uiowa.edu/CDash/submit.php?project=BRAINS3FileName=bloch.uiowa___Darwin.DEBUG___20100602-0500-Nightly___XML___Configure.xml Size: 1800 Uploaded: /scratch/kent/BT/BRAINS-COMPILE/Darwin/DEBUG-build/BRAINS3-build/src-build/Testing/20100602-0500/Configure.xml Upload file: /scratch/kent/BT/BRAINS-COMPILE/Darwin/DEBUG-build/BRAINS3-build/src-build/Testing/20100602-0500/Test.xml to http://testing.psychiatry.uiowa.edu/CDash/submit.php?project=BRAINS3FileName=bloch.uiowa___Darwin.DEBUG___20100602-0500-Nightly___XML___Test.xml Size: 397840 Server Response: SQL error in TestImage Insert():Duplicate entry '27' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '28' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '29' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '30' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '31' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '32' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '33' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '34' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '35' for key 'PRIMARY'br SQL error in TestImage Insert():Duplicate entry '36' for key 'PRIMARY'br Uploaded: /scratch/kent/BT/BRAINS-COMPILE/Darwin/DEBUG-build/BRAINS3-build/src-build/Testing/20100602-0500/Test.xml Errors occurred during submission. Errors while running CTest ___ 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] chicken and egg q: Can CMakeLists.txt generate CTestConfig.cmake during configuration?
On Fri, May 28, 2010 at 5:11 PM, David Cole david.c...@kitware.com wrote: CTestConfig.cmake should be downloaded from CDash and committed into your source tree manually before configuring and before your first dashboard submission. That's what I figured, but I didn't know exactly how it fit into things. Why do you think you want to generate it? Well, we've gotten to the point where we can use ExternalProjects for all the libraries we depend on (ITK,VTK, etc). We also have CMakeLists.txt for each of our projects on NITRC that builds all the prerequisites, then builds the project itself as an external project. So for each of these projects, there's a CMakeLists.txt file that differs only in the name of the project, and each of our CTestConfig.cmake files differ only in the name of the project. So the next step would be to get rid of the individual files for each project, and generate them during initial CMake configuration. Now that I think about it, we could generate the CMakeLists.txt and CTestConfig.cmake at the top level configuration time, since we're building our own projects as ExternalProjects. Again, it could be an issue of timing -- at configuration time, we'd have to configure those files into a subdirectory, before configuring the ExternalProject that needs those files to configure itself. If the nightly start time changes, the CDash server also needs to know about this. If you are just submitting to a different CDash server, you can do that explicitly from a script without modifying CTestConfig.cmake. (Just set the variables in your ctest -S script just prior to a ctest_submit call...) If it's something else, let's talk about it. :-) HTH, David On Fri, May 28, 2010 at 5:13 PM, kent williams nkwmailingli...@gmail.com wrote: Subject line says it all. Does CTestConfig.cmake need to exist at configuration time, or just at Ctest/make test time? ___ 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] chicken and egg q: Can CMakeLists.txt generate CTestConfig.cmake during configuration?
Subject line says it all. Does CTestConfig.cmake need to exist at configuration time, or just at Ctest/make test time? ___ 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 CPACK decide what goes into release packages?
Platform: OS X 10.5.8. We also want to support Linux and Windows, but are doing OS X first because it's usally the crankiest to get working. cpack version 2.9.20100511 Using PackageMaker and Tar for generators. I don't have it all worked out, but I think the problems I'm having aren't CPack's fault. Someone else did the setup for CPack, and copied a bunch of complicated stuff from some other project, without understanding what it did, and then never debugged it. Now I'm having to actually learn how to use CPack properly to unravel it all. On Tue, May 18, 2010 at 1:29 AM, Eric Noulard eric.noul...@gmail.com wrote: 2010/5/17 Tyler Roscoe ty...@cryptio.net: On Mon, May 17, 2010 at 12:53:34PM -0500, kent williams wrote: Internally, CPack will use CMake's install mechanism to automatically populate the package. Right. Mostly, all that CPack does is call make install on your project with a special CMAKE_INSTALL_PREFIX. but when I add include(CPack) and then run make package It generates empty install packages. I'll add a bunch of questions: 1) Which platform (Unix, Windows, MacOs etc...) 2) What is the cpack/cmake version (output of cpack --version) 3) Which CPack generator are you using (ZIP, TGZ, DEB, NSIS, PackageMaker,...) The only target (for now) that needs to go into the package is a single statically linked executable, which is referenced with a cmake install command: INSTALL(TARGETS BRAINSFit DESTINATION bin) What does your project do when you make install? tyler -- 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] How does CPACK decide what goes into release packages?
It's mentioned in passing on the CMake Wiki, which is all the documentation I've found for CPack. Namely Internally, CPack will use CMake's install mechanism to automatically populate the package. but when I add include(CPack) and then run make package It generates empty install packages. The only target (for now) that needs to go into the package is a single statically linked executable, which is referenced with a cmake install command: INSTALL(TARGETS BRAINSFit DESTINATION bin) I don't understand how you tell CPack what to install, and I've re-read the Wiki page several times. Am I just stupid? ___ 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] Current CVS CMake can't build Qt/Cocoa OS X bundle that doesn't crash
OS X 10.5.8, Qt-4.6.2, g++-4.2 gcc-4.2 ../cmake/bootstrap --prefix=/scratch/kent/opt --qt-gui --qt-qmake=/opt/Qt-4.6.2/bin/qmake make make install /scratch/kent/opt/CMake\ 2.9-20100511.app/Contents/MacOS/CMake\ 2.9-20100511 Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle. Abort This looks like a different problem than the one I agonized over a couple weeks ago with respect to qt_menu.nib. There is a qtmenu.nib: /scratch/kent/opt/CMake 2.9-20100511.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib ls -l /scratch/kent/opt/CMake\ 2.9-20100511.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib total 32 -rw-r--r-- 1 kent user 1451 May 11 11:52 classes.nib -rw-r--r-- 1 kent user 471 May 11 11:52 info.nib -rw-r--r-- 1 kent user 5567 May 11 11:52 keyedobjects.nib What it looks like to me is that when the QtGui framework gets copied, something is messed up in the paths fixups during fixup_bundle. ___ 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] Current CVS CMake can't build Qt/Cocoa OS X bundle that doesn't crash
I tried copying it to the suggested place, but it still didn't work. My solution, since I'm not a CMake developer, was to go back to using xterm -e ccmake instead of the Qt dialog. On Tue, May 11, 2010 at 1:23 PM, Clinton Stimpson clin...@elemtech.com wrote: Just a thought: does it change anything if you make a softlink Versions/Current/Resources - Resources in QtGui.framework? The message says QtGui.framework/Versions/Current/Resources/ but when I last tried it, it was actually looking in QtGui.framework/Resources. They may have changed/fixed that. Clint On Tuesday, May 11, 2010 11:03:48 am kent williams wrote: OS X 10.5.8, Qt-4.6.2, g++-4.2 gcc-4.2 ../cmake/bootstrap --prefix=/scratch/kent/opt --qt-gui --qt-qmake=/opt/Qt-4.6.2/bin/qmake make make install /scratch/kent/opt/CMake\ 2.9-20100511.app/Contents/MacOS/CMake\ 2.9-20100511 Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle. Abort This looks like a different problem than the one I agonized over a couple weeks ago with respect to qt_menu.nib. There is a qtmenu.nib: /scratch/kent/opt/CMake 2.9-20100511.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib ls -l /scratch/kent/opt/CMake\ 2.9-20100511.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib total 32 -rw-r--r-- 1 kent user 1451 May 11 11:52 classes.nib -rw-r--r-- 1 kent user 471 May 11 11:52 info.nib -rw-r--r-- 1 kent user 5567 May 11 11:52 keyedobjects.nib What it looks like to me is that when the QtGui framework gets copied, something is messed up in the paths fixups during fixup_bundle. ___ 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] Current CVS CMake can't build Qt/Cocoa OS X bundle that doesn't crash
Yeah binaries solve one problem, but not the problem of why the builds I do fail. It's not a show-stopper for our software development, but it is the sort of thing that should Just Work, and builds of current GIT repository worked fine a few weeks ago, and 2.8.1 built as well. Oh well! On Tue, May 11, 2010 at 4:03 PM, Bill Hoffman bill.hoff...@kitware.com wrote: On 5/11/2010 4:47 PM, kent williams wrote: I tried copying it to the suggested place, but it still didn't work. My solution, since I'm not a CMake developer, was to go back to using xterm -e ccmake instead of the Qt dialog. What about the nightly binaries created at Kitware: http://www.cmake.org/files/dev/?C=M;O=D It has Qt support built in, and is built and tested each night. -Bill ___ 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] how to (portably) change file permissions -- besides INSTALL?
Subject line says it all. I could explain what I'm trying to do but it would be a case of Too long, didn't read for most of you. You can change permissions with the CMake 'install' command, the 'file(COPY)' and 'file(INSTALL)' command but I can't find the command that changes the permissions of an existing file. Unless I'm missing something, which I almost always am. ___ 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] ExternalProjects: How do ExternalProject_add and ExternalProject_Add_Step interact?
I tried just listing the single step, and for some reason (probably my fault) it didn't work. I did get this working, but I had to add two things to keep tcl and tk from breaking fixup_bundle -- I had to make the Tcl/Tk SO libraries writable, and I needed to delete tclsh and wish, because fixup_bundle didn't like their link dependencies. set(TCL_DEPEND tcl) set(proj tcl) ExternalProject_Add(${proj} CVS_REPOSITORY :pserver:anonymous:@tcl.cvs.sourceforge.net:/cvsroot/tcl CVS_TAG -r core-8-5-7 CVS_MODULE tcl CONFIGURE_COMMAND sh ${CONFIG_WRAPPER} ${BRAINSTracer_BINARY_DIR}/tcl-prefix/src/tcl/unix/configure --prefix=${BRAINSTracer_BINARY_DIR} INSTALL_DIR ${BRAINSTracer_BINARY_DIR} UPDATE_COMMAND ) if(APPLE) set(SHARED_LIB_EXT .dylib) else(APPLE) set(SHARED_LIB_EXT .so) endif(APPLE) ExternalProject_Add_Step(${proj} after_install COMMAND chmod u+w ${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5${SHARED_LIB_EXT} COMMAND cmake -E remove ${BRAINSTracer_BINARY_DIR}/bin/tclsh8.5 COMMENT -- ${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5 installed read-only! DEPENDEES mkdir update patch download configure build install ) On Tue, Apr 27, 2010 at 10:03 AM, David Cole david.c...@kitware.com wrote: On Fri, Apr 23, 2010 at 1:11 PM, Luigi Calori l.cal...@cineca.it wrote: There is some info at http://www.kitware.com/products/archive/kitware_quarterly1009.pdf based on that I thought it was enouth do depend upon just the install in your case... Luigi is correct: it should be sufficient to list DEPENDEES install in your case. Kent, why do you think you have to list all the steps as DEPENDEES? ___ 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