Re: [cmake-developers] TARGET availability
On Thu, Mar 21, 2013 at 11:06 AM, Vittorio Giovara vittorio.giov...@gmail.com wrote: On Wed, Mar 20, 2013 at 2:05 PM, Brad King brad.k...@kitware.com wrote: On 3/20/2013 4:52 AM, Vittorio Giovara wrote: is it possible to use the TARGET variable during the COMPILE_OBJECT phase? I see it only working on EXECUTABLE and LIBRARY steps but a few languages would benefit from having TARGET available during COMPILE_OBJECT as well. Is there any way to make it work with the current cmake version? It would take some changes to the C++ code. Look here: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefileTargetGenerator.cxx;hb=v2.8.10.2#l658 If one sets vars.Target next to where vars.TargetPDB is set then the replacement should occur. If you get it working please respond back here with a patch. Yup, thanks to your tip, I got it working as expected. Please find the patch attached, I'll be glad if you could apply it. I'm fine with BSD licensing. Apologies, I missed the fact that TARGET should also contain the output path. Please find attached an updated version of the patch, using a similar procedure as found in cmMakefileExectuableTargetGenerator. Do you know if this patch can still make it to CMake 2.8.11 or is it too late? Thanks, Vittorio 0001-set-the-target-name-during-rule-setup-so-that-you-ca.patch 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] TARGET availability
On Thu, Mar 21, 2013 at 1:11 PM, Vittorio Giovara vittorio.giov...@gmail.com wrote: On Thu, Mar 21, 2013 at 11:06 AM, Vittorio Giovara vittorio.giov...@gmail.com wrote: On Wed, Mar 20, 2013 at 2:05 PM, Brad King brad.k...@kitware.com wrote: On 3/20/2013 4:52 AM, Vittorio Giovara wrote: is it possible to use the TARGET variable during the COMPILE_OBJECT phase? I see it only working on EXECUTABLE and LIBRARY steps but a few languages would benefit from having TARGET available during COMPILE_OBJECT as well. Is there any way to make it work with the current cmake version? It would take some changes to the C++ code. Look here: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefileTargetGenerator.cxx;hb=v2.8.10.2#l658 If one sets vars.Target next to where vars.TargetPDB is set then the replacement should occur. If you get it working please respond back here with a patch. Yup, thanks to your tip, I got it working as expected. Please find the patch attached, I'll be glad if you could apply it. I'm fine with BSD licensing. Apologies, I missed the fact that TARGET should also contain the output path. Please find attached an updated version of the patch, using a similar procedure as found in cmMakefileExectuableTargetGenerator. Do you know if this patch can still make it to CMake 2.8.11 or is it too late? Now with correct commit information (sorry for the spam). Vittorio 0001-set-Target-during-rule-setup-so-that-TARGET-is-avail.patch 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] Merging release branch into master
Hi, When the try_compile source-file signature is used, it generates a cmake_minimum_required line with the version of cmake run by the user (not the minimum used by the project being built). This affects policies, and could have an effect on the generated CMakeLists.txt file. Anyone using CMake master or next branch (eg the dashboards and build.kde.org) does not currently get the version bump until the final release is made, so any potential breakage resulting from this issue would not be noticed until the final release is made. The obvious way to me to resolve that is to merge release into master when the RC cycle starts. Any reason not to? Thanks, Steve. -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Merging release branch into master
On 03/21/2013 08:29 AM, Stephen Kelly wrote: When the try_compile source-file signature is used, it generates a cmake_minimum_required line with the version of cmake run by the user (not the minimum used by the project being built). This affects policies, and could have an effect on the generated CMakeLists.txt file. Anyone using CMake master or next branch (eg the dashboards and build.kde.org) does not currently get the version bump until the final release is made, so any potential breakage resulting from this issue would not be noticed until the final release is made. Even with your proposal this would true during the entire development period until the release candidate cycle starts. It would be better for the policy to be able to become NEW right away. We used to do this by introducing policies with the version set to the current (dated) version of CMake. IOW, instead of using 2.8.11 as a policy's introduction version, one should use 2.8.10.20130203 or whatever date introduced it. We used to do this when introducing policies way back when. Then in the RC we bump the new policies' versions to the RC version. The obvious way to me to resolve that is to merge release into master when the RC cycle starts. Any reason not to? The entire point of the release branch is to hold the version number adjustments needed for release candidates. It should not be in master. I don't want to get into a debate about how the versioning works. -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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] CMake usage requirements in KDE Frameworks
On 03/20/2013 04:31 PM, Alexander Neundorf wrote: The keywords won't interact well with PUBLIC/PRIVATE/INTERFACE keywords. Let's assume there would be only PRIVATE, INTERFACE_BUILD and INTERFACE_INSTALL. I'll use PRIVATE for building the target. I'll add INTERFACE_BUILD if I want to make using this target within the project easier. I'll add INTERFACE_INSTALL if I want to make using this target when installed easier. Am I correct so far ? No. The keywords are: * PUBLIC = use for me and my dependents * PRIVATE = use for me but not my dependents * INTERFACE = use for my dependents but not me For PUBLIC and INTERFACE the my dependents is then split into dependents using me from the build tree and dependents using me from the install tree. So e.g. I could do tid(hello PRIVATE ${Foo_INCLUDE_DIRS} ${Bar_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/blub INTERFACE_BUILD ${CMAKE_SOURCE_DIR}/blub ${Bar_INCLUDE_DIRS} INTERFACE_INSTALL ${INCLUDE_INSTALL_DIR} ${Bar_INCLUDE_DIRS} ) In which way would this be problematic ? list(APPEND somelist INTERFACE_INSTALL ${y} INTERFACE_BUILD ${x}) ... tid(hello INTERFACE_INSTALL ${somelist} ${INCLUDE_INSTALL_DIR}) The genex approach binds tightly so this does not happen. The PUBLIC/PRIVATE/INTERFACE information belongs in the tid() call so those keywords should not be in lists. The BUILD/INSTALL information belongs with each (path/directory) value so the genex binds tightly to it and can be in lists. -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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
On Thursday 21 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:42, Alexander Neundorf wrote: On Wednesday 20 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:10, David Cole wrote: Are you proposing that == behaves as STREQUAL, or as EQUAL? What's the difference? Okay, for , , there is an obvious answer, but for ==, I am trying and failing to think of a situation where treating the arguments as numbers would give a different result vs. treating them as strings. E.g. 0 vs. 0.0 Is 0.0 a floating-point number or a version string? In the context of CMake, I would have rather expected it to be the latter. (Does CMake even understand floating point?) If '==' assumes numbers, how do I tell it I really meant a version string? EQUAL tries to convert to double: if (argP1 != newArgs.end() argP2 != newArgs.end() (*(argP1) == LESS || *(argP1) == GREATER || *(argP1) == EQUAL)) { def = cmIfCommand::GetVariableOrString(arg-c_str(), makefile); def2 = cmIfCommand::GetVariableOrString((argP2)-c_str(), makefile); double lhs; double rhs; bool result; if(sscanf(def, %lg, lhs) != 1 || sscanf(def2, %lg, rhs) != 1) My == implementation simply compares the strings on both sides in the most simple and straightforward way. 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] CMake usage requirements in KDE Frameworks
On Thursday 21 March 2013, Brad King wrote: On 03/20/2013 04:31 PM, Alexander Neundorf wrote: ... So e.g. I could do tid(hello PRIVATE ${Foo_INCLUDE_DIRS} ${Bar_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/blub INTERFACE_BUILD ${CMAKE_SOURCE_DIR}/blub ${Bar_INCLUDE_DIRS} INTERFACE_INSTALL ${INCLUDE_INSTALL_DIR} ${Bar_INCLUDE_DIRS} ) In which way would this be problematic ? list(APPEND somelist INTERFACE_INSTALL ${y} INTERFACE_BUILD ${x}) ... tid(hello INTERFACE_INSTALL ${somelist} ${INCLUDE_INSTALL_DIR}) The genex approach binds tightly so this does not happen. The PUBLIC/PRIVATE/INTERFACE information belongs in the tid() call so those keywords should not be in lists. The BUILD/INSTALL information belongs with each (path/directory) value so the genex binds tightly to it and can be in lists. Ok. Still, is the PUBLIC part necessary ? IMO PRIVATE and INTERFACE suffice, and for me it seems more straighforward to separate only between these two. 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] CMake usage requirements in KDE Frameworks
On 03/21/2013 02:47 PM, Alexander Neundorf wrote: Still, is the PUBLIC part necessary ? IMO PRIVATE and INTERFACE suffice, and for me it seems more straighforward to separate only between these two. PRIVATE and INTERFACE are sufficient but need to be duplicated to produce the equivalent of PUBLIC. It is very common for an implementation dependency to also be a usage requirement, especially for include paths. -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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
Unfortunately, this entire discussion nicely demonstrates and reinforces my belief that we ought not to do this == thing... If Alex, Brad, Matthew and I can't understand each other's meanings within the context of this discussion, what chance does a poor user reading through the CMake IF documentation have of getting it right? Adding a new better way to do something without eliminating the old not-so-good way of doing the same thing is not necessarily a good thing. Multiple ways to do things just make people shake their heads and ask Why? I am still voting no on this one. David C. -Original Message- From: Alexander Neundorf neund...@kde.org To: cmake-developers cmake-developers@cmake.org Sent: Thu, Mar 21, 2013 2:43 pm Subject: Re: [cmake-developers] if (FOO == BAR) ... On Thursday 21 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:42, Alexander Neundorf wrote: On Wednesday 20 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:10, David Cole wrote: Are you proposing that == behaves as STREQUAL, or as EQUAL? What's the difference? Okay, for , , there is an obvious answer, but for ==, I am trying and failing to think of a situation where treating the arguments as numbers would give a different result vs. treating them as strings. E.g. 0 vs. 0.0 Is 0.0 a floating-point number or a version string? In the context of CMake, I would have rather expected it to be the latter. (Does CMake even understand floating point?) If '==' assumes numbers, how do I tell it I really meant a version string? EQUAL tries to convert to double: if (argP1 != newArgs.end() argP2 != newArgs.end() (*(argP1) == LESS || *(argP1) == GREATER || *(argP1) == EQUAL)) { def = cmIfCommand::GetVariableOrString(arg-c_str(), makefile); def2 = cmIfCommand::GetVariableOrString((argP2)-c_str(), makefile); double lhs; double rhs; bool result; if(sscanf(def, %lg, lhs) != 1 || sscanf(def2, %lg, rhs) != 1) My == implementation simply compares the strings on both sides in the most simple and straightforward way. 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
On 2013-03-21 14:56, David Cole wrote: Unfortunately, this entire discussion nicely demonstrates and reinforces my belief that we ought not to do this == thing... If Alex, Brad, Matthew and I can't understand each other's meanings within the context of this discussion, what chance does a poor user reading through the CMake IF documentation have of getting it right? Adding a new better way to do something without eliminating the old not-so-good way of doing the same thing is not necessarily a good thing. Multiple ways to do things just make people shake their heads and ask Why? I am still voting no on this one. Honestly, I am inclined to agree. There are other reasons also, e.g. no other place in CMake uses symbolic operators. I would prefer a policy to inhibit expansion in quoted strings. (And I'd like it to be ON by default for sufficiently new CMake version required.) -- Matthew -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
Is there a best practices using existing functionality to always avoid automatic dereference when comparing strings? Clint On Thursday, March 21, 2013 02:56:51 PM David Cole wrote: Unfortunately, this entire discussion nicely demonstrates and reinforces my belief that we ought not to do this == thing... If Alex, Brad, Matthew and I can't understand each other's meanings within the context of this discussion, what chance does a poor user reading through the CMake IF documentation have of getting it right? Adding a new better way to do something without eliminating the old not-so-good way of doing the same thing is not necessarily a good thing. Multiple ways to do things just make people shake their heads and ask Why? I am still voting no on this one. David C. -Original Message- From: Alexander Neundorf neund...@kde.org To: cmake-developers cmake-developers@cmake.org Sent: Thu, Mar 21, 2013 2:43 pm Subject: Re: [cmake-developers] if (FOO == BAR) ... On Thursday 21 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:42, Alexander Neundorf wrote: On Wednesday 20 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:10, David Cole wrote: Are you proposing that == behaves as STREQUAL, or as EQUAL? What's the difference? Okay, for , , there is an obvious answer, but for ==, I am trying and failing to think of a situation where treating the arguments as numbers would give a different result vs. treating them as strings. E.g. 0 vs. 0.0 Is 0.0 a floating-point number or a version string? In the context of CMake, I would have rather expected it to be the latter. (Does CMake even understand floating point?) If '==' assumes numbers, how do I tell it I really meant a version string? EQUAL tries to convert to double: if (argP1 != newArgs.end() argP2 != newArgs.end() (*(argP1) == LESS || *(argP1) == GREATER || *(argP1) == EQUAL)) { def = cmIfCommand::GetVariableOrString(arg-c_str(), makefile); def2 = cmIfCommand::GetVariableOrString((argP2)-c_str(), makefile); double lhs; double rhs; bool result; if(sscanf(def, %lg, lhs) != 1 || sscanf(def2, %lg, rhs) != 1) My == implementation simply compares the strings on both sides in the most simple and straightforward way. 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
I almost always do one of these for string compare to a CMake variable value: if(${var} STREQUAL some string constant) if(${var} STREQUAL ${some_other_variable}) However, this is only because I am almost always certain that ${var} does not evaluate to the name of yet another CMake variable. If it did, I would get unintended results. So I wouldn't say it's necessarily a best-practice. It's close enough for many lines of code I've written, but a monkey-wrench could easily be thrown at it. Does forcing the if(VARIABLE usage rather than the if(string usage make things work all the time? (Now I've thought about it too hard, and I can't remember if this works all the time or not...) set(x ${var}) if(x STREQUAL some string constant) D -Original Message- From: Clinton Stimpson clin...@elemtech.com To: cmake-developers cmake-developers@cmake.org Sent: Thu, Mar 21, 2013 3:40 pm Subject: Re: [cmake-developers] if (FOO == BAR) ... Is there a best practices using existing functionality to always avoid automatic dereference when comparing strings? Clint On Thursday, March 21, 2013 02:56:51 PM David Cole wrote: Unfortunately, this entire discussion nicely demonstrates and reinforces my belief that we ought not to do this == thing... If Alex, Brad, Matthew and I can't understand each other's meanings within the context of this discussion, what chance does a poor user reading through the CMake IF documentation have of getting it right? Adding a new better way to do something without eliminating the old not-so-good way of doing the same thing is not necessarily a good thing. Multiple ways to do things just make people shake their heads and ask Why? I am still voting no on this one. David C. -Original Message- From: Alexander Neundorf neund...@kde.org To: cmake-developers cmake-developers@cmake.org Sent: Thu, Mar 21, 2013 2:43 pm Subject: Re: [cmake-developers] if (FOO == BAR) ... On Thursday 21 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:42, Alexander Neundorf wrote: On Wednesday 20 March 2013, Matthew Woehlke wrote: On 2013-03-20 17:10, David Cole wrote: Are you proposing that == behaves as STREQUAL, or as EQUAL? What's the difference? Okay, for , , there is an obvious answer, but for ==, I am trying and failing to think of a situation where treating the arguments as numbers would give a different result vs. treating them as strings. E.g. 0 vs. 0.0 Is 0.0 a floating-point number or a version string? In the context of CMake, I would have rather expected it to be the latter. (Does CMake even understand floating point?) If '==' assumes numbers, how do I tell it I really meant a version string? EQUAL tries to convert to double: if (argP1 != newArgs.end() argP2 != newArgs.end() (*(argP1) == LESS || *(argP1) == GREATER || *(argP1) == EQUAL)) { def = cmIfCommand::GetVariableOrString(arg-c_str(), makefile); def2 = cmIfCommand::GetVariableOrString((argP2)-c_str(), makefile); double lhs; double rhs; bool result; if(sscanf(def, %lg, lhs) != 1 || sscanf(def2, %lg, rhs) != 1) My == implementation simply compares the strings on both sides in the most simple and straightforward way. 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
On 03/21/2013 03:40 PM, Clinton Stimpson wrote: Is there a best practices using existing functionality to always avoid automatic dereference when comparing strings? if(x${LHS} STREQUAL x${RHS}) One can construct pathological cases that will break it but it works well. -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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] if (FOO == BAR) ...
On 2013-03-21 16:55, David Cole wrote: I almost always do one of these for string compare to a CMake variable value: if(${var} STREQUAL some string constant) if(${var} STREQUAL ${some_other_variable}) However, this is only because I am almost always certain that ${var} does not evaluate to the name of yet another CMake variable. If it did, I would get unintended results. So I wouldn't say it's necessarily a best-practice. It's close enough for many lines of code I've written, but a monkey-wrench could easily be thrown at it. Does forcing the if(VARIABLE usage rather than the if(string usage make things work all the time? (Now I've thought about it too hard, and I can't remember if this works all the time or not...) set(x ${var}) if(x STREQUAL some string constant) I think this would be the only way to be 100% safe. Using a prefix (or suffix; same different) like 'x', 'x_', etc. will work in most cases (even better would be to use at least one non-identifier character for the prefix), but not if you are also trying to guard against intentionally malicious usage. (You'd be surprised what you can coerce into being part of a CMake variable name... in fact, offhand, NUL is about the only thing I am confident cannot be part of a CMake variable name...) On a related note, can we get a policy to only allow variable names that are valid C[++] identifiers? :-) -- Matthew -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[CMake] patch proposal for PythonInterp
Hi, I have a suggestion for the PythonInterp. On a system I am compiling my code on, I need to find the python binary which is newer than 2.5. However, the default /usr/bin/python is 2.4. If I then set the variable (which is not documented in the header by the way) PythonInterp_FIND_VERSION to 2.5, it will first search for the following list of binary names: python2.5 python2 python. It then finds python2 (and would find python) which points to python2.4. I do not have python2.5 on this system, only 2.6. Now I know my way around this myself, but I think the implementation of this script would be nicer with the attached patch. The list of binary names in the first search then becomes: python2.5 python2.7 python2.6 python2.5 python2 python Any comments? Do people agree? Am I missing some important reason for the current behaviour? Cheers, Yngve diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 7fb65b8..60a0f53 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -39,15 +39,17 @@ if(PythonInterp_FIND_VERSION) if(PythonInterp_FIND_VERSION MATCHES ^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$) string(REGEX REPLACE ^([0-9]+\\.[0-9]+).* \\1 _PYTHON_FIND_MAJ_MIN ${PythonInterp_FIND_VERSION}) string(REGEX REPLACE ^([0-9]+).* \\1 _PYTHON_FIND_MAJ ${_PYTHON_FIND_MAJ_MIN}) -list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN} python${_PYTHON_FIND_MAJ}) +list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN}) unset(_PYTHON_FIND_OTHER_VERSIONS) if(NOT PythonInterp_FIND_VERSION_EXACT) foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS}) if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) +list(APPEND _Python_NAMES python${_PYTHON_V}) endif() endforeach() endif() +list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ}) unset(_PYTHON_FIND_MAJ_MIN) unset(_PYTHON_FIND_MAJ) else() -- 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] 2.8.11rc1 CMAKE_LINKER and CMAKE_OBJCOPY sporadically vanishing
I am trying out CMake 2.8.11rc1 on windows and linux continuous build clients. During clean full rebuilds everything seems to work fine. During incremental Continuous builds with reused build directories however CMAKE_OBJCOPY (on linux gcc; used by me manually) and CMAKE_LINKER (on windows MSVC; used by the static link step) sometimes seem to go missing (the variables are suddenly empty?). I haven't been able to reliably reproduce or find the issue behind it but at least the CMAKE_OBJCOPY problem seems to have gone away by me manually including CMakeFindBinUtils in the context where I used it. When CMAKE_LINKER goes empty I get Dashboard (CDash) errors like this: Command: /lib /nologo [...] - notice the missing linker executable name at the beginning Exit Condition: Error administrating child process: The parameter is incorrect Nils -- Nils Gladitz, B.Sc. DICOM, Konnektivität und Entwicklung Scivis wissenschaftliche Bildverarbeitung GmbH Bertha-von-Suttner-Str. 5 D-37085 Göttingen GERMANY Handelsregister Nr. / Trade Register No. B3100 Göttingen Geschäftsführer / Managing Directors Dr. Gernot Ebel, Dr. Uwe Engeland Tel: 0049 (0)551 634181-28 E-Mail: glad...@scivis.de Web: www.scivis.de -- 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] patch proposal for PythonInterp
Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen: Hi, I have a suggestion for the PythonInterp. On a system I am compiling my code on, I need to find the python binary which is newer than 2.5. However, the default /usr/bin/python is 2.4. If I then set the variable (which is not documented in the header by the way) PythonInterp_FIND_VERSION to 2.5, it will first search for the following list of binary names: python2.5 python2 python. This looks like you are using CMake 2.8.7 or before. Upgrade. Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] 2.8.11rc1 - OSX Lion and Xcode 4.4.1
Hi, I am trying out CMake 2.8.11rc1 on OS X Lion with XCode 4.4.1 When I use the Xcode generator, I get the following messages = -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Configuring done -- Generating done -- Build files have been written to: /Users/nicholas/temp/xcode/build = When I attempt to do a build regardless of the above, I get the following = Xcode 4.4.1 Build version 4F1003 Tan-Meng-Yues-MacBook:build nicholas$ xcodebuild === BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT Project WITH THE DEFAULT CONFIGURATION (Debug) === Check dependencies PhaseScriptExecution CMake Rules build/Project.build/Debug/ZERO_CHECK.build/Script-3F926441115C46B2986F8D6A.sh cd /Users/nicholas/temp/xcode /bin/sh -c /Users/nicholas/temp/xcode/build/Project.build/Debug/ZERO_CHECK.build/Script-3F926441115C46B2986F8D6A.sh echo make -f /Users/nicholas/temp/xcode/build/CMakeScripts/ReRunCMake.make make[1]: *** No rule to make target `/Users/nicholas/temp/xcode/build/CMakeFiles/2.8.11-rc1/CMakeCCompiler.cmake', needed by `/Users/nicholas/temp/xcode/build/CMakeFiles/cmake.check_cache'. Stop. make: *** [/Users/nicholas/temp/xcode/build/CMakeFiles/ZERO_CHECK] Error 2 Command /bin/sh failed with exit code 2 ** BUILD FAILED ** The following build commands failed: PhaseScriptExecution CMake Rules build/Project.build/Debug/ZERO_CHECK.build/Script-3F926441115C46B2986F8D6A.sh (1 failure) = Cheers -- Nicholas Yue Graphics - RenderMan, Visualization, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue https://vimeo.com/channels/naiadtools -- 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] CPack RPM with COMPONENTS packaging
2013/3/20 Theodore Papadopoulo theodore.papadopo...@inria.fr: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/20/2013 05:01 PM, Eric Noulard wrote: 2013/3/20 Theodore Papadopoulo theodore.papadopo...@inria.fr: And do you observe differences when you do that? As I said above, no there is no difference in my case because the set of file is fixed. But the difference will appear if a new file is added in a component. No I don't think so, but I shall check with an example. I'm confident you will see the problem. Theoretical explanation is: the variable (@ or $) get expanded when CPack runs (i.e. at CPack time) not when CMake runs (i.e. at CMake time) so adding a file to the component implies CMakeLists.txt change which will trigger CMake re-run then when CPack run the content of CPACK_RPM_* will be updated as well. But then the $ should be escaped because the ${} are also expanded in the string of the file(WRITE ...). Yes right off-course I make a confusion and forgot we write then configure etc... We need \@. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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] CPack RPM with COMPONENTS packaging
2013/3/20 Theodore Papadopoulo theodore.papadopo...@inria.fr: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Actually, this patch works better... and is much simpler. Yes right. Some other modifications of yours in Source/cmFindBase.cxx Source/cmFindLibraryCommand.cxx Do not belong to that problem, right? I'll strip them off. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to avoid having /D _MBCS ?
In my win project, when I use the visual studio generator (64bit), I always get the /D _MBCS flag in the compiler options (started with msbuild). When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is not defined. I do not want to have it defined. How can I avoid it and still using vcxproj files ? -- Best Regards/Schöne Grüße Martin - Ing. Martin Koller , mailto:martin.kol...@etm.at , http://www.etm.at ETM professional control GmbH, A-7000 Eisenstadt Marktstr. 3 Phone:+43 2682/741-62603, Fax:+43 2682/741-52555 - A: Because it breaks the logical sequence of discussion Q: Why is top posting bad? -- 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 avoid having /D _MBCS ?
On Thu, Mar 21, 2013 at 10:20 AM, Martin Koller martin.kol...@etm.at wrote: In my win project, when I use the visual studio generator (64bit), I always get the /D _MBCS flag in the compiler options (started with msbuild). When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is not defined. I do not want to have it defined. How can I avoid it and still using vcxproj files ? -- I would use remove_definitions(-D_MBCS) x:\x64\VC.110cmake --help-command remove_definitions cmake version 2.8.10.2 remove_definitions Removes -D define flags added by add_definitions. remove_definitions(-DFOO -DBAR ...) Removes flags (added by add_definitions) from the compiler command line for sources in the current directory and below. 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] How to avoid having /D _MBCS ?
On Thursday 21 March 2013 15:29:18 John Drescher wrote: On Thu, Mar 21, 2013 at 10:20 AM, Martin Koller martin.kol...@etm.at wrote: In my win project, when I use the visual studio generator (64bit), I always get the /D _MBCS flag in the compiler options (started with msbuild). When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is not defined. I do not want to have it defined. How can I avoid it and still using vcxproj files ? -- I would use remove_definitions(-D_MBCS) ok, thanks. What I do not like here is: x:\x64\VC.110cmake --help-command remove_definitions cmake version 2.8.10.2 remove_definitions Removes -D define flags added by add_definitions. = I did not use add_definitions, therefore it looks like a hack to remove something I did not add. But I grepped the cmake sources and found another solution: I need to add the /D _SBCS flag. If that's set, cmake does not generate the _MBCS define -- Best regards/Schöne Grüße Martin A: Because it breaks the logical sequence of discussion Q: Why is top posting bad? () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments This mail was not scanned before sending. It was sent from a secure Linux desktop. -- 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] 2.8.11rc1 - OSX Lion and Xcode 4.4.1
On Thu, 21 Mar 2013 22:27:41 +1100, Nicholas Yue said: I am trying out CMake 2.8.11rc1 on OS X Lion with XCode 4.4.1 My dashboard here: http://open.cdash.org/buildSummary.php?buildid=2851443 Is running OS X 10.7.5, CMake 2.8.11rc1, and Xcode 4.4.1. It's able to build (nightly) CMake itself, are you? Cheers, -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada -- 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] patch proposal for PythonInterp
On 21. mars 2013 12:00, Rolf Eike Beer wrote: Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen: Hi, I have a suggestion for the PythonInterp. On a system I am compiling my code on, I need to find the python binary which is newer than 2.5. However, the default /usr/bin/python is 2.4. If I then set the variable (which is not documented in the header by the way) PythonInterp_FIND_VERSION to 2.5, it will first search for the following list of binary names: python2.5 python2 python. This looks like you are using CMake 2.8.7 or before. Upgrade. Eike -- cmake --version cmake version 2.8.10.2 Have a look at line 64 and 79 of FindPythonInterp.cmake. If e.g. PythonInterp_FIND_VERSION is set to 2.5, then _Python_NAMES in line 64 is equal to python2.5;python2;python It then finds python2 or python. Since PYTHON_EXECUTABLE then is found in line 79, it does not check the other versions (2.6 and 2.7). Or? Cheers, Yngve -- 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] Accessing data
Eric Noulard said: Instead of copying you could use cmake -E create_symlink but this won't work on Windows. If building on Windows is required, you could make a symlink, hardlink, or junction point. If on Vista or later, look at the command mklink. Symlinks require admin privileges, but I've read that's not true of hardlinks or junction points. If you have to support building on the FAT filesystem, none of that will work. -- Todd Greer Principal Scientist, Affinegy, Inc. -- 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] patch proposal for PythonInterp
Yngve Inntjore Levinsen wrote: On 21. mars 2013 12:00, Rolf Eike Beer wrote: Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen: Hi, I have a suggestion for the PythonInterp. On a system I am compiling my code on, I need to find the python binary which is newer than 2.5. However, the default /usr/bin/python is 2.4. If I then set the variable (which is not documented in the header by the way) PythonInterp_FIND_VERSION to 2.5, it will first search for the following list of binary names: python2.5 python2 python. This looks like you are using CMake 2.8.7 or before. Upgrade. cmake --version cmake version 2.8.10.2 Have a look at line 64 and 79 of FindPythonInterp.cmake. If e.g. PythonInterp_FIND_VERSION is set to 2.5, then _Python_NAMES in line 64 is equal to python2.5;python2;python It then finds python2 or python. Since PYTHON_EXECUTABLE then is found in line 79, it does not check the other versions (2.6 and 2.7). Or? Oh, you are right. It takes the other versions only into account after doing a first find attempt. This is because it tries to pick up the systems default python for a given major first, e.g. whatever you have configured for python 2.x. But what it doesn't do is drop and search more if that is a too old version. Patches welcome. Eike -- signature.asc Description: This is a digitally signed message part. -- 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] Is there an easy way to time how long build parts take.
Our build it taking a long time, (15+ minutes even when with a massive build farm to distribute compiles across), and the question keeps coming up: what is actually taking so long. Is there an easy way to measure? If there are some top 10 files we might be able to split them (reducing some includes). If it is a link step we might be able to reduce dependencies. Maybe a couple unit tests (some frameworks give this information but not all)? I don't know how to get data so it is difficult to attack the problem. We are using cmake 2.8.10.1 (a few random people have 2.8.11-rc1, results are encouraging: we intend to update everyone when it is released) on ubuntu lucid. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Building an external library based on autotools
Hello, I'm having a hard time figuring out which solution to choose to build a library (FFmpeg) based on autotools from CMake, and I have the impression I'm going the tricky way. I know how to run the FFmpeg's configure and make scripts with the right options from a bash script. I made a CMake function (based on add_custom_command()) that is able to run any bash script on both Windows and Unix OSs. Thus I could manually (from CMake) launch a FFmpeg build with the previous statements. But the main disadvantage with this solution is the following one: the enabled video decoders are defined in a CMake variable (a list) that the user can define in the CMake GUI; I would like FFmpeg to be rebuilt only when this variable changes, but at the moment FFmpeg is always rebuilt. FFmpeg is based on autotools (configure, make, etc). I've read a lot about add_custom_command(), add_custom_target() and ExternalProject_Add() but I still don't know what's the way to go. The issues I've seen with these are: - add_custom_command() will be always executed when I build the target that needs FFmpeg, even if FFmpeg is already built and that no setting changed - add_custom_target() is always built too - ExternalProject_Add() would directly execute the configure command without going through my portable bash launcher (see P.S.) What I would like is my custom build to be dependent on some CMake variables, I don't know if it's possible. Dependencies about some output files isn't the most important to me, because I won't be modifying the FFmpeg sources more than once every few months. And the FFmpeg sources are already in my repo so I've no need for automatic download. Regards, Lucas SOLTIC P.S.: details about the portable Bash launcher for those who'd like to know: The portable Bash launcher I made still requires MinGW to be installed if one wants to build from Visual Studio, but the user doesn't need to care about any command line interpreter. It's composed of 3 files: RunShellCommand.cmake, BatchBridgeToShell.bat and RunShellCommand.sh. When being run from Visual Studio, RunShellCommand() (defined in RunShellCommand.cmake) will run the bat file that will run the shell script. Otherwise RunShellCommand() will directly launch RunShellCommand.sh. RunShellCommand.cmake is as follow: function(RunShell target phase shell_command) set(cmd ${ARGV}) list(REMOVE_AT cmd 0 1) if (MSVC) add_custom_command(TARGET ${target} ${phase} COMMAND BatchBridgeToShell ARGS ${MINGW_DIR} ${cmd} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) else() add_custom_command(TARGET ${target} ${phase} COMMAND bash ARGS -c \${cmd}\ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) endif() endfunction(RunShell) BatchBridgeToShell.bat is as follows: PATH %1/msys/1.0/bin;%1/bin;%path% bash -c ./RunShellCommand.sh --from-batch %* RunShellCommand.sh is as follows: #!/bin/bash # Shell script to run the command given as parameter # If this script is called from a batch script, it is expected to have # two unneeded parameters if [ $1 == --from-batch ] then shift # drop --from-batch shift # drop mingw param fi # execute $@ -- 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] Getting coredump from ctest
Hi, Is there a way to get a coredumps from failures that happen durink 'make test'? Thanks, Martin -- 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] 2.8.11rc1 - OSX Lion and Xcode 4.4.1
On 22/03/13 2:19 AM, Sean McBride wrote: On Thu, 21 Mar 2013 22:27:41 +1100, Nicholas Yue said: I am trying out CMake 2.8.11rc1 on OS X Lion with XCode 4.4.1 My dashboard here: http://open.cdash.org/buildSummary.php?buildid=2851443 Is running OS X 10.7.5, CMake 2.8.11rc1, and Xcode 4.4.1. It's able to build (nightly) CMake itself, are you? I am running OS X 10.7.4 I am able to build CMake itself successfully. It's just that cmakexbuild is not able to compile a simple project which it creates itself. The simple project is just a single helloworld.cpp i.e. ADD_EXECUTABLE ( helloworld helloworld.cpp) Cheers -- Nicholas Yue Graphics - RenderMan, Visualization, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue https://vimeo.com/channels/naiadtools -- 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] Is there an easy way to time how long build parts take.
2013/3/21 Miller Henry millerhe...@johndeere.com: Our build it taking a long time, (15+ minutes even when with a massive build farm to distribute compiles across), and the question keeps coming up: what is actually taking so long. Is there an easy way to measure? Your build certainly have a lot of different targets. 1) first you can have a broad look at the overall target dependencies cd builddir cmake --graphiz=yourproject.dot . then render/display the dot file with graphviz dot tool. 2) Try to measure the time of the build of the leaf node of the preceding graph in order to see if any target takes a big part of the build. With this rough target by target analysis you should begin to have some idea on where is the problem. Some complementary questions: 1) Where do your source tree and build tree reside? Are they on a local disk or a network share? If they are on a network share could try a pure local disk build and compare the timings. 2) Which generator/build tool do you use? Ninja, Make, on the command line? from within eclipse/codeblocks? If there are some top 10 files we might be able to split them (reducing some includes). If it is a link step we might be able to reduce dependencies. Maybe a couple unit tests (some frameworks give this information but not all)? I don’t know how to get data so it is difficult to attack the problem. We are using cmake 2.8.10.1 (a few random people have 2.8.11-rc1, results are encouraging: we intend to update everyone when it is released) on ubuntu lucid. Does the build/make take 15+ minutes or the configuration/CMake part? How does a no-op build behave? i.e. when you've just build your project how much time takes a second (normally no-op) build in the same build tree? -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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] Getting coredump from ctest
2013/3/21 Martin Sustrik sust...@250bpm.com Hi, Is there a way to get a coredumps from failures that happen durink 'make test'? Thanks, Martin -- What do you mean by get coredump? Any crash should produce core if ulimit -c unlimited set. -- Best Regards, Sergei Nikulov -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v2.8.10.2-921-g8bffce9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 8bffce955d2b906981779b39752a6836a7216c3c (commit) from aa16a433d3634d668c211b1aa5b13271b85dffc8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8bffce955d2b906981779b39752a6836a7216c3c commit 8bffce955d2b906981779b39752a6836a7216c3c Author: Kitware Robot kwro...@kitware.com AuthorDate: Fri Mar 22 00:01:08 2013 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Fri Mar 22 00:01:08 2013 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index bd315c0..d3bbf1e 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 10) -set(CMake_VERSION_TWEAK 20130321) +set(CMake_VERSION_TWEAK 20130322) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits