[cmake-developers] Contributing to CMake Server
Hi, I'm looking to do a bit more CMake development and the CMake server project looks interesting. Does this area still need more contributors and what's the best way to see what tasks there are? Thanks, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Review request: extract-cmMessenger branch
Yes. Did you have a close look at the commits? I'm not really sure they are correct, and I wonder if you have any thoughts on the first one which discusses interface? I went back and had a closer look at the major changes. I think on the whole the cmMessenger class is good and a clear improvement over the previous organisation, however I imagine in its current form it would be perhaps a bit tricky extending it for other environments (e.g. displaying messages as GUI modal notifications), which I understood to be one of the overall aims of the branch (correct me if I've misunderstood of course though). I would be tempted to make the following changes to the cmMessenger class: * Make cmMessenger an abstract class, and have the IssueMessage methods pure virtual here, then create an extension containing the current implementations called cmConsoleMessenger or something. The name cmMessenger suggests a fairly generic concept, but the current implementation feels geared around a console, though that's just my thoughts. * Make the IsMessageTypeVisible and ConvertMessageType methods virtual and protected, to make it easier to override their behaviour in extensions of the base class. * Change printMessagePreamble to return void * Rename printMessagePreamble to appendMessagePreamble or something to better reflect what its doing, similar change to printMessageText as well * Move the different parts to displayMessage into individual methods, e.g. adding the notes about warning suppression * Append notes for DEPRECATED_WARNING and DEPRECATED_ERROR message types, or remove the current notes, to be consistent I don't really have any other comments for the other commits. I was wondering if it would be possible to move away from accessing the cmMessenger class through the cmake / cmMakefile class, but then if we do want to slot it new implementations easily I imagine the current organisation would facilitate that quite well so it wouldn't be worth changing. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Most of that change appears to be just the number of spaces after a period. I prefer two which is why the original message was that way. Ah fair enough, I assumed the two spaces was a typo and was meant to be just one space. Yes essentially the third patch just replaces the two spaces with one, so it can be just ignored in this case. IIRC we previously concluded that the individual callers don't have to deal with the message type change so long as the overall process exits with an error. Is this currently achieved by the patch? Yes that will now happen with the patch, the cmake::displayMessage method will set the error occurred flag, though not the fatal flag, when a deprecation or author error message is displayed. In this case I think there are no issues I'm aware of with the proposed changes. If there are any problems with the proposed changes let me know. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Hi Brad, To round off the -W options functionality, I've implemented the -Werror and -Wno-error set of options for the two current types of messages, dev and deprecated. This includes updating the QT GUI to include new options for controlling this functionality. The third patch is not for new functionality, but addresses two small inconsistencies relating to dev and deprecated messages functionality, it's not needed at the end of the day but I thought it would be good to make the code consistent while I was in the area. Lastly I'm also looking at changing all the current usages of the cmake::IssueMessage command, where the message type is dev warning. To check if the warning got upgraded to an error (by checking if the error state has been signalled with the cmSystemTools class), and change the return value of the calling function for example. I think this was discussed previously, however I think this might not be the right change to make. There's quite a few instances of the above code and changing them all is dangerous I imagine where I don't know exactly what all of the callers are generally doing and should be doing. It also implies an undocumented rule that future users of the above functionality should also do this check, which doesn't sound like a good idea to me. What are your thoughts on this last point? Cheers, Michael >From 319afb022cae89d64bc9075e2a686966971cda1c Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Mon, 21 Dec 2015 21:39:27 + Subject: [PATCH 1/3] Implement -Werror and -Wno-error cmake options Expanded the -W set of cmake options to include support for the -Werror and -Wno-error format, which is used to control upgrading and downgrading warning and error messages. Implemented support for these new formats for the dev and deprecated message types. Added tests and updated documentation for new options. --- Help/manual/OPTIONS_BUILD.txt | 24 +++ Help/release/dev/cmake-W-options.rst | 7 + Source/cmMessageCommand.cxx| 29 +-- Source/cmake.cxx | 200 - Source/cmake.h | 42 - Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 22 +++ Tests/RunCMake/CommandLine/W_bad-arg3-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt | 2 + .../CommandLine/Werror_deprecated-result.txt | 1 + .../CommandLine/Werror_deprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Werror_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Werror_dev-result.txt | 1 + Tests/RunCMake/CommandLine/Werror_dev-stderr.txt | 11 ++ Tests/RunCMake/CommandLine/Werror_dev.cmake| 7 + .../CommandLine/Wno-error_deprecated-stderr.txt| 4 + .../CommandLine/Wno-error_deprecated.cmake | 2 + .../RunCMake/CommandLine/Wno-error_dev-stderr.txt | 11 ++ Tests/RunCMake/CommandLine/Wno-error_dev.cmake | 7 + Tests/RunCMake/message/RunCMakeTest.cmake | 6 +- Tests/RunCMake/message/errormessage-result.txt | 1 - Tests/RunCMake/message/errormessage-stderr.txt | 4 - Tests/RunCMake/message/errormessage.cmake | 4 - .../message/errormessage_deprecated-result.txt | 1 + .../message/errormessage_deprecated-stderr.txt | 4 + .../RunCMake/message/errormessage_deprecated.cmake | 3 + Tests/RunCMake/message/errormessage_dev-result.txt | 1 + Tests/RunCMake/message/errormessage_dev-stderr.txt | 5 + Tests/RunCMake/message/errormessage_dev.cmake | 3 + 28 files changed, 372 insertions(+), 36 deletions(-) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_dev-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_dev-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_dev.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wno-error_dev.cmake delete mode 100644 Tests/RunCMake/message/errormessage-result.txt delete mode 100644 Tests/RunCMake/message/errormessage-stderr.txt delete mode 100644 Tests/RunCMake/message/errormessage.cmake create mode 100644 Tests/RunCMake/message/errormessage_deprecated-result.txt create mode 100644 Tests/RunCMake/message/errormessage_deprecated-stderr.txt create mode 100644 Tests/RunCMake/message/errormessage_deprecated.cmake create mode 100
Re: [cmake-developers] Add command line options for deprecation message control
I noticed one glitch. I built against Qt 5.5.1 on Linux and the option dialog seems to truncate the labels. I think I've fixed it, by using vertical layouts rather than form layouts and setting the size policy to expanding for the widgets, if that doesn't fix I'll need to look into QT in more depth as I've not got much experience with it. Which Linux distro did you notice it in, looks like gnome3? Patches for the fix are attached. Cheers, Michael >From 320d791eb6f97e590716c555da0345de31e65cfc Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 6 Dec 2015 12:33:13 + Subject: [PATCH 1/2] Warning messages options in cmake-gui Created a new dialog window for the cmake-gui, which provides controls for setting the state of suppression of developer and deprecated warning messages. This replaces the previous single checkbox for setting the state of suppression of developer warnings. Added a note for the new functionality to the release notes. --- Help/release/dev/cmake-W-options.rst | 3 + Source/QtDialog/CMakeLists.txt| 4 + Source/QtDialog/CMakeSetupDialog.cxx | 15 ++-- Source/QtDialog/CMakeSetupDialog.h| 3 +- Source/QtDialog/QCMake.cxx| 18 - Source/QtDialog/QCMake.h | 7 +- Source/QtDialog/WarningMessagesDialog.cxx | 43 +++ Source/QtDialog/WarningMessagesDialog.h | 53 + Source/QtDialog/WarningMessagesDialog.ui | 120 ++ Source/cmake.cxx | 33 +++- Source/cmake.h| 7 ++ 11 files changed, 292 insertions(+), 14 deletions(-) create mode 100644 Source/QtDialog/WarningMessagesDialog.cxx create mode 100644 Source/QtDialog/WarningMessagesDialog.h create mode 100644 Source/QtDialog/WarningMessagesDialog.ui diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst index 57d375f..38e71f9 100644 --- a/Help/release/dev/cmake-W-options.rst +++ b/Help/release/dev/cmake-W-options.rst @@ -10,3 +10,6 @@ cmake-W-options * Warnings about deprecated functionality are now enabled by default. They may be suppressed with ``-Wno-deprecated`` or by setting the :variable:`CMAKE_WARN_DEPRECATED` variable to false. + +* Warnings about deprecated functionality can now be controlled in the + :manual:`cmake-gui(1)` application. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index cad11f5..9161ad3 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -115,6 +115,8 @@ set(SRCS QCMakeWidgets.h RegexExplorer.cxx RegexExplorer.h + WarningMessagesDialog.cxx + WarningMessagesDialog.h ) QT4_WRAP_UI(UI_SRCS CMakeSetupDialog.ui @@ -122,6 +124,7 @@ QT4_WRAP_UI(UI_SRCS CrossCompiler.ui AddCacheEntry.ui RegexExplorer.ui + WarningMessagesDialog.ui ) QT4_WRAP_CPP(MOC_SRCS AddCacheEntry.h @@ -132,6 +135,7 @@ QT4_WRAP_CPP(MOC_SRCS QCMakeCacheView.h QCMakeWidgets.h RegexExplorer.h + WarningMessagesDialog.h ) QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 2b12834..2fc4faf 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -34,6 +34,7 @@ #include "AddCacheEntry.h" #include "FirstConfigure.h" #include "RegexExplorer.h" +#include "WarningMessagesDialog.h" #include "cmSystemTools.h" #include "cmVersion.h" @@ -145,9 +146,8 @@ CMakeSetupDialog::CMakeSetupDialog() this, SLOT(doOutputErrorNext())); // in Eclipse QMenu* OptionsMenu = this->menuBar()->addMenu(tr("")); - this->SuppressDevWarningsAction = -OptionsMenu->addAction(tr(" dev Warnings (-Wno-dev)")); - this->SuppressDevWarningsAction->setCheckable(true); + OptionsMenu->addAction(tr("Warning Messages..."), + this, SLOT(doWarningMessagesDialog())); this->WarnUninitializedAction = OptionsMenu->addAction(tr(" Uninitialized (--warn-uninitialized)")); this->WarnUninitializedAction->setCheckable(true); @@ -278,9 +278,6 @@ void CMakeSetupDialog::initialize() QObject::connect(this->AddEntry, SIGNAL(clicked(bool)), this, SLOT(addCacheEntry())); - QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), - this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool))); - QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)), this->CMakeThread->cmakeInstance(), SLOT(setWarnUninitializedMode(bool))); @@ -1369,3 +1366,9 @@ void CMakeSetupDialog::doOutputErrorNext() this->Output->setTextCursor(textCursor); } } + +void CM
Re: [cmake-developers] Add command line options for deprecation message control
Let's start with the toggle because that will make cmake-gui able to set the option just like the command line. Sounds good, that's what I was thinking as well. Also I'm not sure what to do about persistence of the option check boxes in cmake-gui when selecting a different build tree. As a user I may expect those options to be loaded from the current cache in each build tree I select. The build tree is selected by changing the source directory setting in the GUI right? So it should get the state of the checkboxes based on the cache whenever this changes. Adding in one toggle would be fine, but I imagine that when we come to adding support for upgrading warnings to errors, the additional two checkboxes would be a bit much. I was thinking of perhaps instead having just one entry in the options menu, which opens up a sub-window which contains the group of message related options. Cheers, Michale -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Actually when one choose a build tree it will locate the corresponding source tree automatically if both exist. Selecting the source tree may be followed by creating a new build tree so that direction does not happen automatically IIRC. Okay, I'm not too familiar with the GUI, how do you choose a build tree? So that I can look at where I can hook in the message cache detection. Your mailer broke the thread again. Sorry, this one shouldn't break the thread. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Thanks. Applied with minor tweaks and merged to 'next' for testing: That's great, thanks. Now that the patches are in, would you say it's better to work on adding a deprecated toggle option to the cmake-gui, or to work on adding support for upgrading warnings to errors? Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Great, I've changed the nullptr references to NULL instead. Cheers, Michael >From 02016a44d1f6f571b96c54a0008c37e2e1fa3b7d Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 1 Nov 2015 16:05:15 + Subject: [PATCH 1/8] Tests: Revise message in RunCMake.CommandLine -Wdev case Use more prose-like capitalization. --- Tests/RunCMake/CommandLine/Wdev-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wdev.cmake | 2 +- Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index 92c1d23..88cfb3a 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -1,5 +1,5 @@ ^CMake Warning \(dev\) at Wdev.cmake:1 \(message\): - Some Author Warning + Some author warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CommandLine/Wdev.cmake b/Tests/RunCMake/CommandLine/Wdev.cmake index e5026ef..756f31e 100644 --- a/Tests/RunCMake/CommandLine/Wdev.cmake +++ b/Tests/RunCMake/CommandLine/Wdev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # with -Wdev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also diff --git a/Tests/RunCMake/CommandLine/Wno-dev.cmake b/Tests/RunCMake/CommandLine/Wno-dev.cmake index d81b858..802b435 100644 --- a/Tests/RunCMake/CommandLine/Wno-dev.cmake +++ b/Tests/RunCMake/CommandLine/Wno-dev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # without -Wno-dev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also -- 2.5.0 >From 10801dab11c8e81ac351f725c37e30555f7febcf Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 8 Nov 2015 12:20:47 + Subject: [PATCH 2/8] Make message suppression more consistent. Make the message suppression more consistent, by adding a check for the message related CMake variables in cmake::IssueMessage, which allows callers of IssueMessage other than the message command to behave as expected. Also added a check for CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to mirror the deprecated message type behaviour. Added a 'force' flag to the cmake::IssueMessage method, to make the message suppression consistent, when setting the message related CMake variables directly in a CMake file. Expand message command tests to cover the AUTHOR_WARNING message type as well. --- Source/cmMakefile.cxx | 8 +-- Source/cmMakefile.h | 3 +- Source/cmMessageCommand.cxx | 12 - Source/cmake.cxx | 70 ++- Source/cmake.h| 12 - Tests/RunCMake/message/nomessage.cmake| 4 ++ Tests/RunCMake/message/warnmessage-stderr.txt | 11 - Tests/RunCMake/message/warnmessage.cmake | 6 ++- 8 files changed, 102 insertions(+), 24 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a1f143a..fd93a41 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -130,7 +130,8 @@ cmMakefile::~cmMakefile() // void cmMakefile::IssueMessage(cmake::MessageType t, - std::string const& text) const + std::string const& text, + bool force) const { // Collect context information. if(!this->ExecutionStatusStack.empty()) @@ -139,7 +140,8 @@ void cmMakefile::IssueMessage(cmake::MessageType t, { this->ExecutionStatusStack.back()->SetNestedError(true); } -this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); +this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace(), + force); } else { @@ -154,7 +156,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t, lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME); } lfc.Line = 0; -this->GetCMakeInstance()->IssueMessage(t, text, lfc); +this->GetCMakeInstance()->IssueMessage(t, text, lfc, force); } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4215b72..e89f772 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -719,7 +719,8 @@ public: }; void IssueMessage(cmake::MessageType t, -
Re: [cmake-developers] Add command line options for deprecation message control
Hi Brad, The hunk I included at the bottom of the message Ah yeah, sorry missed that part in the message, I understand the change that needs to be done now. The current caching logic still needs some work One idea that comes to mind, is to change it so that it doesn't enable dev/deprecated warnings by default by setting the DiagLevels map, instead we create a specific function to get the status of dev warnings suppression, which checks the cache variables (now set only if user explicitly used -W options) but by default returns a value to signify enable dev warnings. I think this would get around the mentioned issue, but needs some playing about with to see if its a solution. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
In particular, I moved the hunk below forward to "Modify dev warning options to affect deprecated warnings", the commit where it actually becomes needed because the default changes. I'm not sure I follow, which hunk are we talking about here? Please add a Help/release/dev/cmake-W-options.rst file with release notes for these changes. Okay no problem. This means that adding "-Wno-dev" on a non-initial configuration will not disable deprecation warnings because CMAKE_WARN_DEPRECATED is already cached even though no explicit -W option was given before. Ah that's a good point, I hadn't considered that set of steps, thanks. As a user I may expect those options to be loaded from the current cache in each build tree I select. Okay well I'll remove the related patch from the set for now and come back to it after we've got the main sorted out and applied. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Here's also a further patch for this set, to add the option to suppress deprecated warning messages to the QT GUI. I'm not sure if it matters or not about the "[PATCH 1/X]" in the patch's subject line, so I've attached the other patches in the set again just with an updated count, in case it does matter. Cheers, Michael >From cc16db0e2c818714034e2948a0b3b16b7774252f Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 15 Nov 2015 17:47:12 + Subject: [PATCH 8/8] GUI option for deprecated warning messages suppression. Add an option to the CMake GUI to toggle suppression of deprecated warning messages. --- Source/QtDialog/CMakeSetupDialog.cxx | 8 Source/QtDialog/CMakeSetupDialog.h | 1 + Source/QtDialog/QCMake.cxx | 8 Source/QtDialog/QCMake.h | 3 +++ Source/cmake.cxx | 15 +++ Source/cmake.h | 1 + 6 files changed, 36 insertions(+) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 03417f3..61d6b1d 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -144,6 +144,10 @@ CMakeSetupDialog::CMakeSetupDialog() this->SuppressDevWarningsAction = OptionsMenu->addAction(tr(" dev Warnings (-Wno-dev)")); this->SuppressDevWarningsAction->setCheckable(true); + this->SuppressDeprecatedWarningsAction = +OptionsMenu->addAction( + tr(" Deprecated Warnings (-Wno-deprecated)")); + this->SuppressDeprecatedWarningsAction->setCheckable(true); this->WarnUninitializedAction = OptionsMenu->addAction(tr(" Uninitialized (--warn-uninitialized)")); this->WarnUninitializedAction->setCheckable(true); @@ -276,6 +280,10 @@ void CMakeSetupDialog::initialize() QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool))); + QObject::connect(this->SuppressDeprecatedWarningsAction, + SIGNAL(triggered(bool)), + this->CMakeThread->cmakeInstance(), + SLOT(setSuppressDeprecatedWarnings(bool))); QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)), this->CMakeThread->cmakeInstance(), diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 1b26c64..6cc8de3 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -102,6 +102,7 @@ protected: QAction* ConfigureAction; QAction* GenerateAction; QAction* SuppressDevWarningsAction; + QAction* SuppressDeprecatedWarningsAction; QAction* WarnUninitializedAction; QAction* WarnUnusedAction; QAction* InstallForCommandLineAction; diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 9edbb20..c1c7005 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -28,6 +28,7 @@ QCMake::QCMake(QObject* p) : QObject(p) { this->SuppressDevWarnings = false; + this->SuppressDeprecatedWarnings = false; this->WarnUninitializedMode = false; this->WarnUnusedMode = false; qRegisterMetaType(); @@ -151,6 +152,8 @@ void QCMake::configure() this->CMakeInstance->SetGeneratorToolset(""); this->CMakeInstance->LoadCache(); this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings); + this->CMakeInstance->SetSuppressDeprecatedWarnings( +this->SuppressDeprecatedWarnings); this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode); this->CMakeInstance->SetWarnUnused(this->WarnUnusedMode); this->CMakeInstance->PreLoadCMakeFiles(); @@ -445,6 +448,11 @@ void QCMake::setSuppressDevWarnings(bool value) this->SuppressDevWarnings = value; } +void QCMake::setSuppressDeprecatedWarnings(bool value) +{ + this->SuppressDeprecatedWarnings = value; +} + void QCMake::setWarnUninitializedMode(bool value) { this->WarnUninitializedMode = value; diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index d910eb7..a50f8ae 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -89,6 +89,8 @@ public slots: void setDebugOutput(bool); /// set whether to do suppress dev warnings void setSuppressDevWarnings(bool value); + /// set whether to do suppress deprecated warnings + void setSuppressDeprecatedWarnings(bool value); /// set whether to run cmake with warnings about uninitialized variables void setWarnUninitializedMode(bool value); /// set whether to run cmake with warnings about unused variables @@ -141,6 +143,7 @@ protected: static void stdoutCallback(const char* msg, size_t len, void* cd); static void stderrCallback(const char* msg, size_t len,
Re: [cmake-developers] Add command line options for deprecation message control
Hi Brad, Here's the original patch split up into smaller more specific patches. Let me know if there's any issues or if everything's okay, so I can continue with the rest of the intended changes. Cheers, Michael From 48d8c38c7b5724e4b6b53fa8647046c96cec603b Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 1 Nov 2015 16:05:15 + Subject: [PATCH 1/7] Tests: Revise message in RunCMake.CommandLine -Wdev case Use more prose-like capitalization. --- Tests/RunCMake/CommandLine/Wdev-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wdev.cmake | 2 +- Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index 92c1d23..88cfb3a 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -1,5 +1,5 @@ ^CMake Warning \(dev\) at Wdev.cmake:1 \(message\): - Some Author Warning + Some author warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CommandLine/Wdev.cmake b/Tests/RunCMake/CommandLine/Wdev.cmake index e5026ef..756f31e 100644 --- a/Tests/RunCMake/CommandLine/Wdev.cmake +++ b/Tests/RunCMake/CommandLine/Wdev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # with -Wdev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also diff --git a/Tests/RunCMake/CommandLine/Wno-dev.cmake b/Tests/RunCMake/CommandLine/Wno-dev.cmake index d81b858..802b435 100644 --- a/Tests/RunCMake/CommandLine/Wno-dev.cmake +++ b/Tests/RunCMake/CommandLine/Wno-dev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # without -Wno-dev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also -- 2.1.4 From e60002e10f2ea10cadac74bd8c3a2d23cb35be4a Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 8 Nov 2015 12:20:47 + Subject: [PATCH 2/7] Make message suppression more consistent. Make the message suppression more consistent, by adding a check for the message related CMake variables in cmake::IssueMessage, which allows callers of IssueMessage other than the message command to behave as expected. Also added a check for CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to mirror the deprecated message type behaviour. Added a 'force' flag to the cmake::IssueMessage method, to make the message suppression consistent, when setting the message related CMake variables directly in a CMake file. Expand message command tests to cover the AUTHOR_WARNING message type as well. --- Source/cmMakefile.cxx | 8 +-- Source/cmMakefile.h | 3 +- Source/cmMessageCommand.cxx | 12 - Source/cmake.cxx | 70 ++- Source/cmake.h| 12 - Tests/RunCMake/message/nomessage.cmake| 5 ++ Tests/RunCMake/message/warnmessage-stderr.txt | 11 - Tests/RunCMake/message/warnmessage.cmake | 6 ++- 8 files changed, 103 insertions(+), 24 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a1f143a..fd93a41 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -130,7 +130,8 @@ cmMakefile::~cmMakefile() // void cmMakefile::IssueMessage(cmake::MessageType t, - std::string const& text) const + std::string const& text, + bool force) const { // Collect context information. if(!this->ExecutionStatusStack.empty()) @@ -139,7 +140,8 @@ void cmMakefile::IssueMessage(cmake::MessageType t, { this->ExecutionStatusStack.back()->SetNestedError(true); } -this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); +this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace(), + force); } else { @@ -154,7 +156,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t, lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME); } lfc.Line = 0; -this->GetCMakeInstance()->IssueMessage(t, text, lfc); +this->GetCMakeInstance()->IssueMessage(t, text, lfc, force); } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4215b72..e89f772 100644 --- a/Source/cm
Re: [cmake-developers] Add command line options for deprecation message control
The goal of the old logic was to avoid populating the settings in the cache if they are left as default. Instead you could check whether any "dev" value has been set *after* parsing the options and if not then set it to the default. Ah okay I understand, that's no problem. I've pretty much finished splitting up the original patch into about seven separate patches, should be able to submit later on this week. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Thanks for the feedback. Please split up the rest of the patch into a series of steps like that Okay I'll see if I can break it down further. ignoreWarningLevels => force Yes that does sound better, thanks. increments the count by default instead of only when an explicit option has been set. Please revise accordingly based on the attached state. I don't quite follow. Setting "dev" to DIAG_WARN in DiagLevels, before the users input is parsed (which will override the default "dev" value, if any is specified), seems the clearest and most straightforward way to enable author *and **deprecate**d *warnings by default. What would the alternative be, apart from having another instance where the applicable CMake variables are set? Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
The semantic challenges are in the warning=>error conversion so I'd like to get the other parts reviewed and integrated first. I've attached a version of the patch without the conversion functionality, for dev messages only, as the deprecated section wasn't part of this patch. I've also not included rst files in the commit, as it seems like a waste of time to revert them now and then change them back to what they should be afterwards. In the find commit the rst files will of course be in there. One noticeable difference in this patch is the addition of an optional parameter to cmake::IssueMessage. This is intended to solve the future issue that the message command must support the setting the warning/error CMake variables in the CMake file itself, by changing the message type, whereas cmake::IssueMessage will only be checking the cache for the variables. If there are any issues with this first chunk please let me know. Cheers, Michael From 14ab5c6e0c46fc60ed9007fa06ce9b3c135e3150 Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Sun, 1 Nov 2015 16:05:15 + Subject: [PATCH] Add -W options to control deprecation and author warnings Refactor the -Wdev and -Wno-dev options parser to use a generic -W parser that follows the GCC pattern, excluding support for -Werror=TYPE and -Wno-error=TYPE formats for now. Add 'deprecated' warning options type, to allow setting CMAKE_WARN_DEPRECATED via the -W options. Add tests for new options. --- Source/cmMakefile.cxx | 8 +- Source/cmMakefile.h | 3 +- Source/cmMessageCommand.cxx | 12 +- Source/cmake.cxx | 329 +++--- Source/cmake.h| 34 ++- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 37 ++- Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wdev-stderr.txt| 2 +- Tests/RunCMake/CommandLine/Wdev.cmake | 2 +- Tests/RunCMake/CommandLine/Wno-deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 +- Tests/RunCMake/message/RunCMakeTest.cmake | 1 + Tests/RunCMake/message/defaultmessage-result.txt | 1 + Tests/RunCMake/message/defaultmessage-stderr.txt | 11 + Tests/RunCMake/message/defaultmessage.cmake | 4 + Tests/RunCMake/message/nomessage.cmake| 13 + 21 files changed, 407 insertions(+), 64 deletions(-) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake create mode 100644 Tests/RunCMake/message/defaultmessage-result.txt create mode 100644 Tests/RunCMake/message/defaultmessage-stderr.txt create mode 100644 Tests/RunCMake/message/defaultmessage.cmake diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a1f143a..0eeb6ca 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -130,7 +130,8 @@ cmMakefile::~cmMakefile() // void cmMakefile::IssueMessage(cmake::MessageType t, - std::string const& text) const + std::string const& text, + bool ignoreWarningLevels) const { // Collect context information. if(!this->ExecutionStatusStack.empty()) @@ -139,7 +140,8 @@ void cmMakefile::IssueMessage(cmake::MessageType t, { this->ExecutionStatusStack.back()->SetNestedError(true); } -this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); +this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace(), +ignoreWarningLevels); } else { @@ -154,7 +156,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t, lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME); } lfc.Line = 0; -this->GetCMakeInstance()->IssueMessage(t, text, lfc); +this->GetCMakeInstance()->IssueMessage(t, text, lfc, ignoreWarningLevels); } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4215b72..878c13d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -71
Re: [cmake-developers] Add command line options for deprecation message control
that appear to be related to warning=>error upgrade options. Didn't we just decide to not tackle this part yet? They were part of the original patch a while ago, so I left them in when I re-applied the proposed patch. Did you want to apply the changes piece by piece, or just the review the changes piece by piece? I can tailor the proposed patch(s) to suit either I imagine. I realised that the patch has some somewhat conflicting changes in it, in that the cmMessageCommand code checks the Makefile for the variables, but the cmake code checks the cache. So when the user say turns on deprecated errors in the CMakeLists file, cmMessageCommand sets the messages as errors, but then the cmake code suppresses the message. So I need to fix that in the subsequent proposed patch(s). I was thinking of adding a boolean flag parameter to IssueMessage, default to false, to signal the method to not suppress messages based on the state of the CMake variables, but there's perhaps better ways to do this. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Hi Brad, Let's work out the command line options for the existing deprecation warning/error options first and then extend capabilities as a second step. It will be easier to review in smaller pieces anyway. Okay no problem, I'll try and break the changes down into chunks for review. I've made the first set of changes, to reapply the series of previous changes for the -W options, along with some tweaks to improve the implementation and some additional tests for the changes. Let me know if there are any issues with the proposed changes. The changes in the patch for the Help files are the same as before, so they can probably be skimmed over to be honest, likewise the changes in cmMessageCommand are the same as before too. The next stage would then be to add support for upgrading and downgrading warning and error messages depending on the state of the CMake variables, in the IssueMessage function, and update the callers of the function to check the error flag and take appropriate action. Cheers, Michael From 8d7aae1411331b980bd5d7515e5f7326db5890cb Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Fri, 23 Oct 2015 19:48:58 +0100 Subject: [PATCH] Add -W options to control deprecation and author warnings and errors Refactor the -Wdev and -Wno-dev options parser to use a generic -W parser that follows the GCC pattern, which includes support for -Werror=TYPE and -Wno-error=TYPE formats. Add 'deprecated' warning options type, to allow setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the -W options. Add -Werror=dev and -Wno-error=dev options so that dev warning options are in line with deprecated warning options. Use a new CMAKE_SUPPRESS_DEVELOPER_ERRORS internal cache entry to store the above new dev options persistently. Add tests for new options and updated cmake documentation and release notes to list new options. --- Help/manual/OPTIONS_BUILD.txt | 43 ++- Help/release/dev/cmake-W-options.rst | 13 + Help/variable/CMAKE_ERROR_DEPRECATED.rst | 8 +- Help/variable/CMAKE_WARN_DEPRECATED.rst| 6 +- Source/cmMessageCommand.cxx| 14 +- Source/cmake.cxx | 297 ++--- Source/cmake.h | 27 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 59 +++- Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg3-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wdev-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wdev.cmake | 2 +- .../CommandLine/Werror_deprecated-result.txt | 1 + .../CommandLine/Werror_deprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Werror_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Werror_dev-result.txt | 1 + Tests/RunCMake/CommandLine/Werror_dev-stderr.txt | 5 + Tests/RunCMake/CommandLine/Werror_dev.cmake| 1 + Tests/RunCMake/CommandLine/Wno-deprecated.cmake| 1 + Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 +- .../CommandLine/Wno-error_deprecated.cmake | 2 + Tests/RunCMake/CommandLine/Wno-error_dev.cmake | 2 + 28 files changed, 447 insertions(+), 58 deletions(-) create mode 100644 Help/release/dev/cmake-W-options.rst create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_dev-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_dev-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_dev.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_dev.cmake diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt
Re: [cmake-developers] Add command line options for deprecation message control
I think having local CMAKE_WARN_DEPRECATED/CMAKE_ERROR_DEPRECATED vars can be left as specific to the message() command (and perhaps other IssueMessage callers as deemed appropriate per-case). Otherwise we should just have one global setting. Okay that sounds good to me, makes the implementation simpler. We just need to make sure the process exit code is changed. If this is the case then just ensuring that IssueMessage sets the fatal error occurred flag, on a (upgraded or not) author or deprecated error as planned, may achieve this as it looks like cmake::Generate changes its return code if the error flag is set, but perhaps I'm mistaken or other code paths don't have this behaviour. So I probably wouldn't feel confident on relying on just setting the flag in IssueMessage. We may not have to update all callers to achieve this; it would only be an optimization. OTOH perhaps we should defer this part until after the main warning control command-line options are worked out. That sounds sensible, I'll make the proposed changes to the cmake and cmMessageCommand classes first, get some adequate tests in and then move on to updating the callers. I don't think it'll be a massive task to update the callers so I'm not particularly worried about that part, hopefully there won't be any surprises though. I'm aiming to get a first patch proposal done by the end of this week. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Hi Brad, I was thinking of coming back to issue of the deprecation and author message options, now that CMake 3.4 has been released, is now a suitable time for it? I was thinking of ideas and one came to mind, how does the following sound? We modify cmake::IssueMessage to check the relevant CMake variables to determine if the message should be output and at which level, we try to get the script provided values if possible but handle the case where we can't. We also modify IssueMessage to use cmSystemTools::SetFatalErrorOccured (or SetErrorOccured if that's preferred) if a warning has been turned into an error. Finally we modify the users of IssueMessage, to check the error occured state using cmSystemTools, and use that to determine if an error has occured (rather than the message level going into IssueMessage) and if the return value should be changed accordingly. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
I'm going to proceed with my reversion of the entire feature for 3.4. We can pick this up during post-3.4 development when you have time. Then we can review the all related semantics together. Okay, that's fair enough, sorry it hasn't been possible to get it into the 3.4 release in time. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Sorry I'm being a bit slow with this topic, it's release period at my office too :D so a busy time there as well. The cmake::Configure check for that runs before the scripts run so it is not possible to get script-provided values there. Do you have a check in a new context that occurs later? If so please provide the patch in progress and point out the problem. The checks I'm adding in are in the cmake::PrintMessagePreamble method, I've included an initial version of the patch. This looks correct and seems to behave correctly when either the user uses the -W options, or doesn't change anything relating to warnings or errors. But, when the user sets the variables being checked for, in the CMake file itself, the checks don't pick up the set variables. I'm guessing because its only checking against the cache, and the normal usage of the set command doesn't set the variable in the cache? This change causes the RunCMake.message and RunCMake.ObsoleteQtMacros tests for fail, as they do what is described just above. Cheers, Michael From 9096cd7f2a0ff42db88c4adb25a403e75e381756 Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Tue, 22 Sep 2015 22:43:24 +0100 Subject: [PATCH] Fix suppressing dev and deprecated messages via -W Examine the dev and deprecated warning and error output variables when printing message preambles, so that messages output outside of the message command, via IssueMessage, are affected by the CMake '-W' options again after the recent changes related to the -W options. --- Source/cmake.cxx | 34 ++ Tests/RunCMake/CommandLine/Wdev-stderr.txt | 6 ++ Tests/RunCMake/CommandLine/Wdev.cmake | 5 + Tests/RunCMake/CommandLine/Wno-dev.cmake | 5 + 4 files changed, 50 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f069481..dec254f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2591,18 +2591,52 @@ bool cmake::PrintMessagePreamble(cmake::MessageType t, std::ostream& msg) else if(t == cmake::DEPRECATION_ERROR) { msg << "CMake Deprecation Error"; + +// if CMAKE_ERROR_DEPRECATED is on, show the message, otherwise suppress it +const char* errorDeprecated = this->State->GetCacheEntryValue( +"CMAKE_ERROR_DEPRECATED"); +if(cmSystemTools::IsOff(errorDeprecated)) + { + return false; + } } else if (t == cmake::DEPRECATION_WARNING) { msg << "CMake Deprecation Warning"; + +// if CMAKE_WARN_DEPRECATED is on, show the message, otherwise suppress it +const char* warnDeprecated = this->State->GetInitializedCacheValue( +"CMAKE_WARN_DEPRECATED"); +if(cmSystemTools::IsOff(warnDeprecated)) + { + return false; + } } else if (t == cmake::AUTHOR_WARNING) { msg << "CMake Warning (dev)"; + +// if CMAKE_SUPPRESS_DEVELOPER_WARNINGS is on, suppress the message, +// otherwise show it +const char* suppress = this->State->GetCacheEntryValue( + "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); +if(cmSystemTools::IsOn(suppress)) + { + return false; + } } else if (t == cmake::AUTHOR_ERROR) { msg << "CMake Error (dev)"; + +// if CMAKE_ERROR_DEVELOPER_WARNINGS is on, show the message, otherwise +// suppress it +const char* devErrors = this->State->GetCacheEntryValue( + "CMAKE_ERROR_DEVELOPER_WARNINGS"); +if(cmSystemTools::IsOff(devErrors)) + { + return false; + } } else { diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index f427303..92c1d23 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -2,4 +2,10 @@ Some Author Warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning \(dev\) at Wdev.cmake:6 \(include\): + include\(\) given empty file name \(ignored\). +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/Wdev.cmake b/Tests/RunCMake/CommandLine/Wdev.cmake index 0242086..9d2439b 100644 --- a/Tests/RunCMake/CommandLine/Wdev.cmake +++ b/Tests/RunCMake/CommandLine/Wdev.cmake @@ -1 +1,6 @@ message(AUTHOR_WARNING "Some Author Warning") + +# with -Wdev this will also cause an AUTHOR_WARNING message, checks that +# messages issued outside of the message command, by other CMake commands, also +# are affected by -Wdev +include(""
Re: [cmake-developers] Add command line options for deprecation message control
I've created a fix for the issue of -Wno-dev and -Wno-deprecated options not being honoured, and extended the tests to cover this additional scenario. However I'm having an issue with determining if variables are set in cmake.cxx. The initial fix checked for the variables using the "GetCacheEntryValue" method in cmState, but I found that this didn't work when the variable (say CMAKE_WARN_DEPRECATED) was set in a .cmake file, as is the case for the "RunCMake/message/warnmessage.cmake". I toyed around with trying to get a hold of a cmMakefile instance and check the state of the variable via that, by getting the first object of the global generator makefiles, but this didn't always seem to work. Would you be able to advise on what the correct way is to get the current value of a variable, in the cmake class? I feel like I'm missing something simple here, as I'm still not too familiar with the code. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
The -Wdev/-Wno-dev options have always been for all messages output by any part of CMake. This needs to be preserved/corrected. Okay, I've fixed the change to cmake::PrintMessagePreamble, so that it'll stop warning or error dev or deprecated messages getting printed out when the relevant CMake variables have been set. I just need to add some more test cases to cover this and I'll submit a patch. Likely yes. This may require sweeping changes to address. We're too close to the freeze for 3.4 to do this now. Perhaps we should simply remove -Werr-dev for now. Yes the -Werr-dev, -Wno-err-dev, -Werr-deprectated and -Wno-err-deprecated may be trickier than expected to get behaving as intended. I'll try and get a better idea of the users of IssueMessage and see if some ideas come to mind. Removing them would be fair enough at this point, better to not include them than to include broken functionality I'm sure. Do new features, such as -Werr-dev, have to be sent by October 1st is it? Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Investigating the issue a bit more, I can see why it's happening for the given example. When I made those changes, I only modified the "message" CMake command, to check the CMAKE_WARN/ERROR_DEPRECATED and CMAKE_SUPPRESS_DEVELOPER_WARNINGS variables before outputting the message. The message command uses cmake::IssueMessage to actually output the required message. What I wasn't aware of was that other commands and code also use the IssueMessage for outputting author and deprecated messages. As the IssueMessage command doesn't check those variables, or the new warning levels map, before outputting the message, that's why we're seeing this behaviour. What I wanted to check before coming up with a fix, is whether the -W options are intended to only be applicable for the message command (and so the current behaviour is correct), or whether they should affect all author and deprecated messages output by other parts of CMake? If the current behaviour isn't correct, then one thing to have a good think about, is how to handle turning warnings into errors when -Werr-dev or -Werr-deprecated (and also the required behaviour when -Wno- is used). As some users of IssueMessage do different things if an error occurs (and is output), *after* IssueMessage is called. So there might need to be a way to signal to the caller when a warning has been upgraded to an error because of the users options perhaps? Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
On 17/09/2015 13:49, Brad King wrote: This caused a regression: -Wno-dev doesn't work any more in CMake 3.4 http://www.cmake.org/Bug/view.php?id=15747 Please take a look to fix it and extend the test suite accordingly. Thanks, -Brad Ah okay, I've replicated it on my Linux development environment, so I'll try and have a look over the weekend and find out what's going on. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Allow ALIAS of IMPORTED targets
Hi, I'm planning on having a look at the CMake issue "Allow ALIAS of IMPORTED targets", 0015569. After reading the thread between yourself and Marc, I wanted to ask a couple of things before I start going further with it. The proposed change would be for the add_library and add_executable commands only right? Having a quick look at the code for those two commands, they specifically check for a combination of ALIAS and IMPORTED and don't allow it. I'm guessing that the required changes to allow both simultaneously wouldn't be to just remove this check, there would be other areas to modify as well right? Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] FindZLIB module should find debug and, release variants
Thanks. We also need to be compatible with projects or scripts that set ZLIB_LIBRARY themselves. The attached patch should maintain that compatibility now. If ZLIB_LIBRARY is set manually, then it won't try and find the library and it'll set the ZLIB_LIBRARIES and IMPORTED_LOCATION variables using the provided ZLIB_LIBRARY variable (if the library was found). Cheers, Michael From c7905e97fa0a1412a1b05ee295d4bfa97c699b3e Mon Sep 17 00:00:00 2001 From: Michael Scott <michael.scott...@gmail.com> Date: Tue, 1 Sep 2015 20:41:27 +0100 Subject: [PATCH] Support finding the debug and release variants as separate libraries, providing each variant in ZLIB_LIBRARIES and ZLIB::ZLIB's imported location properties when one is found, while maintaining support for manually setting the library via ZLIB_LIBRARY. --- Modules/FindZLIB.cmake | 45 - 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake index d4a27d5..88aac56 100644 --- a/Modules/FindZLIB.cmake +++ b/Modules/FindZLIB.cmake @@ -74,14 +74,28 @@ set(_ZLIB_SEARCH_NORMAL ) list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL) -set(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1) +set(ZLIB_NAMES z zlib zdll zlib1) +set(ZLIB_NAMES_DEBUG zlibd zlibd1) # Try each search configuration. foreach(search ${_ZLIB_SEARCHES}) - find_path(ZLIB_INCLUDE_DIR NAMES zlib.h${${search}} PATH_SUFFIXES include) - find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) + find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include) endforeach() +# Allow ZLIB_LIBRARY to be set manually, as the location of the zlib library +if(NOT ZLIB_LIBRARY) + foreach(search ${_ZLIB_SEARCHES}) +find_library(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) +find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib) + endforeach() + + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(ZLIB) +endif() + +unset(ZLIB_NAMES) +unset(ZLIB_NAMES_DEBUG) + mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") @@ -112,12 +126,33 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_D if(ZLIB_FOUND) set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) -set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) + +if(NOT ZLIB_LIBRARIES) + set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) +endif() if(NOT TARGET ZLIB::ZLIB) add_library(ZLIB::ZLIB UNKNOWN IMPORTED) set_target_properties(ZLIB::ZLIB PROPERTIES -IMPORTED_LOCATION "${ZLIB_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIRS}") + + if(ZLIB_LIBRARY_RELEASE) +set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_RELEASE "${ZLIB_LIBRARY_RELEASE}") + endif() + + if(ZLIB_LIBRARY_DEBUG) +set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_DEBUG "${ZLIB_LIBRARY_DEBUG}") + endif() + + if(NOT ZLIB_LIBRARY_RELEASE AND NOT ZLIB_LIBRARY_DEBUG) +set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_LOCATION "${ZLIB_LIBRARY}") + endif() endif() endif() -- 2.1.4 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] FindZLIB module should find debug and, release variants
No, there doesn't need to be. Once IMPORTED_CONFIGURATIONS is populated then we expect each configuration to have an IMPORTED_LOCATION_CONFIG setting too. CMake will choose an appropriate configuration and use that location. Okay, I've modified the patch to only add the DEBUG and RELEASE configurations when the corresponding library is found, and not set the generic IMPORTED_LOCATION property at all. Cheers, Michael From ef53d82356062a1e7babafaa588cb34832b491fc Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sun, 23 Aug 2015 10:45:27 +0100 Subject: [PATCH] Find the debug and release variants as separate libraries, providing each variant in ZLIB_LIBRARIES and ZLIB::ZLIB's imported location properties when one is found. --- Modules/FindZLIB.cmake | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake index d4a27d5..c6cb016 100644 --- a/Modules/FindZLIB.cmake +++ b/Modules/FindZLIB.cmake @@ -74,15 +74,20 @@ set(_ZLIB_SEARCH_NORMAL ) list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL) -set(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1) +set(ZLIB_NAMES z zlib zdll zlib1) +set(ZLIB_NAMES_DEBUG zlibd zlibd1) # Try each search configuration. foreach(search ${_ZLIB_SEARCHES}) find_path(ZLIB_INCLUDE_DIR NAMES zlib.h${${search}} PATH_SUFFIXES include) - find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) + find_library(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) + find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib) endforeach() -mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) +select_library_configurations(ZLIB) + +mark_as_advanced(ZLIB_LIBRARY_RELEASE ZLIB_LIBRARY_DEBUG ZLIB_INCLUDE_DIR) if(ZLIB_INCLUDE_DIR AND EXISTS ${ZLIB_INCLUDE_DIR}/zlib.h) file(STRINGS ${ZLIB_INCLUDE_DIR}/zlib.h ZLIB_H REGEX ^#define ZLIB_VERSION \[^\]*\$) @@ -112,12 +117,24 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_D if(ZLIB_FOUND) set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) -set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) if(NOT TARGET ZLIB::ZLIB) add_library(ZLIB::ZLIB UNKNOWN IMPORTED) set_target_properties(ZLIB::ZLIB PROPERTIES -IMPORTED_LOCATION ${ZLIB_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS}) + + if(ZLIB_LIBRARY_RELEASE) +set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_RELEASE ${ZLIB_LIBRARY_RELEASE}) + endif() + + if(ZLIB_LIBRARY_DEBUG) +set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_DEBUG ${ZLIB_LIBRARY_DEBUG}) + endif() endif() endif() -- 2.1.4 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] FindZLIB module should find debug and, release variants
Please add each of the _DEBUG and _RELEASE configurations if and only if the corresponding variables are set. Grep for mention of IMPORTED_CONFIGURATIONS in other Modules/Find*.cmake files for examples. I'm assuming that there should be a IMPORTED_LOCATION property defined in all cases as well? The other Find modules aren't entirely consistent for this point, but it would make sense to me to set it to ZLIB_LIBRARY, similar to how FindOpenSSL behaves. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] FindZLIB module should find debug and release variants
Hi, Carrying on in the list of open issues to look at for contributing to CMake, I've had a look at issue 15280 - FindZLIB module should find debug and release variants. I've made some changes to the FindZLIB module which should make it so that debug and release variants are found as separate libraries, if they're both found then they're provided in ZLIB_LIBRARIES and ZLIB::ZLIB's imported location properties. Attached is the patch for FindZLIB.cmake. With this, I noticed that the Windows DLL's use different file names for the release and debug variants, but I couldn't tell if this is true on UNIX, it didn't seem to be the case. As the change to FinZLIB is based on the two variants having different names, I'm not sure these changes will have any effect on UNIX, is this expected or am I missing something/going about it the wrong way? Cheers, Michael From 9d1aa288cc68008797cbf67d0fe86a8713b4ad29 Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sun, 23 Aug 2015 10:45:27 +0100 Subject: [PATCH] Find the debug and release variants as separate libraries, providing both in ZLIB_LIBRARIES and ZLIB::ZLIB's imported location properties, when both are found. --- Modules/FindZLIB.cmake | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake index d4a27d5..b572b09 100644 --- a/Modules/FindZLIB.cmake +++ b/Modules/FindZLIB.cmake @@ -74,15 +74,17 @@ set(_ZLIB_SEARCH_NORMAL ) list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL) -set(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1) +set(ZLIB_NAMES z zlib zdll zlib1) +set(ZLIB_NAMES_DEBUG zlibd zlibd1) # Try each search configuration. foreach(search ${_ZLIB_SEARCHES}) find_path(ZLIB_INCLUDE_DIR NAMES zlib.h${${search}} PATH_SUFFIXES include) find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) + find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib) endforeach() -mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +mark_as_advanced(ZLIB_LIBRARY ZLIB_LIBRARY_DEBUG ZLIB_INCLUDE_DIR) if(ZLIB_INCLUDE_DIR AND EXISTS ${ZLIB_INCLUDE_DIR}/zlib.h) file(STRINGS ${ZLIB_INCLUDE_DIR}/zlib.h ZLIB_H REGEX ^#define ZLIB_VERSION \[^\]*\$) @@ -112,12 +114,25 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_D if(ZLIB_FOUND) set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) -set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) + +if(ZLIB_LIBRARY_DEBUG) +set(ZLIB_LIBRARIES optimized ${ZLIB_LIBRARY} debug ${ZLIB_LIBRARY_DEBUG}) +else() +set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) +endif() if(NOT TARGET ZLIB::ZLIB) add_library(ZLIB::ZLIB UNKNOWN IMPORTED) set_target_properties(ZLIB::ZLIB PROPERTIES -IMPORTED_LOCATION ${ZLIB_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS}) + + if(ZLIB_LIBRARY_DEBUG) +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_RELEASE ${ZLIB_LIBRARY} + IMPORTED_LOCATION_DEBUG ${ZLIB_LIBRARY_DEBUG}) + else() +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION ${ZLIB_LIBRARY}) + endif() endif() endif() -- 2.1.4 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] FindZLIB module should find debug and, release variants
I don't think so. The debug suffix is a Windows-ism which you don't see on UNIX. Okay great, I thought this was the case. One criticism of the patch: It's not using SelectLibraryConfigurations to choose between the release and debug variants. Could it be updated to do that for consistency? See FindPNG.cmake as an example. This should make the patch quite a bit simpler. Okay no problem, I've changed the patch to use SelectLibraryConfigurations instead. I've also changed the last bit of the patch, to set the IMPORTED_CONFIGURATIONS target property as well when there's debug and release variants, to be consistent with other Find modules. Let me know if this shouldn't be done in this situation. Cheers, Michael From 92e2d4933d57305fb1b9343c16b68d36c1a29c09 Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sun, 23 Aug 2015 10:45:27 +0100 Subject: [PATCH] Find the debug and release variants as separate libraries, providing both in ZLIB_LIBRARIES and ZLIB::ZLIB's imported location properties, when both are found. --- Modules/FindZLIB.cmake | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake index d4a27d5..5de9acc 100644 --- a/Modules/FindZLIB.cmake +++ b/Modules/FindZLIB.cmake @@ -74,15 +74,20 @@ set(_ZLIB_SEARCH_NORMAL ) list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL) -set(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1) +set(ZLIB_NAMES z zlib zdll zlib1) +set(ZLIB_NAMES_DEBUG zlibd zlibd1) # Try each search configuration. foreach(search ${_ZLIB_SEARCHES}) find_path(ZLIB_INCLUDE_DIR NAMES zlib.h${${search}} PATH_SUFFIXES include) - find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) + find_library(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) + find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} ${${search}} PATH_SUFFIXES lib) endforeach() -mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) +select_library_configurations(ZLIB) + +mark_as_advanced(ZLIB_LIBRARY_RELEASE ZLIB_LIBRARY_DEBUG ZLIB_INCLUDE_DIR) if(ZLIB_INCLUDE_DIR AND EXISTS ${ZLIB_INCLUDE_DIR}/zlib.h) file(STRINGS ${ZLIB_INCLUDE_DIR}/zlib.h ZLIB_H REGEX ^#define ZLIB_VERSION \[^\]*\$) @@ -112,12 +117,21 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_D if(ZLIB_FOUND) set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) -set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) if(NOT TARGET ZLIB::ZLIB) add_library(ZLIB::ZLIB UNKNOWN IMPORTED) set_target_properties(ZLIB::ZLIB PROPERTIES -IMPORTED_LOCATION ${ZLIB_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS}) + + if(ZLIB_LIBRARY_DEBUG) +set_property(TARGET ZLIB::ZLIB APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE DEBUG) +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION_RELEASE ${ZLIB_LIBRARY_RELEASE} + IMPORTED_LOCATION_DEBUG ${ZLIB_LIBRARY_DEBUG}) + else() +set_target_properties(ZLIB::ZLIB PROPERTIES + IMPORTED_LOCATION ${ZLIB_LIBRARY_RELEASE}) + endif() endif() endif() -- 2.1.4 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Add command line options for deprecation message control
Hi, After the last feedback, I've made some changes which should address the points that were talked about. I've changed the -W dev options to affect the deprecated warnings/errors as well, but only if the user hasn't used one of the options that control deprecated warnings (-Wdeprecated, -Wno-deprecated, -Werror=deprecated, -Wno-error=deprecated), if they have then the -W dev options won't affect the CMAKE_WARN_DEPRECATED or CMAKE_ERROR_DEPRECATED variables. I've also added the two -W dev options, -Werror=dev and -Wno-error=dev, to bring this set of options in line with the deprecated set of options. For this I've added a new variable, CMAKE_SUPPRESS_DEVELOPER_ERRORS, which controls whether or not author warnings are treated as fatal errors. By default it's set to TRUE as this seemed more sensible. I've added some more cases to the run CMake tests and updated the documentation to contain the new options and variable, I've also added a document to the dev release notes in case these additional changes merited one. Please let me know if there are any mistakes/issues with the attached commit or if I've missed out anything. I've started some changes to the QT GUI to allow it to use these changes, but I thought it'd be best to commit the given changes now, and then do a separate chunk of work for the QT GUI changes, as the changes for all this have grown larger than expected. Cheers, Michael Scott From 3ed09142ec81861670ca2fe27e28ca782ad60e9f Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sat, 13 Jun 2015 18:34:31 +0100 Subject: [PATCH] Refactored the -Wdev and -Wno-dev to use a generic -W parser, which follows the GCC pattern. Included support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Added -Werror=dev and -Wno-error=dev options, so that dev warning options are in line with deprecated warning options. Added a new variable CMAKE_SUPPRESS_DEVELOPER_ERRORS, which is set using the above new dev options. Added tests for new options and updated cmake documentation and release notes to list new options. --- Help/manual/OPTIONS_BUILD.txt | 40 +++- Help/manual/cmake-variables.7.rst | 2 + Help/release/dev/cmake-Wdeprecated.rst | 9 + Help/release/dev/cmake-Wdev.rst| 7 + Help/variable/CMAKE_ERROR_DEPRECATED.rst | 4 + Help/variable/CMAKE_SUPPRESS_DEVELOPER_ERRORS.rst | 12 ++ Help/variable/CMAKE_WARN_DEPRECATED.rst| 4 + Source/cmMessageCommand.cxx| 14 +- Source/cmake.cxx | 239 ++--- Source/cmake.h | 27 ++- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 63 ++ Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg3-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + .../CommandLine/Werror_deprecated-result.txt | 1 + .../CommandLine/Werror_deprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Werror_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Werror_dev-result.txt | 1 + Tests/RunCMake/CommandLine/Werror_dev-stderr.txt | 5 + Tests/RunCMake/CommandLine/Werror_dev.cmake| 1 + Tests/RunCMake/CommandLine/Wno-deprecated.cmake| 1 + .../CommandLine/Wno-error_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-error_dev.cmake | 1 + 28 files changed, 408 insertions(+), 43 deletions(-) create mode 100644 Help/release/dev/cmake-Wdeprecated.rst create mode 100644 Help/release/dev/cmake-Wdev.rst create mode 100644 Help/variable/CMAKE_SUPPRESS_DEVELOPER_ERRORS.rst create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_dev-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_dev
Re: [cmake-developers] Add command line options for deprecation message control
Looking at the cmMessageCommand::InitialPass and cmake::PrintMessagePreamble code, if we want to mirror the deprecation message behaviour, I'm tempted to suggest we also modify the message mode AUTHOR_WARNING to be AUTHOR instead. It would make the mode clearer on it's new behaviour and allow the code to be more consistent with regards to dev and deprecated. I imagine this might be a big user affecting change though, so it might be better to not do that and just make AUTHOR_WARNING cause fatal error messages depending on the state of the associated cmake variables. What are your thoughts on this? P.S. Sorry my previous email broke the message threading, I'm replying in a different way this time but please let me know if I'm still breaking the message threading. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Since AUTHOR_WARNING is a superset of DEPRECATION_WARNING I think -W[no-]dev can influence CMAKE_WARN_DEPRECATED. Please also add -W[no-]error=dev to turn AUTHOR_WARNING into an error and also make it influence CMAKE_ERROR_DEPRECATED. Then -Wdeprecated and friends can still be used to control the DEPRECATION messages separately. Making dev influence deprecation variables is not a problem. To support -Werror=dev we'll need a new variable I'm thinking though, something like a boolean CMAKE_SUPPRESS_DEVELOPER_ERRORS? What should be the expected behaviour when combining dev and deprecated now, as they affect each other. If for example the user used the options -Wno-deprecated -Wdev in a cmake invocation, the most logical to me would be that this causes CMAKE_SUPPRESS_DEVELOPER_WARNINGS to be TRUE and CMAKE_WARN_DEPRECATED to be FALSE, but implementing that might make the code more complicated than I'd hoped. Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
What is the difference between the intended uses of those existing options and the intended uses of the new options, given that -Wno-dev is mostly useful for third parties to silence policy warnings? Working on this issue, I did find the different variables/options a bit confusing. dev and deprecated both change the effect of message modes, pretty much doing the same thing but slightly different (for example there is -Wdev and -Wno-dev, but not -Werror=dev or -Wno-error=dev). Would it be worth refactoring the -W dev options to be in line with the -W deprecated options? If the new options are merged to master should -Wdev and -Wno-dev also be changed to affect CMAKE_WARN_DEPRECATED? That would be sensible behaviour to me, shall I modify cmake::Configure to do this? Cheers, Michael -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Add command line options for deprecation message control
Sorry, I've added in the missing method to cmake.cxx, which updates the WarningLevel map according to the boolean provided. cmake-gui compiles without errors again. I could add support for the new options to the GUI, in which case I would probably also go back to the changes I made to cmake.cxx and make the code related to WarningLevel a bit more generic and replace instances of dev and deprecated with constants to make the changes a bit more maintainable. Cheers, Michael On 25/06/2015 15:50, Brad King wrote: On 06/24/2015 05:30 PM, Michael Scott wrote: Thanks for the comments, here is the previous patch, with the suggested amendments. Thanks. This hunk: - void SetSuppressDevWarnings(bool v) -{ - this-SuppressDevWarnings = v; - this-DoSuppressDevWarnings = true; -} causes the cmake-gui Qt dialog to fail to compile: $ git grep SetSuppressDevWarnings Source/QtDialog/QCMake.cxx: this-CMakeInstance-SetSuppressDevWarnings(this-SuppressDevWarnings); Sorry I didn't notice that last time. Please enable the BUILD_QtDialog option at CMake build time to build this part and make sure it compiles after the changes. It would be nice to also provide settings in cmake-gui for these deprecation levels (as there is for -Wdev), but I won't make that a requirement for acceptance of the patch. Thanks, -Brad From c19b143756a9ecf800ac42a37dd2d4bac64d7025 Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sat, 13 Jun 2015 18:34:31 +0100 Subject: [PATCH] Refactored the -Wdev and -Wno-dev to use a generic -W parser, which follows the GCC pattern. Included support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Added tests for new options and updated cmake documentation and release notes to list new options. --- Help/manual/OPTIONS_BUILD.txt | 24 Help/release/dev/cmake-Wdeprecated.rst | 9 ++ Help/variable/CMAKE_ERROR_DEPRECATED.rst | 4 + Help/variable/CMAKE_WARN_DEPRECATED.rst| 4 + Source/cmake.cxx | 127 ++--- Source/cmake.h | 24 ++-- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 37 ++ Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg3-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + .../CommandLine/Werror_deprecated-result.txt | 1 + .../CommandLine/Werror_deprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Werror_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-deprecated.cmake| 1 + .../CommandLine/Wno-error_deprecated.cmake | 1 + 20 files changed, 223 insertions(+), 28 deletions(-) create mode 100644 Help/release/dev/cmake-Wdeprecated.rst create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 4207db4..5366cae 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -84,3 +84,27 @@ Enable warnings that are meant for the author of the CMakeLists.txt files. + +``-Wdeprecated`` + Enable deprecated macro and function warnings. + + Enable warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files. + +``-Wno-deprecated`` + Suppress deprecated macro and function warnings. + + Suppress warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files. + +``-Werror=deprecated`` + Make deprecated macro and function warnings errors. + + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files, errors
Re: [cmake-developers] Add command line options for deprecation message control
Thanks for the comments, here is the previous patch, with the suggested amendments. Cheers, Michael On 24/06/2015 15:45, Brad King wrote: On 06/23/2015 03:57 PM, Michael Scott wrote: I've implemented some changes to cmake.cxx and cmake.h, to implement setting the CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED variables via command line options, for the Mantis issue 0014669, in a generic GCC style pattern. I've taken on board the previous suggestions, including adding tests for the new options and updating the cmake application options documentation. I've attached the proposed patch to this email, please let me know if there are any incorrect changes in the patch. Thanks. Here are some comments: * Please update the Help/variable/CMAKE_*_DEPRECATED.rst documents to mention the appropriate command-line options, perhaps with a :manual:`cmake(1)` link. * Please add a Help/release/dev/cmake-Wdeprecated.rst file with a release note mentioning the options. * Please ensure all sources added/modified by the patch have a newline on the last line (but not a trailing blank line). Thanks, -Brad From a588e904c414270c78465b6423c89ece52801fbd Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sat, 13 Jun 2015 18:34:31 +0100 Subject: [PATCH] Refactored the -Wdev and -Wno-dev to use a generic -W parser, which follows the GCC pattern. Included support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Added tests for new options and updated cmake documentation and release notes to list new options. --- Help/manual/OPTIONS_BUILD.txt | 24 + Help/release/dev/cmake-Wdeprecated.rst | 9 ++ Help/variable/CMAKE_ERROR_DEPRECATED.rst | 4 + Help/variable/CMAKE_WARN_DEPRECATED.rst| 4 + Source/cmake.cxx | 112 + Source/cmake.h | 23 +++-- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 37 +++ Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg3-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + .../CommandLine/Werror_deprecated-result.txt | 1 + .../CommandLine/Werror_deprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Werror_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-deprecated.cmake| 1 + .../CommandLine/Wno-error_deprecated.cmake | 1 + 20 files changed, 207 insertions(+), 28 deletions(-) create mode 100644 Help/release/dev/cmake-Wdeprecated.rst create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 4207db4..5366cae 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -84,3 +84,27 @@ Enable warnings that are meant for the author of the CMakeLists.txt files. + +``-Wdeprecated`` + Enable deprecated macro and function warnings. + + Enable warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files. + +``-Wno-deprecated`` + Suppress deprecated macro and function warnings. + + Suppress warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files. + +``-Werror=deprecated`` + Make deprecated macro and function warnings errors. + + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files, errors. + +``-Wno-error=deprecated`` + Make deprecated macro and function warnings not errors. + + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files, not errors. diff
[cmake-developers] Add command line options for deprecation message control
Hi, I've implemented some changes to cmake.cxx and cmake.h, to implement setting the CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED variables via command line options, for the Mantis issue 0014669, in a generic GCC style pattern. I've taken on board the previous suggestions, including adding tests for the new options and updating the cmake application options documentation. I've attached the proposed patch to this email, please let me know if there are any incorrect changes in the patch. Michael Scott From 2fc8c47ff2112a1f28d4f3c8513e29c94ecb6a9d Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sat, 13 Jun 2015 18:34:31 +0100 Subject: [PATCH] Refactored the -Wdev and -Wno-dev to use a generic -W parser, which follows the GCC pattern. Included support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Added tests for new options and updated cmake application documentation to list new options. --- Help/manual/OPTIONS_BUILD.txt | 25 + Source/cmake.cxx | 107 + Source/cmake.h | 23 +++-- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 20 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg2-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/W_bad-arg3-result.txt | 1 + Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + .../CommandLine/Werror_deprecated-result.txt | 1 + .../CommandLine/Werror_deprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Werror_deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-deprecated.cmake| 1 + .../CommandLine/Wno-error_deprecated.cmake | 1 + 17 files changed, 171 insertions(+), 26 deletions(-) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-result.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Werror_deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 4207db4..62eeb09 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -84,3 +84,28 @@ Enable warnings that are meant for the author of the CMakeLists.txt files. + +``-Wdeprecated`` + Enable deprecated macro and function warnings. + + Enable warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files. + +``-Wno-deprecated`` + Suppress deprecated macro and function warnings. + + Suppress warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files. + +``-Werror=deprecated`` + Make deprecated macro and function warnings errors. + + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files, errors. + +``-Wno-error=deprecated`` + Make deprecated macro and function warnings not errors. + + Make warnings for usage of deprecated macros and functions, that are meant + for the author of the CMakeLists.txt files, not errors. + \ No newline at end of file diff --git a/Source/cmake.cxx b/Source/cmake.cxx index eeb6575..54317ae 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -125,8 +125,6 @@ cmake::cmake() this-WarnUnused = false; this-WarnUnusedCli = true; this-CheckSystemVars = false; - this-SuppressDevWarnings = false; - this-DoSuppressDevWarnings = false; this-DebugOutput = false; this-DebugTryCompile = false; this-ClearBuildSystem = false; @@ -251,15 +249,69 @@ bool cmake::SetCacheArgs(const std::vectorstd::string args) return false; } } -else if(arg.find(-Wno-dev,0) == 0) +else if(cmHasLiteralPrefix(arg, -W)) { - this-SuppressDevWarnings = true; - this-DoSuppressDevWarnings = true; + std::string entry = arg.substr(2); + if (entry.empty()) +{ +++i; +if (i
Re: [cmake-developers] Add command line options for deprecation message control
Hi Brad, Apologies for taking a little while with this. I've addressed those points and added all the tests I think are appropriate for this, however when I run one of them it fails because stderr is not as expected, but the actual and expected values are identical. Why would this happen? Test I'm running: /run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W)/ Output from running the test: / W_bad-arg1 - FAILED:// // // stderr does not match that expected.// // // Command was:// // // command /home/mike/Documents/cmake/src/cmake/bin/cmake -W// // // Actual stdout:// // // actual-out // // // Expected stderr to match:// // // expect-err CMake Error: -W must be followed with [no-][error=]name.// // expect-err CMake Error: Problem processing arguments. Aborting.// // // Actual stderr:// // // actual-err CMake Error: -W must be followed with [no-][error=]name.// // actual-err CMake Error: Problem processing arguments. Aborting./ Cheers, Michael On 15/06/2015 15:06, Brad King wrote: On 06/13/2015 01:41 PM, Michael Scott wrote: I've implemented some changes to cmake.cxx and cmake.h, to implement setting the CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED variables via command line options, for the Mantis issue 0014669, in a generic GCC style pattern. I've attached the proposed patch to this email, does this look like a sensible implementation? Thanks for working on this. Here are some comments: * Please use 2 spaces and no tabs for indentation. * Please extend Tests/RunCMake/CommandLine to cover this or find another appropriate test to update. All options need coverage, including the error cases. * The cmHasLiteralPrefix helper function may be useful in place of x.find(...) == 0. Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Add command line options for deprecation message control
Hi, I've implemented some changes to cmake.cxx and cmake.h, to implement setting the CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED variables via command line options, for the Mantis issue 0014669, in a generic GCC style pattern. I've attached the proposed patch to this email, does this look like a sensible implementation? Michael Scott From ae4f9a42ff5e8d3156010287d013099e75c0cde4 Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Sat, 13 Jun 2015 18:34:31 +0100 Subject: [PATCH] Refactored the -Wdev and -Wno-dev to use a generic -W parser, which follows the GCC pattern. Included support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. --- Source/cmake.cxx | 146 +-- Source/cmake.h | 23 + 2 files changed, 124 insertions(+), 45 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index eeb6575..27ceb5a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -125,8 +125,6 @@ cmake::cmake() this-WarnUnused = false; this-WarnUnusedCli = true; this-CheckSystemVars = false; - this-SuppressDevWarnings = false; - this-DoSuppressDevWarnings = false; this-DebugOutput = false; this-DebugTryCompile = false; this-ClearBuildSystem = false; @@ -251,16 +249,71 @@ bool cmake::SetCacheArgs(const std::vectorstd::string args) return false; } } -else if(arg.find(-Wno-dev,0) == 0) - { - this-SuppressDevWarnings = true; - this-DoSuppressDevWarnings = true; - } -else if(arg.find(-Wdev,0) == 0) - { - this-SuppressDevWarnings = false; - this-DoSuppressDevWarnings = true; - } +else if(arg.find(-W, 0) == 0) + { + std::string entry = arg.substr(2); + if (entry.empty()) + { + ++i; + if (i args.size()) + { + entry = args[i]; + } + else + { + cmSystemTools::Error(-W must be followed with + [no-][error=]name.); + return false; + } + } + + std::string name; + bool foundNo = false; + bool foundError = false; + unsigned int nameStartPosition = 0; + + if (entry.find(no-, nameStartPosition) == 0) + { + foundNo = true; + nameStartPosition += 3; + } + + if (entry.find(error=, nameStartPosition) == 0) + { + foundError = true; + nameStartPosition += 6; + } + + name = entry.substr(nameStartPosition); + if (name.empty()) + { + cmSystemTools::Error(No warning name provided.); + return false; + } + + if (!foundNo !foundError) + { + // -Wname + this-WarningLevels[name] = std::max(this-WarningLevels[name], + WarningLevel::WARNING_LEVEL); + } + else if (foundNo !foundError) + { + // -Wnoname + this-WarningLevels[name] = WarningLevel::IGNORE_LEVEL; + } + else if (!foundNo foundError) + { + // -Werror=name + this-WarningLevels[name] = WarningLevel::ERROR_LEVEL; + } + else + { + // -Wno-error=name + this-WarningLevels[name] = std::min(this-WarningLevels[name], + WarningLevel::WARNING_LEVEL); + } +} else if(arg.find(-U,0) == 0) { std::string entryPattern = arg.substr(2); @@ -587,11 +640,7 @@ void cmake::SetArgs(const std::vectorstd::string args, // skip for now i++; } -else if(arg.find(-Wno-dev,0) == 0) - { - // skip for now - } -else if(arg.find(-Wdev,0) == 0) +else if(arg.find(-W,0) == 0) { // skip for now } @@ -1171,25 +1220,50 @@ int cmake::HandleDeleteCacheVariables(const std::string var) int cmake::Configure() { - if(this-DoSuppressDevWarnings) -{ -if(this-SuppressDevWarnings) - { - this-CacheManager- -AddCacheEntry(CMAKE_SUPPRESS_DEVELOPER_WARNINGS, TRUE, - Suppress Warnings that are meant for - the author of the CMakeLists.txt files., - cmState::INTERNAL); - } -else - { - this-CacheManager- -AddCacheEntry(CMAKE_SUPPRESS_DEVELOPER_WARNINGS
[cmake-developers] Add more RST markup to documentation
Hi, I've done some work on the commands documentation, generally adding more RST markup, as part of the Mantis issue 0015587. I've attached the proposed patch to this email, please let me know if there are any incorrect changes to the documentation in the patch. Michael Scott From 8cfbfb00bfacc66db9ce50b82da666c9231b4460 Mon Sep 17 00:00:00 2001 From: Michael Scott michael.scott...@gmail.com Date: Thu, 4 Jun 2015 22:51:22 +0100 Subject: [PATCH] Added additional RST markup to the commands documentation. --- Help/command/add_subdirectory.rst | 14 +-- Help/command/aux_source_directory.rst | 2 +- Help/command/build_name.rst| 5 +- Help/command/cmake_host_system_information.rst | 6 +- Help/command/cmake_minimum_required.rst| 2 +- Help/command/create_test_sourcelist.rst| 18 +-- Help/command/ctest_run_script.rst | 6 +- Help/command/ctest_start.rst | 2 +- Help/command/define_property.rst | 28 ++--- Help/command/else.rst | 2 +- Help/command/elseif.rst| 2 +- Help/command/enable_language.rst | 2 +- Help/command/enable_testing.rst| 8 +- Help/command/endforeach.rst| 4 +- Help/command/endfunction.rst | 2 +- Help/command/endif.rst | 2 +- Help/command/endmacro.rst | 2 +- Help/command/endwhile.rst | 2 +- Help/command/exec_program.rst | 8 +- Help/command/execute_process.rst | 14 +-- Help/command/export.rst| 18 +-- Help/command/export_library_dependencies.rst | 12 +- Help/command/find_library.rst | 10 +- Help/command/fltk_wrap_ui.rst | 2 +- Help/command/foreach.rst | 6 +- Help/command/get_cmake_property.rst| 8 +- Help/command/get_directory_property.rst| 6 +- Help/command/get_filename_component.rst| 12 +- Help/command/get_source_file_property.rst | 10 +- Help/command/get_target_property.rst | 6 +- Help/command/get_test_property.rst | 8 +- Help/command/include.rst | 18 +-- Help/command/include_external_msproject.rst| 6 +- Help/command/include_regular_expression.rst| 4 +- Help/command/install_files.rst | 18 +-- Help/command/install_programs.rst | 23 ++-- Help/command/install_targets.rst | 12 +- Help/command/link_directories.rst | 8 +- Help/command/list.rst | 48 Help/command/load_cache.rst| 4 +- Help/command/load_command.rst | 6 +- Help/command/make_directory.rst| 2 +- Help/command/mark_as_advanced.rst | 8 +- Help/command/math.rst | 2 +- Help/command/message.rst | 2 +- Help/command/option.rst| 6 +- Help/command/qt_wrap_cpp.rst | 2 +- Help/command/qt_wrap_ui.rst| 6 +- Help/command/remove.rst| 8 +- Help/command/remove_definitions.rst| 6 +- Help/command/return.rst| 14 +-- Help/command/separate_arguments.rst| 8 +- Help/command/set_target_properties.rst | 145 + Help/command/string.rst| 66 +-- Help/command/subdirs.rst | 12 +- Help/command/unset.rst | 10 +- Help/command/utility_source.rst| 4 +- Help/command/variable_requires.rst | 8 +- Help/command/while.rst | 8 +- Help/command/write_file.rst| 14 +-- 60 files changed, 357 insertions(+), 350 deletions(-) diff --git a/Help/command/add_subdirectory.rst b/Help/command/add_subdirectory.rst index 29b5017..e979253 100644 --- a/Help/command/add_subdirectory.rst +++ b/Help/command/add_subdirectory.rst @@ -12,23 +12,23 @@ Add a subdirectory to the build. The source_dir specifies the directory in which the source CMakeLists.txt and code files are located. If it is a relative path it will be evaluated with respect to the current directory (the typical usage), but it may also be an -absolute path. The binary_dir specifies the directory in which to +absolute path. The ``binary_dir`` specifies the directory in which to place the output files. If it is a relative path it will be evaluated with respect to the current output directory, but it may also be an -absolute path. If binary_dir is not specified, the value of -source_dir, before expanding any relative path, will be used (the +absolute path. If ``binary_dir`` is not specified
Re: [cmake-developers] contributing to CMake
Hi Brad, Thanks! Initially I'd be looking for suggestions for entry tasks, then perhaps after some of those, if I see an area I'm particularly interested in I could propose contributions to those areas. Cheers, Michael On 26/05/2015 14:34, Brad King wrote: On 05/25/2015 12:20 PM, Michael Scott wrote: I'm interested in contributing to the development of CMake, so I'd like to find out more about what opportunities there are for this, and how I'd go about doing it? Great, and welcome! As described in CONTRIBUTING.rst at the top of the source tree the preferred path for new contributors is to send patches to this mailing list. Therefore you've already taken the first step by signing up and introducing yourself. Do you have a specific contribution in mind or are you looking for suggestions for an entry task? Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] contributing to CMake
Hi CMake Developers, I've been using CMake for a little while now (about a year), as part of my job as a software developer in London. I've found it to be a very useful project that works great and provides very helpful support for issues. I'm interested in contributing to the development of CMake, so I'd like to find out more about what opportunities there are for this, and how I'd go about doing it? Cheers, Michael Scott -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers