MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0013761 | CMake | CMake | public | 2012-11-30 05:12 | 2015-01-05 08:39 |
|
Reporter | Stefan Eilemann | |
Assigned To | Brad King | |
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | All | OS | | OS Version | |
Product Version | CMake 3.0 | |
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | |
|
Summary | 0013761: Add QUIET option to install() command |
Description | Installing large directories, e.g., the output of a doxygen run, prints one line per file resulting in too much noise in the build output. Add an option to the install() command to not print anything upon make install. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | has duplicate | 0013785 | closed | David Cole | INSTALL command does not support a QUIET/SILENT option | has duplicate | 0014757 | closed | | Reduce output of install step |
|
Attached Files | 0001-Implement-install-.-QUIET-.-13761.patch (15,174) 2014-04-02 15:49 https://public.kitware.com/Bug/file/5120/0001-Implement-install-.-QUIET-.-13761.patch 0001-Implement-install-.-QUIET-.-13761.v2.patch (16,937) 2014-04-02 15:59 https://public.kitware.com/Bug/file/5121/0001-Implement-install-.-QUIET-.-13761.v2.patch 0001-Implement-install-.-QUIET-.-13761.v3.patch (16,937) 2014-04-07 04:38 https://public.kitware.com/Bug/file/5122/0001-Implement-install-.-QUIET-.-13761.v3.patch cmFileCommand.diff (2,039) 2014-06-16 10:32 https://public.kitware.com/Bug/file/5168/cmFileCommand.diff cmFileCommand-global_property.diff (3,311) 2014-06-17 11:31 https://public.kitware.com/Bug/file/5169/cmFileCommand-global_property.diff file_install_option_quite.diff (19,703) 2014-06-19 14:00 https://public.kitware.com/Bug/file/5170/file_install_option_quite.diff file_install_option_quiet2.diff (21,179) 2014-06-19 16:16 https://public.kitware.com/Bug/file/5171/file_install_option_quiet2.diff |
|
Issue History |
Date Modified | Username | Field | Change |
2012-11-30 05:12 | Stefan Eilemann | New Issue | |
2012-12-12 07:50 | David Cole | Relationship added | has duplicate 0013785 |
2013-08-19 11:40 | Daniel Nachbaur | Note Added: 0033735 | |
2014-04-02 15:49 | Stefan Eilemann | File Added: 0001-Implement-install-.-QUIET-.-13761.patch | |
2014-04-02 15:49 | Stefan Eilemann | Note Added: 0035627 | |
2014-04-02 15:49 | Stefan Eilemann | Note Edited: 0035627 | bug_revision_view_page.php?bugnote_id=35627#r1438 |
2014-04-02 15:59 | Stefan Eilemann | File Added: 0001-Implement-install-.-QUIET-.-13761.v2.patch | |
2014-04-02 15:59 | Stefan Eilemann | Note Added: 0035628 | |
2014-04-07 04:38 | Stefan Eilemann | File Added: 0001-Implement-install-.-QUIET-.-13761.v3.patch | |
2014-04-07 04:39 | Stefan Eilemann | Note Added: 0035644 | |
2014-04-09 09:33 | Emmanuel Blot | Note Added: 0035660 | |
2014-04-27 16:58 | Emmanuel Blot | Note Added: 0035796 | |
2014-05-15 08:05 | Emmanuel Blot | Note Added: 0035883 | |
2014-06-16 10:32 | d3x0r | File Added: cmFileCommand.diff | |
2014-06-16 10:34 | d3x0r | Note Added: 0036203 | |
2014-06-16 10:38 | d3x0r | Note Edited: 0036203 | bug_revision_view_page.php?bugnote_id=36203#r1491 |
2014-06-16 13:21 | d3x0r | Note Added: 0036205 | |
2014-06-16 15:07 | Brad King | Relationship added | has duplicate 0014757 |
2014-06-16 15:09 | Brad King | Product Version | CMake 2.8.10.2 => CMake 3.0 |
2014-06-16 15:09 | Brad King | Target Version | => CMake 3.1 |
2014-06-16 15:10 | Brad King | Note Added: 0036207 | |
2014-06-16 15:17 | Brad King | Note Added: 0036208 | |
2014-06-17 11:31 | d3x0r | File Added: cmFileCommand-global_property.diff | |
2014-06-17 11:34 | d3x0r | Note Added: 0036214 | |
2014-06-19 11:27 | Brad King | Note Added: 0036224 | |
2014-06-19 12:14 | d3x0r | Note Added: 0036226 | |
2014-06-19 12:18 | d3x0r | Note Edited: 0036226 | bug_revision_view_page.php?bugnote_id=36226#r1496 |
2014-06-19 12:35 | Brad King | Note Added: 0036227 | |
2014-06-19 14:00 | d3x0r | File Added: file_install_option_quite.diff | |
2014-06-19 14:03 | d3x0r | Note Added: 0036228 | |
2014-06-19 14:52 | Brad King | Note Added: 0036229 | |
2014-06-19 16:16 | d3x0r | File Added: file_install_option_quiet2.diff | |
2014-06-19 16:19 | d3x0r | Note Added: 0036231 | |
2014-06-19 16:25 | d3x0r | Note Edited: 0036231 | bug_revision_view_page.php?bugnote_id=36231#r1498 |
2014-06-19 16:28 | d3x0r | Note Edited: 0036231 | bug_revision_view_page.php?bugnote_id=36231#r1499 |
2014-06-24 14:00 | Brad King | Note Added: 0036244 | |
2014-06-24 14:01 | Brad King | Assigned To | => Brad King |
2014-06-24 14:01 | Brad King | Status | new => assigned |
2014-08-04 09:37 | Brad King | Note Added: 0036542 | |
2014-08-04 09:37 | Brad King | Status | assigned => resolved |
2014-08-04 09:37 | Brad King | Resolution | open => fixed |
2014-08-04 09:37 | Brad King | Fixed in Version | => CMake 3.1 |
2015-01-05 08:39 | Robert Maynard | Note Added: 0037606 | |
2015-01-05 08:39 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0033735)
|
Daniel Nachbaur
|
2013-08-19 11:40
|
|
|
|
(0035627)
|
Stefan Eilemann
|
2014-04-02 15:49
|
|
See attached patch for implementation.
|
|
|
(0035628)
|
Stefan Eilemann
|
2014-04-02 15:59
|
|
v2 with updated documentation |
|
|
(0035644)
|
Stefan Eilemann
|
2014-04-07 04:39
|
|
v3 rebased against current master (4023bd7b115fb9df6836dacea55e8cb3b1218c9c) |
|
|
(0035660)
|
Emmanuel Blot
|
2014-04-09 09:33
|
|
Patch v3 works like a charm. Thanks a lot! |
|
|
(0035796)
|
Emmanuel Blot
|
2014-04-27 16:58
|
|
Any chance to get this feature included in 3.0 final?
It does not seem it has been merged into 3.0-rc4. |
|
|
(0035883)
|
Emmanuel Blot
|
2014-05-15 08:05
|
|
Nor 3.0-rc5
Maybe someone to add to the CC: list? |
|
|
(0036203)
|
d3x0r
|
2014-06-16 10:34
(edited on: 2014-06-16 10:38) |
|
It would be more useful if there were a global flag set rather than modifying very install command. Patterned after CMAKE_INSTALL_ALWAYS patch adds CMAKE_INSTALL_QUIET flag. This can be set in the environment or in a CMake script.
(sent patch on mailing list, but it was manually edited; this is cleaner... ended up deleting/adding blank lines during tests, so I cleaned those up)
https://public.kitware.com/Bug/file/5168/cmFileCommand.diff [^]
There are 3 locations that 'ReportCopy'... symlink install, directory install and file install.
File install is handled by passing/checking a copy flag and testing quiet flag to omit displaying the status if quiet and not copied.
Directories called ReportCopy with (true) so added a check for file_exists and file_is_directory... (won't end up updating permissions if calling CreateDirectory always updates permissions on the directory)
Symlink should be the same as 'file' since it passes the status whether it did the 'copy' or not; but I have now way to test it.
|
|
|
(0036205)
|
d3x0r
|
2014-06-16 13:21
|
|
Hmm that didn't work quite... it does require being set in environment and
set( ENV{CMAKE_INSTALL_QUIET} ON ) doesn't help
had tried initially to use this->Makefile->IsOn( ... ) but that wasn't working right either... |
|
|
(0036207)
|
Brad King
|
2014-06-16 15:10
|
|
|
|
(0036208)
|
Brad King
|
2014-06-16 15:17
|
|
0014757 suggests dropping the Up-to-date notices to reduce output on re-installation. That could be considered here too. |
|
|
(0036214)
|
d3x0r
|
2014-06-17 11:34
|
|
Update cmFileCommand patch also updates cmLocalGenerator.cxx and adds help/prop_gbl/QUIET_INSTALL.rst;
cmLocalGenerator tests for the QUIET_INSTALL global property and if it is on, also emits that to cmake_install.cmake so install phase can test it in cmFileCommand. |
|
|
(0036224)
|
Brad King
|
2014-06-19 11:27
|
|
Re 0013761:0036214: Thanks for working on a patch.
Rather than setting a global property in the cmake_install.cmake script I think the file(INSTALL) command should have a QUIET option to control its output verbosity. (It could also honor a CMAKE_INSTALL_QUIET environment variable for consistency with CMAKE_INSTALL_ALWAYS, but that is separate.) Then the generator can be taught to add the QUIET option to file(INSTALL) calls when activated by something during the main configuration. That could be a QUIET option to the install() command and/or a global setting like an INSTALL_QUIET global property or a CMAKE_INSTALL_QUIET variable. |
|
|
(0036226)
|
d3x0r
|
2014-06-19 12:14
(edited on: 2014-06-19 12:18) |
|
I disagree...
but then apparently I'm using the install feature out-of-scope with how it was intended...
For working with visual studio especially it just makes things easier to end up with a proper full package as expected.... and rather than having to modify each and every install command, and then I end up requiring a higher version of CMake just to have quiet installs... otherwise it will end up complaining about 'unknown something-or-other QUIET' with older versions.
so my general flow is to build into .../build/<generator>/<${CMAKE_BUILD_TYPE}_solution>/<project>/ which automatically is configured to install into .../build/<generator>/<${CMAKE_BUILD_TYPE}_output>/<project>/ this works very well, keeps watcom, mingw, visual studio builds consistent and seperate... and under _solution I have a dozen or so projects which depend on installed products from other projects. For deployment, can then just grab the contents of ..._output/* for signing and verification...
each top project can consist of more than a dozen subprojects... which results quickly in a permutation of 100's of modifications to INSTALL() command.
So doing a build_all of all projects results in a VERY long output as a lot of files are installed commonly from other projects. In this case it would be much easier to just copy USE_FOLDERS line and modify for the new property... which becomes dozens of non-impact modifications rather than hundreds of incompatible modifications
set_property(GLOBAL PROPERTY USE_FOLDERS ON )
set_property(GLOBAL PROPERTY QUIET_INSTALL ON )
And using visual studio to do a build on 'INSTALL' cannot use SET( $ENV{CMAKE_INSTALL_QUIET} ON ) because the environment is lost between each subsequent run.
|
|
|
(0036227)
|
Brad King
|
2014-06-19 12:35
|
|
Re 0013761:0036226: There are two separate commands involved: install() and file(INSTALL). The former is the command written by projects in CMake code. The latter is generated into cmake_install.cmake scripts. The latter should have options to program its behavior because its effects are immediate. This is where the QUIET option should be added. Then a global setting in the CMake project code can be used to tell the install code generator to pass the QUIET option to generated calls to file(INSTALL). This will allow more granular configuration in the future. |
|
|
(0036228)
|
d3x0r
|
2014-06-19 14:03
|
|
I see.
I don't know if this patch violates design philosophy... basically I end up passing cmake* (often referred to as this->Makefile->GetCMakeInstance() ) to cmScriptGenerator.
Then later during FILE( INSTALL ) generation I check the global property QUIET_INSTALL and emit QUIET option in FILE() command.
Removed forward propagation of global property.
Should I forward the cmMakefile instead? |
|
|
(0036229)
|
Brad King
|
2014-06-19 14:52
|
|
Re 0013761:0036228: The script generators should simply have an option for Quiet mode rather than trying to lookup a setting themselves. The 0001-Implement-install-.-QUIET-.-13761.v3.patch attachment already has much of that done. |
|
|
(0036231)
|
d3x0r
|
2014-06-19 16:19
(edited on: 2014-06-19 16:28) |
|
I'm not sure about this modification... should it go ahead and do the create anyway? Or return early?
--------------
+++ cmake-3.0.0/Source/cmFileCommand.cxx Thu Jun 19 13:04:09 2014
@@ -1611,7 +1611,11 @@
MatchProperties const& match_properties)
{
// Inform the user about this directory installation.
- this->ReportCopy(destination, TypeDir, true);
+ if( cmSystemTools::FileExists(destination) &&
+ cmSystemTools::FileIsDirectory(destination) )
+ this->ReportCopy(destination, TypeDir, false);
+ else
+ this->ReportCopy(destination, TypeDir, true);
// Make sure the destination directory exists.
if(!cmSystemTools::MakeDirectory(destination))
----------
ReportCopy() also adds the file to a 'manifest' which the previous patch would not do if the file was not copied... I think even though it is not reported and isn't really copied it should still be part of the installed manifest?
-----------
worked from last rc3 patch;
fixed a setlasterror which needed a .c_str()
added check for global property "QUIET_INSTALL" as an OR if not specified as an Install() option.
added help document for global property QUIET_INSTALL
Fixed(?) file not being added to manifest if not reported
On installing a directory, if the file exists, use ReportCopy(false) (not copied), otherwise use ReportCopy(true)... go through the motion of creating the directory anyway.
-------
I don't know that all install operations support the check for the global property... since this complicates the check places to many instead of 1 generator.... It does handle 'directory' 'files' 'programs' 'static_library' and 'shared_library'...
|
|
|
(0036244)
|
Brad King
|
2014-06-24 14:00
|
|
|
|
(0036542)
|
Brad King
|
2014-08-04 09:37
|
|
|
|
(0037606)
|
Robert Maynard
|
2015-01-05 08:39
|
|
Closing resolved issues that have not been updated in more than 4 months |
|