[CMake] ExternalProject in 2.6
Hello, is it possible to backport ExternalProject to 2.6? Did anyone try successfully or unsuccessfully? Unfortunately 2.8 is not an option since it is not included even in recent RHEL 6.0. Thanks. -- Best regards, Ilja Golshtein. ___ 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 in 2.6
Michael, the problem is I cannot make my project dependent on CMake 2.8 since 2.8 does not exist in major server distros. That is why I am asking if it is impossible/possible/already_done to backport ExternalProject to 2.6. Thanks. 20.06.2011, 13:39, Michael Wild them...@gmail.com: On 06/20/2011 11:28 AM, Ilja Golshtein wrote: Hello, is it possible to backport ExternalProject to 2.6? Did anyone try successfully or unsuccessfully? Unfortunately 2.8 is not an option since it is not included even in recent RHEL 6.0. Thanks. You can also download the 2.8 binaries from http://cmake.org, unpack them somewhere convenient and then include the bin/ directory in your PATH. Very simple, works on virtually all Linux systems and there's no need to compile anything (except for your own code, that is ;-)) 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 -- Best regards, Ilja Golshtein. ___ 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] Change variable default
Hello! There are some CMAKE variables with default values. For example CMAKE_CXX_FLAGS_DEBUG default value is '-g'. How is it possible to make it '-g -Wall'? What I don't want to have: User choice overwritten. What I want to have: Modified a variable cmake-time default. It must be possible to change the variable via cmake -D or ccmake GUI. Thanks. -- Best regards, Ilja Golshtein. ___ 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] Change variable default
Tim, I guess the difference is project command defines CMAKE_CXX_FLAGS_DEBUG and does not define CMAKE_Fortran_FLAGS_DEBUG. Regarding CMAKE_*_FLAGS_*_INIT, you are right, but what if user explicitly set the same value as INIT? It would be overwritten! Anyway, I am happy with the solution to put CMAKE_CXX_FLAGS_DEBUG before project command. Thank you! 28.04.2011, 20:49, Tim Gallagher tim.gallag...@gatech.edu: To put it in context, our cmake file looks like: define project/language/etc find required libraries if(${CMAKE_Fortran_COMPILER_ID} STREQUAL Intel) if(NOT CMAKE_Fortran_FLAGS_RELEASE) set(CMAKE_Fortran_FLAGS_RELEASE -O2 -xhost CACHE STRING FORCE) endif() set(CMAKE_Fortran_FLAGS_DEBUG ${CMAKE_Fortran_FLAGS_DEBUG} -check noarg_temp_created -C -traceback CA\ CHE STRING FORCE) endif() setup options for the project define executable The other way you can try it, if it's not empty, is to do if(${CMAKE_Fortran_FLAGS_RELEASE} STREQUAL ${CMAKE_Fortran_FLAGS_RELEASE_INIT}) As far as I know, CMAKE_*_FLAGS_*_INIT are the default values that it gets set to when cmake starts up. So if you check against that, you will see if the user has modified it. Tim - Original Message - From: Ilja Golshtein ilej...@narod.ru; To: gtg0...@mail.gatech.edu Cc: cmake@cmake.org Sent: Thursday, April 28, 2011 12:42:40 PM Subject: Re: [CMake] Change variable default Tim, thank you. Compiler and environment specific things become defined during project command execution. It is too late to check if it is set afterwards because it actually IS SET. I assume you are lucky and default value for CMAKE_Fortran_FLAGS_RELEASE is empty, isn't it? So the tricky point is to place customization code in proper place. In my case == set(CMAKE_CXX_FLAGS_DEBUG -g -wall CACHE STRING ) == works perfectly if put at the top of CMakeLists.txt 28.04.2011, 19:23, Tim Gallagher tim.gallag...@gatech.edu;: We do this: if(NOT CMAKE_Fortran_FLAGS_RELEASE) set(CMAKE_Fortran_FLAGS_RELEASE -O2 -xhost CACHE STRING FORCE) endif() In other words, if the flags haven't been set yet (initial start up), set them to what we want. If they have been set (either changed by the user, or specified on the cmake/ccmake line with -D), leave them alone. Tim - Original Message - From: Ilja Golshtein ilej...@narod.ru;; To: cmake@cmake.org Sent: Thursday, April 28, 2011 9:03:43 AM Subject: [CMake] Change variable default Hello! There are some CMAKE variables with default values. For example CMAKE_CXX_FLAGS_DEBUG default value is '-g'. How is it possible to make it '-g -Wall'? What I don't want to have: User choice overwritten. What I want to have: Modified a variable cmake-time default. It must be possible to change the variable via cmake -D or ccmake GUI. Thanks. -- Best regards, Ilja Golshtein. ___ 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 -- Best regards, Ilja Golshtein. ___ 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 -- Best regards, Ilja Golshtein. ___ 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] multiple directories in one variable
Hello! I use a product which (depending on installation type) can keep headers in several directories. What is the best way to specify these directories? Do I have better option than variables EXTERNAL_PRODUCT_INCLUDE_1 EXTERNAL_PRODUCT_INCLUDE_2 ... listed as include_directories(EXTERNAL_PRODUCT_INCLUDE_1 EXTERNAL_PRODUCT_INCLUDE_2) ? Ideally I want to write -DEXTERNAL_PRODUCT_INCLUDE=dir1 dir2 dir3 cmake-time, but it does not work. Thanks. -- Best regards, Ilja Golshtein. ___ 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] multiple directories in one variable
David,thank you so much!It does work!11.02.2011, 18:37, "David Cole" david.c...@kitware.com:On Fri, Feb 11, 2011 at 10:29 AM, John Drescher dresche...@gmail.com wrote: it is what I want. But how? How can I "put all the directories in EXTERNAL_PRODUCT_INCLUDES" from cmake command line? I do not know. Sorry. I did not see that you were trying to add these via the command line. I never use that mode of cmake. 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/cmakeYou should be able to do: cmake "-DEXTERNAL_PRODUCT_INCLUDES=/dir a;/dir b;/dirc/include" ../source_directoryAnd then, inside CMakeLists.txt: include_directories(${EXTERNAL_PRODUCT_INCLUDES}) Is there a problem you hit with that approach?-- Best regards,Ilja Golshtein.___ 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] Action to perform unconditionally
Hello! I am trying to generate version.h in my project as described http://addisu.taddese.com/blog/inserting-svn-revision-number-in-your-cc-code/ I think the most natural place to do it is my project root CMakeLists.txt. The problem is it does not contain any target - just setting some variables and add_subdirectory(src) The question is what is the best way to perform an action make-time unconditionally. Thanks. -- Best regards, Ilja Golshtein. ___ 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] Action to perform unconditionally
Michael, the problematic step is ADD_DEPENDENCIES. I don't have any suitable target. The referred CMakeLists.txt has main/main.c. Unfortunately mine does not - just add_subdirectory. I do believe there is a pattern to overcome such issue without nasty hacks. Many thanks. -- Best regards, Ilja Golshtein. ___ 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] Action to perform unconditionally
02.02.2011, 16:42, Michael Hertling mhertl...@online.de: On 02/02/2011 02:27 PM, Ilja Golshtein wrote: the problematic step is ADD_DEPENDENCIES. I don't have any suitable target. The referred CMakeLists.txt has main/main.c. Unfortunately mine does not - just add_subdirectory. But in the subdirectory, there's a target, isn't it? So, just use ADD_DEPENDENCIES() there; with CMake, targets are global entities. No, there is not - just another bunch of add_subdirectory ;) Obviously I can choose arbitrary executable and link my target to it. I am just looking for better solution ... As simple as Phony target. Thanks. -- Best regards, Ilja Golshtein. ___ 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] Action to perform unconditionally
02.02.2011, 17:37, Michael Hertling mhertl...@online.de: Obviously I can choose arbitrary executable and link my target to it. Preferably, choose the targets which need the version.h header. All executables (well ... but some tests) require version.h Looks like the cleanest approach is to have all executables dependent on version.h Another possible approach would be a dependency of the built-in target all on the custom target which generates the header, so consider to vote for #8438 when the question for the most appreciated bug fixes / feature requests will be asked again. I will. Thanks a lot. -- Best regards, Ilja Golshtein. ___ 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] text file modifications while Install
Hello, list, please, suggest proper way to do some text file modifications while Install. Basically I need something similar with RPATH change Cmake does, but against a configuration file. Currently I create amended version of the config make-time and use it install-time. It does not look like an elegant solution. Ideas how to do it better? Thanks and sorry if double posted. -- Best regards, Ilja Golshtein. ___ 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