Re: [CMake] ExternalProject() Question
On 16. Dec, 2009, at 20:35 , Michael Jackson wrote: I am intrigued by the ExternalProject feature of CMake 2.8. One question that I have after reading through the Oct 09 Kitware Source is this. If I do a make clean or rebuild are all the ExternalProjects also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was? One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user. Thanks for any comments _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio make clean behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a clean on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist... 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] Acces macro/functions to subfolders
On Wed, 2009-12-16 at 09:28 -0800, Tyler Roscoe wrote: On Wed, Dec 16, 2009 at 05:55:54PM +0100, Olivier Pierard wrote: In order to be able to use a macro/function from several sub-folders, I would like to define it only once in the main CMakeLists.txt. However, after some basic tests, It seems impossible to call this macro/function from subfolders. Is is possible to do it ? It works for me. By the way, what's the basic difference between macro/function in cmake ? Related to preprocessing like in C/C++ ? What's the advantage of distinguish them here ? The details are in the docs, though you have to read carefully to notice. I think the biggest difference is that the contents of a macro are dropped in, as though with #define. Functions are an actual function call and functions have their own scope. tyler Another important difference is that, for functions, ARGV and ARGN and ARGVn (n=1..) are real variables that have local scope. Best regards, Marcel Loose. ___ 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] qt .qrc file modifications require two builds
Clinton Stimpson wrote: If I specify the input (path to test.h.in) output (path to generated test.h) for the CMake Rules build phase, the problem goes away. Maybe we can put all inputs and all outputs in there for generated files in that project? The script (makefile) it calls already has the smarts for which ones really need updating. I once investigated doing this but never finished. I think it requires a graph algorithm to split rules into maximal groups such that each group has inputs and outputs that are disjoint. Each group gets one Run Script build phase. Or is there a reason we can't just add a build phase for each add_custom_command() ? Possibly too much clutter? One could try that. I don't know how well build phases scale. There is also the issue that build phases are not per-configuration, so the scripts would have to test $(CONFIGURATION). Currently this is done by using $(CONFIGURATION) to select which Makefile rule to drive. Somewhere I have a patch series that I started last time I investigated this problem. If anyone wants to volunteer to work on it I can send my current patches (they probably don't apply to CVS HEAD now though). IIRC the patches factor out some of the VS IDE custom script code for re-use with Xcode. -Brad ___ 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] Submitting build and test results to dashboard separately
This sounds like we need to change ctest such that you can do a submit in an already ctest_start()-ed tree without getting the error. Your first instinct, to try leaving off the ctest_start() in the 2nd script sounds completely reasonable to me. If you are running multiple scripts sequentially, there's no good reason I can think of that the 2nd and later scripts can't reuse the TAG from the first ctest_start call. Can you submit a bug to the bug tracker requesting this ability...? Thanks, David On Thu, Dec 17, 2009 at 8:37 AM, Moreland, Kenneth kmo...@sandia.govwrote: No. That does not help. I still get two entries on the dashboard. Is there anything else I can do? -Ken On 12/16/09 2:38 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Wednesday 16 December 2009, Moreland, Kenneth wrote: I am setting up a ParaView dashboard for a cluster in which I have to compile on one computer and then submit a job to run parallel tests on another computer. This means I have to run one dashboard script to update and build the code. At the end of this script I submit a parallel job to run the tests. The problem I am having is that I cannot seem to submit the results to the dashboard in such a way that I get both the build and test information on the same entry. My current configuration is as follows. To update, configure, and build the latest version I have a CTest script like the following: -Setup CMake variables- ... I am sure that the CMake variables are setup the same in both the build and test scripts; I am actually using the same script to setup both. Now here is the problem: each of the CTEST_SUBMIT() create their own entry in the dashboard. The first one creates one that reports on the build but is missing the test information. The second one has the results of the test but has bogus information for the build. Does anyone know how to get the the second submit to simply add the test information to the existing build information? I tried simply removing the CTEST_START command from the test script, but in that case the submission fails outright. I get output like the following: Test project /home/kmorel/dashboard/builds/ParaView3Experimental Cannot create directory /Testing/Temporary Cannot create log file: LastTest.log Start 1: QVTK-TestQtInitialization 1/1 Test #1: QVTK-TestQtInitialization Passed9.38 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 11.53 sec Cannot create directory /Testing Cannot open notes file Use HTTP Proxy: wwwproxy.sandia.gov:80 Cannot create directory /Testing/Temporary Cannot create log file: LastSubmit.log Submit files (using http) Using HTTP submit method Drop site:http:// Submission successful Error in read script: /home/kmorel/dashboard/scripts/ParaView3Experimental.cmake Any ideas? Does CTEST_SUBMIT(PARTS ... ) what you want ? It's here under CDash Subprojects : http://www.kitware.com/products/archive/kitware_quarterly0709.pdf 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 Kenneth Moreland *** Sandia National Laboratories *** *** *** *** email: kmo...@sandia.gov ** *** ** phone: (505) 844-8919 *** web: http://www.cs.unm.edu/~kmorel ___ 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] ExternalProject() Question
On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild them...@gmail.com wrote: On 16. Dec, 2009, at 20:35 , Michael Jackson wrote: I am intrigued by the ExternalProject feature of CMake 2.8. One question that I have after reading through the Oct 09 Kitware Source is this. If I do a make clean or rebuild are all the ExternalProjects also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was? One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user. Thanks for any comments _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio make clean behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a clean on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist... Michael Wild's observations are correct. The make clean of the outer project is going to wipe all the stamp files causing all of the steps to re-run again, including downloads and checkouts. Since the patch command is empty by default and 'patch' is not readily available on Windows, the patching stuff is less well tested than the rest of the steps. I guess I would be inclined to say that an outer/main-project make clean ought to default to cleaning the inner/nested/external projects as well... but it's not clear to me that there's a reasonable way to implement that quickly and easily. It's certainly worthy of a feature request and some discussion. And whatever the default behavior is, it should probably be controllable by one or more new arguments to the ExternalProject_Add function. Let me know if you have further ideas and suggestions. Thanks, David Cole ___ 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] Submitting build and test results to dashboard separately
Done. Thanks. http://www.paraview.org/Bug/view.php?id=10060 -Ken On 12/17/09 6:49 AM, David Cole david.c...@kitware.com wrote: This sounds like we need to change ctest such that you can do a submit in an already ctest_start()-ed tree without getting the error. Your first instinct, to try leaving off the ctest_start() in the 2nd script sounds completely reasonable to me. If you are running multiple scripts sequentially, there's no good reason I can think of that the 2nd and later scripts can't reuse the TAG from the first ctest_start call. Can you submit a bug to the bug tracker requesting this ability...? Thanks, David On Thu, Dec 17, 2009 at 8:37 AM, Moreland, Kenneth kmo...@sandia.gov wrote: No. That does not help. I still get two entries on the dashboard. Is there anything else I can do? -Ken On 12/16/09 2:38 PM, Alexander Neundorf a.neundorf-w...@gmx.net http://a.neundorf-w...@gmx.net wrote: On Wednesday 16 December 2009, Moreland, Kenneth wrote: I am setting up a ParaView dashboard for a cluster in which I have to compile on one computer and then submit a job to run parallel tests on another computer. This means I have to run one dashboard script to update and build the code. At the end of this script I submit a parallel job to run the tests. The problem I am having is that I cannot seem to submit the results to the dashboard in such a way that I get both the build and test information on the same entry. My current configuration is as follows. To update, configure, and build the latest version I have a CTest script like the following: -Setup CMake variables- ... I am sure that the CMake variables are setup the same in both the build and test scripts; I am actually using the same script to setup both. Now here is the problem: each of the CTEST_SUBMIT() create their own entry in the dashboard. The first one creates one that reports on the build but is missing the test information. The second one has the results of the test but has bogus information for the build. Does anyone know how to get the the second submit to simply add the test information to the existing build information? I tried simply removing the CTEST_START command from the test script, but in that case the submission fails outright. I get output like the following: Test project /home/kmorel/dashboard/builds/ParaView3Experimental Cannot create directory /Testing/Temporary Cannot create log file: LastTest.log Start 1: QVTK-TestQtInitialization 1/1 Test #1: QVTK-TestQtInitialization Passed9.38 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 11.53 sec Cannot create directory /Testing Cannot open notes file Use HTTP Proxy: wwwproxy.sandia.gov:80 http://wwwproxy.sandia.gov:80 Cannot create directory /Testing/Temporary Cannot create log file: LastSubmit.log Submit files (using http) Using HTTP submit method Drop site:http:// Submission successful Error in read script: /home/kmorel/dashboard/scripts/ParaView3Experimental.cmake Any ideas? Does CTEST_SUBMIT(PARTS ... ) what you want ? It's here under CDash Subprojects : http://www.kitware.com/products/archive/kitware_quarterly0709.pdf Alex ___ Powered by www.kitware.com http://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 Kenneth Moreland *** Sandia National Laboratories *** *** *** *** email: kmo...@sandia.gov http://kmo...@sandia.gov ** *** ** phone: (505) 844-8919 *** web: http://www.cs.unm.edu/~kmorel ___ Powered by www.kitware.com http://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 Kenneth Moreland *** Sandia National Laboratories *** *** *** *** email: kmo...@sandia.gov ** *** ** phone: (505) 844-8919 *** web: http://www.cs.unm.edu/~kmorel ___ 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] Autotools conversion: case statement
Hello, I've an autotools script to convert to cmake. It has a lot of long case statement. Any tips to easily convert this statement? Here an example: case $THREADS in no | none | single) THREADS=none ;; posix | pthreads) THREADS=posix THREADDLLIBS=-lpthread case $host in x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); ;; *-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) ;; *-*-aix*) AC_DEFINE(GC_AIX_THREADS) AC_DEFINE(_REENTRANT) ;; *-*-hpux11*) AC_MSG_WARN(Only HP/UX 11 POSIX threads are supported.) AC_DEFINE(GC_HPUX_THREADS) AC_DEFINE(_POSIX_C_SOURCE,199506L) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); THREADDLLIBS=-lpthread -lrt # HPUX needs REENTRANT for the _r calls. AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.]) ;; *-*-hpux10*) AC_MSG_WARN(Only HP-UX 11 POSIX threads are supported.) ;; *-*-openbsd*) AC_DEFINE(GC_OPENBSD_THREADS) THREADDLLIBS=-pthread INCLUDES=$INCLUDES -pthread openbsd_threads=true ;; *-*-freebsd*) AC_MSG_WARN(FreeBSD does not yet fully support threads with Boehm GC.) AC_DEFINE(GC_FREEBSD_THREADS) INCLUDES=$INCLUDES -pthread ;; *-*-kfreebsd*-gnu) AC_DEFINE(GC_FREEBSD_THREADS) INCLUDES=$INCLUDES -pthread THREADDLLIBS=-pthread AC_DEFINE(_REENTRANT) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_DEFINE(USE_COMPILER_TLS) ;; *-*-gnu*) AC_DEFINE(GC_GNU_THREADS) AC_DEFINE(_REENTRANT) AC_DEFINE(THREAD_LOCAL_ALLOC) ;; *-*-netbsd*) AC_MSG_WARN(Only on NetBSD 2.0 or later.) AC_DEFINE(GC_NETBSD_THREADS) AC_DEFINE(_REENTRANT) AC_DEFINE(_PTHREADS) THREADDLLIBS=-lpthread -lrt ;; *-*-solaris*) AC_DEFINE(GC_SOLARIS_THREADS) AC_DEFINE(THREAD_LOCAL_ALLOC) THREADDLLIBS=-lpthread -lrt if test $GCC != yes; then CFLAGS=$CFLAGS -O need_atomic_ops_asm=true fi ;; *-*-irix*) AC_DEFINE(GC_IRIX_THREADS) ;; *-*-cygwin*) AC_DEFINE(GC_THREADS) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) # Cygwin doesn't have a real libpthread, so Libtool can't link # against it. THREADDLLIBS= win32_threads=true ;; *-*-darwin*) AC_DEFINE(GC_DARWIN_THREADS) AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); # Parallel-mark is currently unreliable on Darwin; ignore request # if test ${enable_parallel_mark} = yes; then # AC_DEFINE(PARALLEL_MARK) # fi darwin_threads=true ;; *-*-osf*) AC_DEFINE(GC_OSF1_THREADS) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); # May want to enable it in other cases, too. # Measurements havent yet been done. fi INCLUDES=$INCLUDES -pthread THREADDLLIBS=-lpthread -lrt ;; *) AC_MSG_ERROR(Pthreads not supported by the GC on this platform.) ;; esac ;; win32) AC_DEFINE(GC_THREADS) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) AC_DEFINE(THREAD_LOCAL_ALLOC) fi win32_threads=true AC_DEFINE([EMPTY_GETENV_RESULTS], [1], [Wine getenv may not return NULL for missing entry.]) ;; dgux386) THREADS=dgux386 AC_MSG_RESULT($THREADDLLIBS) # Use pthread GCC switch THREADDLLIBS=-pthread if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); AC_DEFINE([GC_DGUX386_THREADS], 1, [Define to enable support for DB/UX threads on i386.]) AC_DEFINE([DGUX_THREADS], 1, [Define to enable support for DB/UX threads.]) # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread INCLUDES=-pthread $INCLUDES ;;
Re: [CMake] Autotools conversion: case statement
2009/12/17 Nicola Brisotto nicolabriso...@gmail.com: Hello, I've an autotools script to convert to cmake. It has a lot of long case statement. Any tips to easily convert this statement? Here an example: case $THREADS in I would try a set of if(string MATCHES regex) endif(string MATCHES regex) see cmake --help-command if -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Autotools conversion: case statement
For this particular use, doesn't the FindThreads package do this for you? -Ken On 12/17/09 7:43 AM, Nicola Brisotto nicolabriso...@gmail.com wrote: Hello, I've an autotools script to convert to cmake. It has a lot of long case statement. Any tips to easily convert this statement? Here an example: case $THREADS in no | none | single) THREADS=none ;; posix | pthreads) THREADS=posix THREADDLLIBS=-lpthread case $host in x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); ;; *-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) ;; *-*-aix*) AC_DEFINE(GC_AIX_THREADS) AC_DEFINE(_REENTRANT) ;; *-*-hpux11*) AC_MSG_WARN(Only HP/UX 11 POSIX threads are supported.) AC_DEFINE(GC_HPUX_THREADS) AC_DEFINE(_POSIX_C_SOURCE,199506L) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); THREADDLLIBS=-lpthread -lrt # HPUX needs REENTRANT for the _r calls. AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.]) ;; *-*-hpux10*) AC_MSG_WARN(Only HP-UX 11 POSIX threads are supported.) ;; *-*-openbsd*) AC_DEFINE(GC_OPENBSD_THREADS) THREADDLLIBS=-pthread INCLUDES=$INCLUDES -pthread openbsd_threads=true ;; *-*-freebsd*) AC_MSG_WARN(FreeBSD does not yet fully support threads with Boehm GC.) AC_DEFINE(GC_FREEBSD_THREADS) INCLUDES=$INCLUDES -pthread ;; *-*-kfreebsd*-gnu) AC_DEFINE(GC_FREEBSD_THREADS) INCLUDES=$INCLUDES -pthread THREADDLLIBS=-pthread AC_DEFINE(_REENTRANT) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_DEFINE(USE_COMPILER_TLS) ;; *-*-gnu*) AC_DEFINE(GC_GNU_THREADS) AC_DEFINE(_REENTRANT) AC_DEFINE(THREAD_LOCAL_ALLOC) ;; *-*-netbsd*) AC_MSG_WARN(Only on NetBSD 2.0 or later.) AC_DEFINE(GC_NETBSD_THREADS) AC_DEFINE(_REENTRANT) AC_DEFINE(_PTHREADS) THREADDLLIBS=-lpthread -lrt ;; *-*-solaris*) AC_DEFINE(GC_SOLARIS_THREADS) AC_DEFINE(THREAD_LOCAL_ALLOC) THREADDLLIBS=-lpthread -lrt if test $GCC != yes; then CFLAGS=$CFLAGS -O need_atomic_ops_asm=true fi ;; *-*-irix*) AC_DEFINE(GC_IRIX_THREADS) ;; *-*-cygwin*) AC_DEFINE(GC_THREADS) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) # Cygwin doesn't have a real libpthread, so Libtool can't link # against it. THREADDLLIBS= win32_threads=true ;; *-*-darwin*) AC_DEFINE(GC_DARWIN_THREADS) AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); # Parallel-mark is currently unreliable on Darwin; ignore request # if test ${enable_parallel_mark} = yes; then # AC_DEFINE(PARALLEL_MARK) # fi darwin_threads=true ;; *-*-osf*) AC_DEFINE(GC_OSF1_THREADS) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); # May want to enable it in other cases, too. # Measurements havent yet been done. fi INCLUDES=$INCLUDES -pthread THREADDLLIBS=-lpthread -lrt ;; *) AC_MSG_ERROR(Pthreads not supported by the GC on this platform.) ;; esac ;; win32) AC_DEFINE(GC_THREADS) if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) AC_DEFINE(THREAD_LOCAL_ALLOC) fi win32_threads=true AC_DEFINE([EMPTY_GETENV_RESULTS], [1], [Wine getenv may not return NULL for missing entry.]) ;; dgux386) THREADS=dgux386 AC_MSG_RESULT($THREADDLLIBS) # Use pthread GCC switch THREADDLLIBS=-pthread if test ${enable_parallel_mark} = yes; then AC_DEFINE(PARALLEL_MARK) fi AC_DEFINE(THREAD_LOCAL_ALLOC) AC_MSG_WARN(Explicit GC_INIT() calls may be required.); AC_DEFINE([GC_DGUX386_THREADS], 1, [Define to enable support for DB/UX threads on i386.]) AC_DEFINE([DGUX_THREADS], 1, [Define to enable support for DB/UX threads.]) # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread INCLUDES=-pthread $INCLUDES ;; aix) THREADS=posix THREADDLLIBS=-lpthread AC_DEFINE(GC_AIX_THREADS) AC_DEFINE(_REENTRANT) ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) AC_MSG_ERROR(thread package $THREADS not yet supported) ;; *) AC_MSG_ERROR($THREADS is an unknown thread package) ;; esac Nicola Brisotto vcard http://www.breezit.net/vcards/NicolaBrisotto.vcf Kenneth Moreland *** Sandia National Laboratories *** *** *** *** email: kmo...@sandia.gov ** *** ** phone: (505) 844-8919 ***
Re: [CMake] ExternalProject() Question
On 17. Dec, 2009, at 15:01 , David Cole wrote: On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild them...@gmail.com wrote: On 16. Dec, 2009, at 20:35 , Michael Jackson wrote: I am intrigued by the ExternalProject feature of CMake 2.8. One question that I have after reading through the Oct 09 Kitware Source is this. If I do a make clean or rebuild are all the ExternalProjects also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was? One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user. Thanks for any comments _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio make clean behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a clean on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist... Michael Wild's observations are correct. The make clean of the outer project is going to wipe all the stamp files causing all of the steps to re-run again, including downloads and checkouts. Since the patch command is empty by default and 'patch' is not readily available on Windows, the patching stuff is less well tested than the rest of the steps. I guess I would be inclined to say that an outer/main-project make clean ought to default to cleaning the inner/nested/external projects as well... but it's not clear to me that there's a reasonable way to implement that quickly and easily. It's certainly worthy of a feature request and some discussion. And whatever the default behavior is, it should probably be controllable by one or more new arguments to the ExternalProject_Add function. Let me know if you have further ideas and suggestions. Thanks, David Cole Also, should a make clean really trigger a re-download? What I would like to have is a MD5SUM option to ExternalProject_Add. Currently I'm implementing this manually with a custom sub-step, but there's no reason it shouldn't be in CMake, because it natively implements -E md5sum. Michael ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] add_test with large input files
Dear all, Once again, I need your precious help ! I'm trying to convert my test suite to one suitable for CMake/CTest. My executable for the tests is the major target of the CMake project. Running a testcase requires an input file, which is always 'input.dat', each one stored in a different subfolder. These input.dat files contain relative paths to other files (e.g.: a Finite Element mesh; that's why I don't want to copy these files). So I adopted the following structure: / - Project Root - Src - Validations/Test1 - build /Instead of: /- Project Root - Src - Src/Validations/Test1 - build/ I expected to use as working directory the Validations/Test1 folder (so that I keep the Src folder clean) so that input files and dependent files could be found. But, of course, it's running in the build/Validations folder. How could I manage this ? Is there a way to define the working directory for tests ? An ugly solution could be the creation of symbolic links but I cannot imagine this is the right way to deal with input files; and I'm not sure it's portable on Windows. Thank you very much for your help !!! -- Olivier Pierard CENAERO, Virtual Manufacturing Group Bâtiment EOLE, 1er étage Rue des Frères Wright, 29 B-6041 Gosselies BELGIUM Tel: +32.(0)71.919374 Fax: +32.(0)71.919370 http://www.cenaero.be/ +-+-+- Disclaimer +-+-+- http://www.cenaero.be/disclaimer ___ 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() Question
On Thu, Dec 17, 2009 at 10:53 AM, Michael Wild them...@gmail.com wrote: On 17. Dec, 2009, at 15:01 , David Cole wrote: On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild them...@gmail.com wrote: On 16. Dec, 2009, at 20:35 , Michael Jackson wrote: I am intrigued by the ExternalProject feature of CMake 2.8. One question that I have after reading through the Oct 09 Kitware Source is this. If I do a make clean or rebuild are all the ExternalProjects also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was? One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user. Thanks for any comments _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio make clean behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a clean on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist... Michael Wild's observations are correct. The make clean of the outer project is going to wipe all the stamp files causing all of the steps to re-run again, including downloads and checkouts. Since the patch command is empty by default and 'patch' is not readily available on Windows, the patching stuff is less well tested than the rest of the steps. I guess I would be inclined to say that an outer/main-project make clean ought to default to cleaning the inner/nested/external projects as well... but it's not clear to me that there's a reasonable way to implement that quickly and easily. It's certainly worthy of a feature request and some discussion. And whatever the default behavior is, it should probably be controllable by one or more new arguments to the ExternalProject_Add function. Let me know if you have further ideas and suggestions. Thanks, David Cole Also, should a make clean really trigger a re-download? What I would like to have is a MD5SUM option to ExternalProject_Add. Currently I'm implementing this manually with a custom sub-step, but there's no reason it shouldn't be in CMake, because it natively implements -E md5sum. The MD5SUM option is a good idea that we have considered. I'm almost certain md5 (or something like it) will appear in a future implementation of ExternalProject_Add. Ideally, I think make clean should destroy all created build products. And in the case of ExternalProject_Add, the downloaded source is a build product. I understand why you would not want to re-download the source... You could put a *.tar.gz in your source tree and reference it directly there. You might not want to do that, either, though. Thanks for the discussion. ___ 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() Question
On 17. Dec, 2009, at 17:34 , David Cole wrote: On Thu, Dec 17, 2009 at 10:53 AM, Michael Wild them...@gmail.com wrote: On 17. Dec, 2009, at 15:01 , David Cole wrote: On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild them...@gmail.com wrote: On 16. Dec, 2009, at 20:35 , Michael Jackson wrote: I am intrigued by the ExternalProject feature of CMake 2.8. One question that I have after reading through the Oct 09 Kitware Source is this. If I do a make clean or rebuild are all the ExternalProjects also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was? One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user. Thanks for any comments _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio make clean behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a clean on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist... Michael Wild's observations are correct. The make clean of the outer project is going to wipe all the stamp files causing all of the steps to re-run again, including downloads and checkouts. Since the patch command is empty by default and 'patch' is not readily available on Windows, the patching stuff is less well tested than the rest of the steps. I guess I would be inclined to say that an outer/main-project make clean ought to default to cleaning the inner/nested/external projects as well... but it's not clear to me that there's a reasonable way to implement that quickly and easily. It's certainly worthy of a feature request and some discussion. And whatever the default behavior is, it should probably be controllable by one or more new arguments to the ExternalProject_Add function. Let me know if you have further ideas and suggestions. Thanks, David Cole Also, should a make clean really trigger a re-download? What I would like to have is a MD5SUM option to ExternalProject_Add. Currently I'm implementing this manually with a custom sub-step, but there's no reason it shouldn't be in CMake, because it natively implements -E md5sum. The MD5SUM option is a good idea that we have considered. I'm almost certain md5 (or something like it) will appear in a future implementation of ExternalProject_Add. Ideally, I think make clean should destroy all created build products. And in the case of ExternalProject_Add, the downloaded source is a build product. I understand why you would not want to re-download the source... You could put a *.tar.gz in your source tree and reference it directly there. You might not want to do that, either, though. Thanks for the discussion. Currently I'm checking whether it is in the source tree and the MD5 matches, and otherwise I download it. Speaking of the MD5 sum, it would be nice if it would be possible to do something like this: if(${filename} MD5SUM_EQUAL ${md5sum}) in the CMake code, because using execute_process every time and then parsing the output is a bit tedious. 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] ExternalProject() Question
On Dec 17, 2009, at 11:34 AM, David Cole wrote: On Thu, Dec 17, 2009 at 10:53 AM, Michael Wild them...@gmail.com wrote: On 17. Dec, 2009, at 15:01 , David Cole wrote: On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild them...@gmail.com wrote: On 16. Dec, 2009, at 20:35 , Michael Jackson wrote: I am intrigued by the ExternalProject feature of CMake 2.8. One question that I have after reading through the Oct 09 Kitware Source is this. If I do a make clean or rebuild are all the ExternalProjects also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was? One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user. Thanks for any comments _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio make clean behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a clean on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist... Michael Wild's observations are correct. The make clean of the outer project is going to wipe all the stamp files causing all of the steps to re-run again, including downloads and checkouts. Since the patch command is empty by default and 'patch' is not readily available on Windows, the patching stuff is less well tested than the rest of the steps. I guess I would be inclined to say that an outer/main-project make clean ought to default to cleaning the inner/nested/external projects as well... but it's not clear to me that there's a reasonable way to implement that quickly and easily. It's certainly worthy of a feature request and some discussion. And whatever the default behavior is, it should probably be controllable by one or more new arguments to the ExternalProject_Add function. Let me know if you have further ideas and suggestions. Thanks, David Cole Also, should a make clean really trigger a re-download? What I would like to have is a MD5SUM option to ExternalProject_Add. Currently I'm implementing this manually with a custom sub-step, but there's no reason it shouldn't be in CMake, because it natively implements -E md5sum. The MD5SUM option is a good idea that we have considered. I'm almost certain md5 (or something like it) will appear in a future implementation of ExternalProject_Add. Ideally, I think make clean should destroy all created build products. And in the case of ExternalProject_Add, the downloaded source is a build product. I understand why you would not want to re-download the source... You could put a *.tar.gz in your source tree and reference it directly there. You might not want to do that, either, though. Thanks for the discussion. My thinking was this would be something like a package or port type call. I am describing in my CMakeLists.txt that my project needs tiff and to download it and compile it first before proceeding with the compile of my own project. In this case I am not really working on tiff, it is stable, so there is no point in recompiling it again. But there are cases where someone may be working on libTiff in conjunction with their project and would therefor need it cleaned/Recompiled. I guess you would get to the point where each step has a YES/NO property for each type of build action. Do you want source code cleaned? Do you want source code downloaded? ... Maybe I should just take the other road and bundle my versions of Tiff, Expat, HDF5, Boost inside of my project. Then it is one giant self contained project which for the end user is easy to compile. One Download, Once configure/compile. But when _I_ am working on it, every time I clean my project I have to rebuild EVERYTHING. Which sucks on slower computers. ParaView is this way and you really have to think twice before hitting that clean or rebuild button. Just saying.. Mike Jackson ___ 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] Ctest svn update always shows same old/new revision number (Windows)
I've noticed this for a while on Windows XP, but now it's suddenly a real issue for me because I'm using CTest to run a continuous build script. It's only supposed to build if the repository has changed numbers. On Windows XP, every time I use the Ctest CTEST_UPDATE() function, the old revision and new revision numbers are identical. If the repo is 5213 and I update files, the next time I run ctest_update is says old/new are both 5214. It loses the old number and both numbers are the new revision. Since they're the same, the build never runs because it thinks no files have changed. Anyone else seen this? -- Shane Dixon Linux Engineer Atmel Corporation ___ 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] third party library dependencies
Is there an easy way to setup link dependencies between libraries not build using cmake? Lets say I have a system library A which depends on system library B. I then make an executable that uses code from A. I need to link against A and B, but as a user of just library A, I don't want to worry about that. Does cmake have a facility to define such a hierarchy/dependency chain so that I can just do target_link_libraries(target A) and have it figure out that it needs to link against B as well? Note that neither A nor B are built using cmake, they already exist. ~Roman ___ 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] modify RUN_TESTS project
Hi, Is there a way to modify the arguments to ctest for the RUN_TESTS project? I was wondering if I could set a -j flag among others I might want to set. Clint ___ 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] No Color Output With cmake --build in CMake 2.8
Hello, When I use the Unix Makefile generator (or the NMake Makefile generator under Windows), running cmake --build bindir does not produce color output, whereas cd bindir make does. Is there a reason for this, or have I stumbled upon a bug? Best, Eskandar -- Eskandar Ensafi Space Computer Corporation 12121 Wilshire Boulevard, Suite 910 Los Angeles, California 90025 (310) 481-6000 ___ 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] modify RUN_TESTS project
Not currently... The args for ctest are set up in the file CMake/Source/cmGlobalGenerator.cxx. (Search for GetTestTargetName.) It would be cool to extend this, but we'd have to think about what's the best way to do it and then actually do it. For now, as an easy workaround, you could do your own RUN_TESTS_IN_PARALLEL as an add_custom_target sort of thing. HTH, David On Thu, Dec 17, 2009 at 12:30 PM, Clinton Stimpson clin...@elemtech.comwrote: Hi, Is there a way to modify the arguments to ctest for the RUN_TESTS project? I was wondering if I could set a -j flag among others I might want to set. Clint ___ 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] No Color Output With cmake --build in CMake 2.8
Eskandar Ensafi wrote: When I use the Unix Makefile generator (or the NMake Makefile generator under Windows), running “cmake --build bindir” does not produce color output, whereas “cd bindir make” does. Is there a reason for this, or have I stumbled upon a bug? The color output auto-detects whether it is attached to an interactive terminal (tty). If not, it does not print the escapes. When cmake runs the make command through --build, it hands the process a new pipe and not its own stdout (which might be a tty). The --build option is meant for scripts to drive builds and log output to a file, so no color is desired. I would consider interactive use of --build to be a feature request. Its implementation re-uses some of the automated build command invocation used by CTest's ctest_build command. Adding a pass-thru to the outer process's pipe is somewhat tricky. -Brad ___ 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 cmake to install dlls into windows/system32
This seems to work, although I don't think it's the ideal solution: CMakeLists.txt install (FILES drivers/driver.dll DESTINATION sysdir/) set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS CopyFiles \\\$INSTDIRsysdirdriver.dll\\\ \\\$SYSDIR\\\ ) This gets the dll into the windows system directory, but there are still some issues I'm sorting through: Versioning of the dll: what if the file was already there and there is already a newer version? How to uninstall only if nothing else is using the dll. It appears that nsis has some helper functions: UpgradeDLL, AddSharedDLL, but I'm not sure yet how to include/call them through CMakeLists.txt. Does anyone have any insight? Thanks! -James From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of James Zipperer Sent: Wednesday, December 16, 2009 4:44 PM To: David Cole; CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 They're device driver dlls for use system-wide. -James From: David Cole [mailto:david.c...@kitware.com] Sent: Wednesday, December 16, 2009 4:34 PM To: James Zipperer Cc: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 What's the reason they need to be there? On Wed, Dec 16, 2009 at 7:18 PM, James Zipperer james.zippe...@modsystems.commailto:james.zippe...@modsystems.com wrote: Yes, unfortunately they need to be there. -James From: David Cole [mailto:david.c...@kitware.commailto:david.c...@kitware.com] Sent: Wednesday, December 16, 2009 4:15 PM To: James Zipperer Cc: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 You should avoid this if at all possible. Install dlls next to your program, not in the system32 directory. Do you have a reason you need to install a dll there? On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer james.zippe...@modsystems.commailto:james.zippe...@modsystems.com wrote: Does anyone have an example of how to install dlls into %WINDIR%/system32 using cmake/ cpack/nsis? Thanks! -James This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. ___ Powered by www.kitware.comhttp://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 This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the 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
Re: [CMake] using cmake to install dlls into windows/system32
Is there a way to add an NSIS macro or override the NSIS template or something to allow inclusion of the UpgradeDLL macro? With that functionality I think I could achieve my goal. Thanks! -James From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of James Zipperer Sent: Thursday, December 17, 2009 2:44 PM To: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 This seems to work, although I don't think it's the ideal solution: CMakeLists.txt install (FILES drivers/driver.dll DESTINATION sysdir/) set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS CopyFiles \\\$INSTDIRsysdirdriver.dll\\\ \\\$SYSDIR\\\ ) This gets the dll into the windows system directory, but there are still some issues I'm sorting through: Versioning of the dll: what if the file was already there and there is already a newer version? How to uninstall only if nothing else is using the dll. It appears that nsis has some helper functions: UpgradeDLL, AddSharedDLL, but I'm not sure yet how to include/call them through CMakeLists.txt. Does anyone have any insight? Thanks! -James From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of James Zipperer Sent: Wednesday, December 16, 2009 4:44 PM To: David Cole; CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 They're device driver dlls for use system-wide. -James From: David Cole [mailto:david.c...@kitware.com] Sent: Wednesday, December 16, 2009 4:34 PM To: James Zipperer Cc: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 What's the reason they need to be there? On Wed, Dec 16, 2009 at 7:18 PM, James Zipperer james.zippe...@modsystems.commailto:james.zippe...@modsystems.com wrote: Yes, unfortunately they need to be there. -James From: David Cole [mailto:david.c...@kitware.commailto:david.c...@kitware.com] Sent: Wednesday, December 16, 2009 4:15 PM To: James Zipperer Cc: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 You should avoid this if at all possible. Install dlls next to your program, not in the system32 directory. Do you have a reason you need to install a dll there? On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer james.zippe...@modsystems.commailto:james.zippe...@modsystems.com wrote: Does anyone have an example of how to install dlls into %WINDIR%/system32 using cmake/ cpack/nsis? Thanks! -James This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. ___ Powered by www.kitware.comhttp://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 This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. ___ Powered by www.kitware.com Visit other Kitware
[CMake] Order of operations in CMakeLists.txt file?
I'm confused about the following documentation. The CMake FAQ section How do I use a different compiler? states: Set the appropriate CMAKE_FOO_COMPILER variable(s) to a valid compiler name or full path in a list file using set(). This must be done before any language is set (ie before any project() or enable_language() command). I want to conditionally choose the compiler based on platform. My CMakeList.txt contains code similar to the following: cmake_minimum_required (VERSION 2.6) if (CMAKE_SYSTEM_NAME STREQUAL Platform1) set (CMAKE_C_COMPILER cc1) set (CMAKE_C_FLAGS -XYZ1) elseif (CMAKE_SYSTEM_NAME STREQUAL platform2) set (CMAKE_C_COMPILER cc2) set (CMAKE_C_FLAGS -XYZ2) endif() project(test) ... However, before project() is called, the CMAKE_SYSTEM_NAME appears undefined. When is CMAKE_SYSTEM_NAME defined? Is another option available to switch on the system before project() is invoked? Thanks. ___ 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 cmake to install dlls into windows/system32
After a lot of trial and error and some rtfm work, I figured out a way to do it. The UpgradeDLL macro I mentioned below appears to be out of date and the preferred method is now InstallLib. It appears to handle DLL versioning and usage counting. Note: I could be wrong, I've been at this problem for about a day now. Here's the hack solution I came up with: 1. Modify NSIS.template.in to include Library.nsh: !include Library.nsh 2. Do the following in CMakeLists.txt: install (FILES driver.dll DESTINATION sysdir/) #lots of string escaping, bleccch. NSIS uses the same ${xxx} variable syntax as cmake #note: this is a hack since INST_DIR is a !define inside NSIS.template.in that gets set to CPACK_TEMPORARY_DIRECTORY set (tmp_nsis_inst_dir \\\${INST_DIR}) set (tmp_nsis_localdll \\\${localdll}) set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS !define localdll \\\${tmp_nsis_inst_dir}sysdirdriver.dll\\\ !insertmacro InstallLib DLL NOTSHARED NOREBOOT_NOTPROTECTED \\\${tmp_nsis_localdll}\\\ \\\$SYSDIRdriver.dll\\\ \\\$SYSDIR\\\ !undef localdll ) If anyone could offer up a better solution, I'd greatly appreciate it. Hope this helps someone else out there in the wonderful world of cmake. -James From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of James Zipperer Sent: Thursday, December 17, 2009 4:00 PM To: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 Is there a way to add an NSIS macro or override the NSIS template or something to allow inclusion of the UpgradeDLL macro? With that functionality I think I could achieve my goal. Thanks! -James From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of James Zipperer Sent: Thursday, December 17, 2009 2:44 PM To: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 This seems to work, although I don't think it's the ideal solution: CMakeLists.txt install (FILES drivers/driver.dll DESTINATION sysdir/) set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS CopyFiles \\\$INSTDIRsysdirdriver.dll\\\ \\\$SYSDIR\\\ ) This gets the dll into the windows system directory, but there are still some issues I'm sorting through: Versioning of the dll: what if the file was already there and there is already a newer version? How to uninstall only if nothing else is using the dll. It appears that nsis has some helper functions: UpgradeDLL, AddSharedDLL, but I'm not sure yet how to include/call them through CMakeLists.txt. Does anyone have any insight? Thanks! -James From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of James Zipperer Sent: Wednesday, December 16, 2009 4:44 PM To: David Cole; CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 They're device driver dlls for use system-wide. -James From: David Cole [mailto:david.c...@kitware.com] Sent: Wednesday, December 16, 2009 4:34 PM To: James Zipperer Cc: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 What's the reason they need to be there? On Wed, Dec 16, 2009 at 7:18 PM, James Zipperer james.zippe...@modsystems.commailto:james.zippe...@modsystems.com wrote: Yes, unfortunately they need to be there. -James From: David Cole [mailto:david.c...@kitware.commailto:david.c...@kitware.com] Sent: Wednesday, December 16, 2009 4:15 PM To: James Zipperer Cc: CMake mailing list Subject: Re: [CMake] using cmake to install dlls into windows/system32 You should avoid this if at all possible. Install dlls next to your program, not in the system32 directory. Do you have a reason you need to install a dll there? On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer james.zippe...@modsystems.commailto:james.zippe...@modsystems.com wrote: Does anyone have an example of how to install dlls into %WINDIR%/system32 using cmake/ cpack/nsis? Thanks! -James This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message. ___ Powered by www.kitware.comhttp://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 This message contains information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you