[CMake] Installing Find*.cmake to the correct folder using NSIS configured by cmake on windows platform
Hi How can i tell the NSIS installer, using cmake, to install my Find*.cmake script to the ${CMAKE_ROOT}/Modules directory? Writing that to the install command doesn't work. I did try googling for anwsers for the better part of yesterday so if it can be found on the internet, please provide some assistance. -mika ___ 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] Installing Find*.cmake to the correct folder using NSIS configured by cmake on windows platform
2010/1/26 mika.raj...@patria.fi: Hi How can i tell the NSIS installer, using cmake, to install my Find*.cmake script to the ${CMAKE_ROOT}/Modules directory? Writing that to the install command doesn't work. You do not give us enough information about WHAT exactly did not work, example of CMakeLists.tx ... May be it does not work because you want to get the CMAKE_ROOT of the host were you install your package and not the one on which you are building the two may be different (location and/or cmake version). I think that you should: 1) Install you Find*.cmake as other files in your project using for example INSTALL(FILES FindMe.cmake DESTINATION share/module) 2) Execute install time scripts in order to: 2.a) discover the CMAKE_ROOT of the install host 2.b) copy the share/module/Find*.cmake files to ${CMAKE_ROOT}/Modules You can do that by either embedding an install([[SCRIPT file] [CODE code]] [...]) rules (see cmake doc for that) or change/modify the Modules/NSIS.template.in shipped wiith CMake in order to add you own NSIS code to do whatever you want using the NSIS install langage. I did try googling for anwsers for the better part of yesterday so if it can be found on the internet, please provide some assistance. Hopefully internet cannot always be as useful as human being :-) More seriously, either method should work. As a last hint discovering the value of CMAKE_ROOT at install time may be done using CMake itself (provided cmake is installed on the install host). for example: cmake -P showcmroot.cmake will show you the value (cmake script attached to this mail)/ -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org showcmroot.cmake Description: Binary data ___ 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] Installing Find*.cmake to the correct folder using NSIS configured by cmake on windows platform
On 26. Jan, 2010, at 9:02 , mika.raj...@patria.fi wrote: Hi How can i tell the NSIS installer, using cmake, to install my Find*.cmake script to the ${CMAKE_ROOT}/Modules directory? Writing that to the install command doesn't work. I did try googling for anwsers for the better part of yesterday so if it can be found on the internet, please provide some assistance. -mika You shouldn't do that! For your own project, don't write a FindXXX.cmake, but a XXXConfig.cmake or XXX-config.cmake (as described by the documentation of find_package). Also, refer to the same documentation to find out in which directories CMake tries to find such a file. In order to write such a XXXConfig.cmake file, you should also look into install(EXPORT ...). 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] Installing Find*.cmake to the correct folder using NSIS configured by cmake on windows platform
2010/1/26 Michael Wild them...@gmail.com: On 26. Jan, 2010, at 9:02 , mika.raj...@patria.fi wrote: Hi How can i tell the NSIS installer, using cmake, to install my Find*.cmake script to the ${CMAKE_ROOT}/Modules directory? Writing that to the install command doesn't work. I did try googling for anwsers for the better part of yesterday so if it can be found on the internet, please provide some assistance. -mika You shouldn't do that! For your own project, don't write a FindXXX.cmake, but a XXXConfig.cmake or XXX-config.cmake (as described by the documentation of find_package). Also, refer to the same documentation to find out in which directories CMake tries to find such a file. In order to write such a XXXConfig.cmake file, you should also look into install(EXPORT ...). Michael is right and I should have tell you that too, May be installing your FindXXX.cmake is not the good way to go at all. see reference on Config.cmake there http://www.cmake.org/pipermail/cmake/2010-January/034778.html -- 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] Patch for FindSubversion: fixes documentation and sets missing variable
Hi all, Here's a small patch that fixes two errors in the current FindSubversion.cmake file. 1) The variable var-prefix_WC_ROOT was documented, but not set. This has been fixed. 2) The documentation doesn't mention the existence of a second macro Subversion_WC_LOG, and erroneously mentions that Subversion_WC_INFO sets the variable var-prefix_WC_LAST_CHANGED_LOG. This variable is called var-prefix_LAST_CHANGED_LOG and is set by Subversion_WC_LOG. Index: FindSubversion.cmake === RCS file: /cvsroot/CMake/CMake/Modules/FindSubversion.cmake,v retrieving revision 1.5 diff -u -r1.5 FindSubversion.cmake --- FindSubversion.cmake28 Sep 2009 15:45:46 - 1.5 +++ FindSubversion.cmake26 Jan 2010 09:06:31 - @@ -3,18 +3,21 @@ # Subversion_SVN_EXECUTABLE - path to svn command line client # Subversion_VERSION_SVN - version of svn command line client # Subversion_FOUND - true if the command line client was found -# If the command line client executable is found the macro +# If the command line client executable is found two macros are defined: # Subversion_WC_INFO(dir var-prefix) -# is defined to extract information of a subversion working copy at -# a given location. The macro defines the following variables: +# extracts information of a subversion working copy at a given location. +# This macro defines the following variables: # var-prefix_WC_URL - url of the repository (at dir) # var-prefix_WC_ROOT - root url of the repository # var-prefix_WC_REVISION - current revision # var-prefix_WC_LAST_CHANGED_AUTHOR - author of last commit # var-prefix_WC_LAST_CHANGED_DATE - date of last commit # var-prefix_WC_LAST_CHANGED_REV - revision of last commit -# var-prefix_WC_LAST_CHANGED_LOG - last log of base revision # var-prefix_WC_INFO - output of command `svn info dir' +# Subversion_WC_LOG(dir var-prefix) +# retrieves the log message of the base revision of a subversion working +# copy at a given location. This macro defines the variable: +# var-prefix_LAST_CHANGED_LOG - last log of base revision # Example usage: # FIND_PACKAGE(Subversion) # IF(Subversion_FOUND) @@ -74,6 +77,8 @@ \\2 Subversion_VERSION_SVN ${Subversion_VERSION_SVN}) STRING(REGEX REPLACE ^(.*\n)?URL: ([^\n]+).* \\2 ${prefix}_WC_URL ${${prefix}_WC_INFO}) + STRING(REGEX REPLACE ^(.*\n)?Repository Root: ([^\n]+).* +\\2 ${prefix}_WC_ROOT ${${prefix}_WC_INFO}) STRING(REGEX REPLACE ^(.*\n)?Revision: ([^\n]+).* \\2 ${prefix}_WC_REVISION ${${prefix}_WC_INFO}) STRING(REGEX REPLACE ^(.*\n)?Last Changed Author: ([^\n]+).* ___ 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] What's the best way to support additional compilers for an official CMake language such as Fortran
Hi Brad, On 2010-01-25 23:27, Brad King wrote: Arjen, please try out each compiler of interest with CMake 2.8.0 and with CMake from CVS HEAD. Remove all plplot language module files to see how much works out of the box. I will try this out as soon as possible. Regards, Arjen ___ 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] Installing Find*.cmake to the correct folder using NSIS configured by cmake on windows platform
No, you don't need install scripts for that! The documentation of find_package says, that CMake searches for nameConfig.cmake files in: prefix/ (W) prefix/(cmake|CMake)/ (W) prefix/name*/ (W) prefix/name*/(cmake|CMake)/ (W) prefix/(share|lib)/cmake/name*/ (U) prefix/(share|lib)/name*/ (U) prefix/(share|lib)/name*/(cmake|CMake)/ (U) prefix/name.framework/Resources/(A) prefix/name.framework/Resources/CMake/ (A) prefix/name.framework/Versions/*/Resources/ (A) prefix/name.framework/Versions/*/Resources/CMake/ (A) prefix/name.app/Contents/Resources/ (A) prefix/name.app/Contents/Resources/CMake/ (A) where (W) means Windows, (U) all Unix platforms (including Apple), and (A) Apple. prefix is constructed as follows: - if any of the variables CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, CMAKE_APPBUNDLE_PATH is defined by the user either in the cache or in the environment and NO_CMAKE_PATH is not specified, search there. - search the paths listed after the HINTS option of find_package. - search paths listed in standard environment variables which are system dependent. if the paths end on /bin or /sbin, these components are stripped. AFAIK this is usually the PATH variable. - search build trees that have been recently configured using CMake GUI, unless NO_CMAKE_BUILDS_PATH is specified. - search build trees that have been added to the users package repository using export(PACKAGE ...) unless NO_CMAKE_PACKAGE_REGISTRY is specified. - search directories listed by the CMake-platform files, unless NO_CMAKE_SYSTEM_PATH is specified. These paths are stored in the variables CMAKE_SYSTEM_PREFIX_PATH, CMAKE_SYSTEM_FRAMEWORK_PATH and CMAKE_SYSTEM_APPBUNDLE_PATH. - search directories listed in the PATHS option of find_package. So, on Windows CMAKE_SYSTEM_PREFIX_PATH is set to the values of the standard environment variables %ProgramW6432%, %ProgramFiles(x86)% and %ProgramFiles%. If you install XXXConfig.cmake in $ENV(ProgramFiles)/XXX/CMake/XXXConfig.cmake or $ENV(ProgramFiles)/CMake/XXXConfig.cmake on Windows, everything should be working automagically. No need to figure out where CMake is installed... But then, you could have found this out yourself by reading the docs... HTH Michael On 26. Jan, 2010, at 10:44 , mika.raj...@patria.fi wrote: Hi Thanks a lot for the help. Sorry that I didn't provide all necessary information at start, I just didn't understand the matter enought to write it all. You guessed right, I want to find out the folder of the host, so that the cmake running on the host machine may find it. I'd like that the user of my library can just install it with NSIS and use find_package(XX) without (the joy of) further hacking. I was unaware of those ConfigXXX.cmake files, but now that I am aware, I see how FindXXX.cmake isn't the correct one here. I'll try to look into executing install time scripts, as Eric suggested. Thanks for the info. -mika Eric Noulard eric.noul...@gma il.comTo Michael Wild them...@gmail.com 26.01.2010 10:59 cc mika.raj...@patria.fi, cmake@cmake.org Subject Re: [CMake] Installing Find*.cmake to the correct folder using NSIS configured by cmake on windows platform 2010/1/26 Michael Wild them...@gmail.com: On 26. Jan, 2010, at 9:02 , mika.raj...@patria.fi wrote: Hi How can i tell the NSIS installer, using cmake, to install my Find*.cmake script to the ${CMAKE_ROOT}/Modules directory? Writing that to the install command doesn't work. I did try googling for anwsers for the better part of yesterday so if it can be found on the internet, please provide some assistance. -mika You shouldn't do that! For your own project, don't write a FindXXX.cmake, but a XXXConfig.cmake or XXX-config.cmake (as described by the documentation of find_package). Also, refer to the same
Re: [CMake] What's the best way to support additional compilers for an official CMake language such as Fortran
Arjen Markus wrote: I tried to do this, using the Compaq Visual Fortran compiler as a test case, as I can do that rightaway, but I ran into some trouble: Okay, I didn't expect this one to work yet. The MinGW and Cygwin versions of gfortran should work though. Please confirm this when you get a chance. - CMake complained at first about f90 - the -o option is ambiguous IIRC Without the Compaq compiler info files CMake has no idea how to construct the compiler command line, so it guesses with unix conventions. This is not surprising. - There were no output files created in the working directory, but there was a message that all was fine. What was the actual CMake output log? - I tried to reproduce the error messages, but CMake reacts differently now: there is no indication it is trying to find a Fortran compiler, and it is finished very fast indeed. Is it storing the cached information in another location than the current (working) directory? If so, which is it? There is also a CMakeFiles subdirectory in which compiler information is kept outside of CMakeCache.txt so that it can be shared with the try_compile projects. Generally you should keep the source tree totally clean and always use outside build trees. That way you can just wipe out the build tree to start fresh. -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] What's the best way to support additional compilers for an official CMake language such as Fortran
Hi Brad, On 2010-01-26 14:37, Brad King wrote: Arjen Markus wrote: I tried to do this, using the Compaq Visual Fortran compiler as a test case, as I can do that rightaway, but I ran into some trouble: Okay, I didn't expect this one to work yet. The MinGW and Cygwin versions of gfortran should work though. Please confirm this when you get a chance. Will do - Cygwin is not installed on the laptop I used, but MinGW is. - CMake complained at first about f90 - the -o option is ambiguous IIRC Without the Compaq compiler info files CMake has no idea how to construct the compiler command line, so it guesses with unix conventions. This is not surprising. - There were no output files created in the working directory, but there was a message that all was fine. What was the actual CMake output log? - I tried to reproduce the error messages, but CMake reacts differently now: there is no indication it is trying to find a Fortran compiler, and it is finished very fast indeed. Is it storing the cached information in another location than the current (working) directory? If so, which is it? There is also a CMakeFiles subdirectory in which compiler information is kept outside of CMakeCache.txt so that it can be shared with the try_compile projects. Generally you should keep the source tree totally clean and always use outside build trees. That way you can just wipe out the build tree to start fresh. My usual procedure is this: - Clean out the directory I want to build in (no subdirectories, no files) - Start a batch file or shell script which refers to the correct version of CMake and the correct CMakeLists.txt file with all the options I want to use I did it this way just now too, but I found out that the intermediate files are stored in the directory containing the CMakeLists.txt file! This is the command I used: c:\program files\cmake 2.8\bin\cmake ..\plplot\CMakeLists.txt -G NMake Make files in the directory build-windows ... Actually, the entire source directory now contains subdirectories like CMakeFiles. This is weird - I have never seen it do this before. The only changes I made to the CMake part of PLplot were: move two files out of the way and remove their inclusion from the language_support.cmake file to avoid error messages. Regards, Arjen ___ 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] Out of source dependencies.
I have come up with a partial solution to this issue by putting the add_subdirectory into a macro that is called to do the add along with the add_depend. It looks for a variable of ${CMAKE_PROJECT_NAME}_BUILT in order to determine if it should add_subdirectory or just add_depend. The issue now is that I recieve warnings of overiding commands and ignoring old commands for the shared dependency. Let me clarify my earlier post. My top level project contains 4 projects. /trunk/a (Only Executable) /trunk/b /trunk/c /trunk/d To Build, a requires b. b requires c. Both a and c require d. In a: project(a) set(BASEDIR /trunk) add_subdirectory(${BASEDIR}/b ${CMAKE_BINARY_DIR}/b) add_subdirectory(${BASEDIR}/d ${CMAKE_BINARY_DIR}/d) ... In b: project(a) set(BASEDIR /trunk) add_subdirectory(${BASEDIR}/c ${CMAKE_BINARY_DIR}/c) ... In c: project(a) set(BASEDIR /trunk) add_subdirectory(${BASEDIR}/d ${CMAKE_BINARY_DIR}/d) ... This method fails due to the same Bin dir being used for d in both c and a. To solve this, I created a macro that does the following along with adding set (${CMAKE_PROJECT_NAME}_BUILT 1) to all projects if(${_name}_BUILT) add_dependencies(${_target} ${_name}) else() add_subdirectory(${_src} ${_bin}) add_dependencies(${_target} ${_name}) endif() The issue that now appears is that project d has the following warnings when make is ran. CMakeFiles/Makefile2:76051: warning: overriding commands for target `trunk/d/CMakeFiles/d.dir/all' CMakeFiles/Makefile2:64065: warning: ignoring old commands for target `trunk/d/CMakeFiles/d.dir/all' CMakeFiles/Makefile2:76063: warning: overriding commands for target `trunk/d/CMakeFiles/d.dir/rule' CMakeFiles/Makefile2:64077: warning: ignoring old commands for target `trunk/d/CMakeFiles/d.dir/rule' CMakeFiles/Makefile2:76074: warning: overriding commands for target `trunk/d/CMakeFiles/d.dir/clean' CMakeFiles/Makefile2:64088: warning: ignoring old commands for target `trunk/d/CMakeFiles/d.dir/clean' What would cause this issue in the makefiles? From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Schwartz, Philip Sent: Monday, January 25, 2010 4:33 PM To: cmake@cmake.org Subject: [CMake] Out of source dependencies. The current project that I am working on has multiple projects layered through subdirectories. The project was a conversion from traditional makefiles and when we do a cmake build from the root of the source tree all is done correctly. The issue comes to when we try and build a single component from a out of source build directory (we are requiring out of source builds). I have found a temp solution for example /trunk/a /trunk/b /trunk/c a requires b and b requires c to build correctly. As long as they dont share dependencies, if I use add_subdirectory(src ${CMAKE_BINARY_DIR}/project) for each it works to build the deps as needed. The issue is if both a and c require the another dep pulled in the same way. The error that comes up is through a policy error of CMP0013. Yes, I could disable the policy, but would prefer a more elegant solution for the issue. Any help would be appreciated. --Philip This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. ___ 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] What's the best way to support additional compilers for an official CMake language such as Fortran
Arjen Markus wrote: I did it this way just now too, but I found out that the intermediate files are stored in the directory containing the CMakeLists.txt file! Somehow a CMakeCache.txt file must have ended up in your source tree. Once an in-source build is done it is impossible to do out-of-source. Get a fresh tree from version control and try again. -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] What's the best way to support additional compilers for an official CMake language such as Fortran
Hi Brad, this did not work! I checked out PLplot a-fresh, checked that there are NO CMakeCache.txt files anywhere in the source tree, used a fresh DOS-box to start the batch file in a directory separate from the source directory and tried again. The result: a CMakeFiles subdirectory in the source tree, CMakeCache.txt in there too etc. I tried it twice to make sure I made no mistake. I installed CMake 2.8 today on this laptop, to make sure I had an up-to-date version. Any ideas what on earth is causing this? Regards, Arjen On 2010-01-26 15:02, Brad King wrote: Arjen Markus wrote: I did it this way just now too, but I found out that the intermediate files are stored in the directory containing the CMakeLists.txt file! Somehow a CMakeCache.txt file must have ended up in your source tree. Once an in-source build is done it is impossible to do out-of-source. Get a fresh tree from version control and try again. -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] What's the best way to support additional compilers for an official CMake language such as Fortran
Arjen Markus wrote: this did not work! I checked out PLplot a-fresh, checked that there are NO CMakeCache.txt files anywhere in the source tree, used a fresh DOS-box to start the batch file in a directory separate from the source directory and tried again. The result: a CMakeFiles subdirectory in the source tree, CMakeCache.txt in there too etc. I tried it twice to make sure I made no mistake. I installed CMake 2.8 today on this laptop, to make sure I had an up-to-date version. Any ideas what on earth is causing this? [snip] c:\program files\cmake 2.8\bin\cmake ..\plplot\CMakeLists.txt -G NMake Make files Don't specify the CMakeLists.txt file; just put the directory. Also, there is no space in the Makefiles part of the NMake generator name: c:\program files\cmake 2.8\bin\cmake ..\plplot -G NMake Makefiles If specifying the CMakeLists.txt file causes this problem, that is a separate bug to report. -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] What's the best way to support additional compilers for an official CMake language such as Fortran
Hi Brad, ah, had to work from memory - normally I rely on my hard disk's memory :). Will try again. Regards, Arjen On 2010-01-26 15:36, Brad King wrote: Arjen Markus wrote: this did not work! I checked out PLplot a-fresh, checked that there are NO CMakeCache.txt files anywhere in the source tree, used a fresh DOS-box to start the batch file in a directory separate from the source directory and tried again. The result: a CMakeFiles subdirectory in the source tree, CMakeCache.txt in there too etc. I tried it twice to make sure I made no mistake. I installed CMake 2.8 today on this laptop, to make sure I had an up-to-date version. Any ideas what on earth is causing this? [snip] c:\program files\cmake 2.8\bin\cmake ..\plplot\CMakeLists.txt -G NMake Make files Don't specify the CMakeLists.txt file; just put the directory. Also, there is no space in the Makefiles part of the NMake generator name: c:\program files\cmake 2.8\bin\cmake ..\plplot -G NMake Makefiles If specifying the CMakeLists.txt file causes this problem, that is a separate bug to report. -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] What's the best way to support additional compilers for an official CMake language such as Fortran
Hi Brad, that was better. Installed gfortran now under MinGW (from TDM) and removed the Fortran-specific files from PLplot, so that it should recognise gfortran out-of-the-box. This does not work, but it is a gfortran/gcc problem. I will need to look into that. Regards, Arjen On 2010-01-26 15:36, Brad King wrote: Don't specify the CMakeLists.txt file; just put the directory. Also, there is no space in the Makefiles part of the NMake generator name: c:\program files\cmake 2.8\bin\cmake ..\plplot -G NMake Makefiles If specifying the CMakeLists.txt file causes this problem, that is a separate bug to report. -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] Subversion_WC_INFO macro should not do SEND_ERROR
On Tue, Jan 26, 2010 at 10:23:03AM +0100, Marcel Loose wrote: Is that portable? I don't do development on Windows, but I vaguely remember that on Windows the .svn directories had a different name, because Windows doesn't really like file- and directory names that start with a dot. Windows uses .svn directories at least since svn 1.5. svn 1.7 will likely change this though -- they're moving to a more centralized sqlite database for the metadata store -- so I would not recommend any strategy based on the existence of .svn files. tyler ___ 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 determine a ABI version of the arm-linux-gcc?
Alexander Neundorf wrote: please apply the attached patch to Modules/CMakeCompilerABI.h (current CVS, but 2.8.0 should work too). Thank you for the patch. I applied it to the 2.8.0. You should then get the variables CMAKE_(C|CXX)_COMPILER_ABI set to either ELF ARM or ELF ARMEABI. Do I see it right, that this variable is relevant when building CMake itself? I need ABI to be recognized if I compile my own application with CMake, so I can say that this application should be compiled only for EABI. This statement would make ABI check for given GCC (in this case arm-linux-gcc) and reject the compilation if this condition is not satisfied. Please let me know if this works for you and also whether you think these names are appropriate for these two ABIs. The names are appropriate. Yegor ___ 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] [vtkusers] Windows: Correctly linking the debug and release libraries in a CMake-based project
When you build VTK using CMake the .lib .dll may have the same name but they are in different folders. CMake understands this and will properly link your application with the correct .lib. This happens if you do build both debug and release vtk. John I think he is talking about having the vtk libs have _debug or _D or D in the name when they are built as debug versus Release builds. What works for ITK is to actually build both the debug and release versions but DO NOT install them. Then set an environment variable VTK_DIR to point to the build directory of VTK. CMake will do the rest. This at least worked for me with ITK and allowed me to switch between debug and release builds in my own project without getting all the linker warnings/errors in MSVC. The other suggestion was to build Release W/Debug Info and install that. Oh I see. I do not INSTALL VTK or ITK I just do as you mention.. 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] Subversion_WC_INFO macro should not do SEND_ERROR
On 1/26/10 10:33 AM, Tyler Roscoe wrote: On Tue, Jan 26, 2010 at 10:23:03AM +0100, Marcel Loose wrote: Is that portable? I don't do development on Windows, but I vaguely remember that on Windows the .svn directories had a different name, because Windows doesn't really like file- and directory names that start with a dot. Windows uses .svn directories at least since svn 1.5. svn 1.7 will likely change this though -- they're moving to a more centralized sqlite database for the metadata store -- so I would not recommend any strategy based on the existence of .svn files. tyler An alternative, of course, is to implement a function or macro in a module distributed with CMake, that hides the process of detecting whether a directory is a svn working copy and can deal with current and future repository formats. Ryan -- Ryan Pavlik Human-Computer Interaction Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com/ ___ 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 determine a ABI version of the arm-linux-gcc?
Brad King wrote: Yegor Yefremov wrote: Alexander Neundorf wrote: You should then get the variables CMAKE_(C|CXX)_COMPILER_ABI set to either ELF ARM or ELF ARMEABI. Do I see it right, that this variable is relevant when building CMake itself? No, it is set in each project that gets built. The reason it looks like it's in a source file is because that source gets compiled for the target environment by CMake when it configures a project. O.K. Here are some lines of my CMakeLists.txt: set (CMAKE_C_COMPILER arm-linux-gcc) set (CMAKE_STRIP arm-linux-strip) message (STATUS ABI ${CMAKE_C_COMPILER_ABI}) After running cmake I see only ABI as output and CMakeCache.txt doesn't contain CMAKE_C_COMPILER_ABI variable at all. That is everything I could find in CMakeCache.txt referencing ABI: //Result of TRY_COMPILE CMAKE_DETERMINE_CXX_ABI_COMPILED:INTERNAL=TRUE //Result of TRY_COMPILE CMAKE_DETERMINE_C_ABI_COMPILED:INTERNAL=TRUE That's why I was thinking CMAKE_C_COMPILER_ABI is for building CMake itself relevant. Yegor ___ 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 define the output location of QT4_WRAP_UI?
hello. I've ran into a slight problem, I have a program that uses qt4 gui, I've created classes with ui, my cmakelist.txts looks like this: cmake_minimum_required(VERSION 2.6) PROJECT(Quad) SET(CMAKE_VERBOSE_MAKEFILE ON) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/libs) SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/modules) SET(Boost_MINIMUM_VERSION 1.33.1) find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) #INCLUDE(${QT_cd USE_FILE}) INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} src) SUBDIRS(src) and #this is just a basic CMakeLists.txt, for more information see the cmake manpage SET(SUBDIRS GUI Utilities DataObjects Threads) FOREACH(subdir ${SUBDIRS}) add_subdirectory(${subdir}) ENDFOREACH(subdir) #add definitions, compiler switches, etc. ADD_DEFINITIONS(-g -Wall -O2) #get all cpp files in libs file(GLOB UTIL_CPP Utilities/*.cpp) file(GLOB DATA_CPP DataObjects/*.cpp) file(GLOB THREADS_CPP Threads/*.cpp) file(GLOB GUI_CPP GUI/*.cpp) file(GLOB GUI_UI GUI/*.ui) QT4_WRAP_UI(GUI_UI_H ${GUI_UI}) #build a shared library ADD_LIBRARY(Utilities SHARED ${UTIL_CPP}) ADD_LIBRARY(DataObjects SHARED ${DATA_CPP}) ADD_LIBRARY(Threads SHARED ${THREADS_CPP}) ADD_LIBRARY(GUI SHARED ${GUI_CPP} ${GUI_UI_H}) #add_subdirectory(testUnits) #link libs target_link_libraries(DataObjects) target_link_libraries(Utilities DataObjects) target_link_libraries(Threads Utilities DataObjects) target_link_libraries(GUI ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} Utilities DataObjects) #list all source files here ADD_EXECUTABLE(Quad Quad.cpp) #need to link to some other libraries TARGET_LINK_LIBRARIES(Quad DataObjects Utilities Threads GUI) now for some reason the ui_*.h files are created under the bin folder causing compilation to fail because these files are missing in the actual src folder. how can I define the macro's output location? ___ 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 define the output location of QT4_WRAP_UI?
On Tue, Jan 26, 2010 at 5:39 PM, e...@cs.bgu.ac.il e...@cs.bgu.ac.il wrote: hello. I've ran into a slight problem, I have a program that uses qt4 gui, I've created classes with ui, my cmakelist.txts looks like this: cmake_minimum_required(VERSION 2.6) PROJECT(Quad) SET(CMAKE_VERBOSE_MAKEFILE ON) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build) SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/libs) SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/modules) SET(Boost_MINIMUM_VERSION 1.33.1) find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED) #INCLUDE(${QT_cd USE_FILE}) INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} src) SUBDIRS(src) and #this is just a basic CMakeLists.txt, for more information see the cmake manpage SET(SUBDIRS GUI Utilities DataObjects Threads) FOREACH(subdir ${SUBDIRS}) add_subdirectory(${subdir}) ENDFOREACH(subdir) #add definitions, compiler switches, etc. ADD_DEFINITIONS(-g -Wall -O2) #get all cpp files in libs file(GLOB UTIL_CPP Utilities/*.cpp) file(GLOB DATA_CPP DataObjects/*.cpp) file(GLOB THREADS_CPP Threads/*.cpp) file(GLOB GUI_CPP GUI/*.cpp) file(GLOB GUI_UI GUI/*.ui) QT4_WRAP_UI(GUI_UI_H ${GUI_UI}) #build a shared library ADD_LIBRARY(Utilities SHARED ${UTIL_CPP}) ADD_LIBRARY(DataObjects SHARED ${DATA_CPP}) ADD_LIBRARY(Threads SHARED ${THREADS_CPP}) ADD_LIBRARY(GUI SHARED ${GUI_CPP} ${GUI_UI_H}) #add_subdirectory(testUnits) #link libs target_link_libraries(DataObjects) target_link_libraries(Utilities DataObjects) target_link_libraries(Threads Utilities DataObjects) target_link_libraries(GUI ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} Utilities DataObjects) #list all source files here ADD_EXECUTABLE(Quad Quad.cpp) #need to link to some other libraries TARGET_LINK_LIBRARIES(Quad DataObjects Utilities Threads GUI) now for some reason the ui_*.h files are created under the bin folder causing compilation to fail because these files are missing in the actual src folder. how can I define the macro's output location? The point of out of source builds is nothing generated goes with the source. I would just add the binary folder as an include using cmake. INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}) 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