[CMake] requiring parallel building but sequential linking

2019-02-17 Thread Domen Vrankar
Hi,

I'm building llvm project with CMake.
While build process is compiling the code I prefer running "make -j3" on my
4 core pc (bumping processor to 100% on 3 of 4 cores and using up ~5 GB of
ram - part of it is system and not build related).
While build process is linking I must run "make" with a single job because
otherwise I run out of memory (cores do little work but ram usage goes past
23 GB).

Currently I'm handling this so that I first run "make -j3" and once I get
to about 90% (first larger linking) I hit ctrl+c and run "make".

Is there a feature in CMake that would support handling this transition of
parallel builds, sequential linking out of the box?
(while I'm mostly interested in Linux/make support, having the same feature
for Windows/nmake/ninja through the same command line cmake command would
be even better)

Thanks,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Beginning to compiling CMake file

2018-07-31 Thread Domen Vrankar
On Wed, Aug 1, 2018, 03:46 CrestChristopher 
wrote:

> Hi, I'm using CMake for Windows as I was informed that I couldn't use
> `make` as the CMakeLists.txt file was only for CMake.
>

CMake is a meta build system which means that on for example Linux it
henerates make fliles so CMakeLists.txt should be run with cmake to
generate those make files and then you run make in the build directory.

On Windows you usually use visual studio so cmake generates build and
project files for it there.

Not use make and use cmake instead in this case means that you should use
cmake to generate build files with cmake and not change generated build
files by hand. It doesn't mean that after running cmake you shouldn't run
make on those generated files if they were generated for make.

Within CMake for Windows I select the location of the source code which
> is the cloned repository which include the CMakeLists.txt file that I
> want to compile, followed by I select a folder where to build the
> binaries; I'm then prompt for a generator for the project. Up to this
> point am I doing this correctly ?
>

Michael already answered for you how to build it from command line on all
platforms (on Linux you can also use 'make' directly instead of running
'cmake - build'). If you selected to generate files for Visual Studio cmake
also generated vs project file so you can open it in ide and run build
there instead.

Hope this clarifies things a bit more.

Regards,
Domen

On 7/31/2018 12:56 PM, Michael Ellery wrote:
> > mkdir mybuild && cd mybuild
> > cmake -DCMAKE_BUILD_TYPE=Release ..
> > cmake —build .
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack multiple packages

2018-07-19 Thread Domen Vrankar
2018-07-19 18:00 GMT+02:00 dbegun via CMake :

> I have a project where a lib and a binary requiring the lib are built in
> separate subdirs of the project root. Each dir contains its own
> CMakeLists.txt with build/install targets, and there is also a top level
> one, which mainly just adds subdirectories etc.
> I want to add .deb package generation with cpack. When I place the
> following in either of the inner CMakeLists, a package containing the
> binary is built.
>
> set(CPACK_BINARY_DEB "ON")
> set(CPACK_GENERATOR "DEB")
> set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
> set(CPACK_PACKAGE_VERSION ${PROJ_VERSION})
> set(CPACK_PACKAGE_CONTACT "Denis Begun dbegun@protonmail.
> com")
> set(CPACK_PACKAGE_DESCRIPTION "proj")
> set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
> include(CPack)
>
> If I place it in both inner lists, nothing changes. If I place it in the
> top level CMakeList.txt, nothing is generated. The problem is that the
> package doesn't contain the library, so the binary can't run after
> installation.
>
> What's the right direction to look in?
>

Have you tried placing the include(CPack) at the bottom of the top level
CMakeLists.txt after the rest of the CMakeLists.txt files have been
included?

Regards,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack per-component value for CPACK_PACKAGING_INSTALL_PREFIX when using RPM generator

2018-01-04 Thread Domen Vrankar
2018-01-04 22:42 GMT+01:00 Sam Lunt :

> Hi Domen,
>
> Thanks for the reply, but that doesn't seem to work for me. I modified
> my example to add this function call:
>
> list(APPEND CPACK_RPM_RELOCATION_PATHS
> ${CPACK_PACKAGING_INSTALL_PREFIX}
> )
>

The documentation states that CPACK_PACKAGING_INSTALL_PREFIX is prepended
so the way you are using it not how it is supposed to be used.

With your example above I'd do something like this:

include(GNUInstallDirs)
install(TARGETS foo
DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT Foo_Comp
)

install(TARGETS bar
DESTINATION "a/b/c"
COMPONENT Bar_Comp
)

list(APPEND CPACK_RPM_RELOCATION_PATHS
"${CMAKE_INSTALL_BINDIR}" "a/b/c"
)

set(CPACK_PACKAGING_INSTALL_PREFIX "/")

This will make "/", "/${CMAKE_INSTALL_BINDIR}" and "/a/b/c" relocatable
(and if you want to skip / just set CPACK_PACKAGING_INSTALL_PREFIX).

There was a bug in older versions of CPack that CPACK_PACKAGING_INSTALL_PREFIX
could not be set to / (it was fixed by this commit
https://gitlab.kitware.com/cmake/cmake/merge_requests/583/diffs in CMake
3.9 so you can backport it if you want to as it is a small change to
CPackRPM.cmake file).


>
> that silences the warnings, but it still prepends the
> CPACK_PACKAGING_INSTALL_PREFIX when generating the RPM files, while I
> want it to prepend CPACK_RPM__PACKAGE_PREFIX.
>
> So if I call "rpm -qlp FooBar-0.1.0-Linux-Bar_Comp.rpm", it outputs:
> /tmp_dir/foobar
> /tmp_dir/foobar/bin
> /tmp_dir/foobar/bin/bar
>
> (CPACK_PACKAGING_INSTALL_PREFIX = /tmp_dir/foobar)
>
> I want it to output:
>
> /tmp_dir/bar
> /tmp_dir/bar/bin
> /tmp_dir/bar/bin/bar
>
> (CPACK_RPM_BAR_COMP_PACKAGE_PREFIX = /tmp_dir/bar)
>
> It seems like cpack is prepending the CPACK_PACKAGING_INSTALL_PREFIX
> to any relative paths before actually calling the CPackRPM.cmake
> module, so by the time CPackRPM sees the paths, it is seeing
> /tmp_dir/foobar/bin/bar and /tmp_dir/foobar/bin/foo, while I want it
> to see /tmp_dir/bar/bin/bar and /tmp_dir/foo/bin/foo. Maybe there is
> no way to achieve this currently?
>

What you are trying to achieve seems odd to me particularly since your rpms
will be relocatable so why would you want to create the structure of
/some_dir/bar_dir/bin/repeated_bar_dir instead of /bin/bar or
/tmp_dir/bin/bar with either / for the first case or /tmp_dir for the
second case being relocatable?

Regards,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack per-component value for CPACK_PACKAGING_INSTALL_PREFIX when using RPM generator

2018-01-04 Thread Domen Vrankar
2018-01-03 22:40 GMT+01:00 Sam Lunt :

> I am trying to set a per-component value for
> CPACK_PACKAGING_INSTALL_PREFIX when using the RPM generator, but I
> haven't been able to do so.
>
> I would like to be able to:
> 1. Install using "make install" (or cmake --build ${BUILD_DIR}
> --target install) and have CMAKE_INSTALL_PREFIX control the install
> location
> 2. Generate an rpm file for each component such that the rpm is
> relocatable (i.e. --prefix and --relocate are supported) and each
> component has a different default installation location
>
> The documentation for CPACK_RPM__PACKAGE_PREFIX seems to
> indicate that it is the correct way to set a per-component install
> prefix, since it says that CPACK_RPM__PACKAGE_PREFIX "May
> be used to set per component CPACK_PACKAGING_INSTALL_PREFIX for
> relocatable RPM packages." However, I am only able to successfully use
> this if I provide an absolute path to the install command, but that
> inhibits the use of CMAKE_INSTALL_PREFIX.
>

How about using CPACK_RPM_RELOCATION_PATHS?
https://cmake.org/cmake/help/v3.10/module/CPackRPM.html#variable:CPACK_RPM_RELOCATION_PATHS

install(DIRECTORY DESTINATION ${CMAKE_INSTALL_LIBDIR}/some_dir COMPONENT
libraries)
set(CPACK_RPM_RELOCATION_PATHS "${CMAKE_INSTALL_INCLUDEDIR}"
  "${CMAKE_INSTALL_LIBDIR}")

You specify all the relocation paths for all components and if one or more
of them are found during package generation that path is written to the
package as a relocation path.
You can also use
https://cmake.org/cmake/help/v3.10/module/CPackRPM.html#variable:CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION
to discard CPACK_PACKAGING_INSTALL_PREFIX as a relocation path.

This feature can also (is prefered to) be used in combination with
GNUInstallDirs module (
https://cmake.org/cmake/help/v3.10/module/GNUInstallDirs.html?highlight=gnuinstalldirs
):

include(GNUInstallDirs)

Regards,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Problem with created debian package

2018-01-02 Thread Domen Vrankar
2017-12-30 6:29 GMT+01:00 Kornel Benko :

> > 2) use gnu tar instead by setting CPACK_DEBIAN_ARCHIVE_TYPE to gnutar
>
> Thanks, this is really nice. Meanwhile I found out what was going wrong.
> The package manager seems to not understand the way some filenames
> containing
> non-ascii chars are coded by cpack.
> I prepared a minimal example showing the effect here.
>
> 1.) Create a dir and copy the attached to it
> 2.) mkdir build; cd bild
> 3.) cmake .. -DCPACK_BINARY_DEB:BOOL=ON
> 4.) sudo dpkg -i wrongfilename-0.1.1-Linux.deb
> (Reading database ... 422665 files and directories currently
> installed.)
> Preparing to unpack wrongfilename-0.1.1-Linux.deb ...
> Unpacking wrongfilename (0.1.1) ...
> dpkg: error processing archive wrongfilename-0.1.1-Linux.deb
> (--install):
>  corrupted filesystem tarfile - corrupted package archive
> Errors were encountered while processing:
>  wrongfilename-0.1.1-Linux.deb
>

Thanks for the example.

The "use gnu tar option with CPack" produces a valid package for your
example:
set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")

It would seem that non gnu version doesn't handle non ascii filenames
correctly. I'm not certain if it's an libarchive bug or expectedly
unsupported feature (it would seem that it's a bug...) - I'll have to
investigate further.

Thanks,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Problem with created debian package

2017-12-29 Thread Domen Vrankar
2017-12-29 14:20 GMT+01:00 Kornel Benko :

> All of sudden, cmake(cpack) started producing wrong debian packages for
> one project.
>

Did the project change in some way or was it the packaging environment that
changed?
I'd like to know a bit more details even if the solution below works to
determine if this was a regression in CPack or something else.


> This is the output of debian package manager:
>
> dpkg: warning: downgrading lyx24 from 2.4.0-50424git-g3a4b233 to
> 2.4.0-50422git-gd6fb2ab
> (Reading database ... 422667 files and directories currently
> installed.)
> Preparing to unpack lyx24-2.4.0-50422git-Linux.deb ...
> Unpacking lyx24 (2.4.0-50422git-gd6fb2ab) over
> (2.4.0-50424git-g3a4b233) ...
> dpkg: error processing archive lyx24-2.4.0-50422git-Linux.deb
> (--install):
>  corrupted filesystem tarfile - corrupted package archive
> dpkg-deb: error: subprocess paste was killed by signal (Broken
> pipe)
> Errors were encountered while processing:
>  lyx24-2.4.0-50422git-Linux.deb
>
> Analysing the data.tar.gz gives no hint. What helps is a sequence of
> commands using the system's 'tar'.
>
> # ar xv  lyx24-2.4.0-50422git-Linux.deb  data.tar.gz
> # sudo tar axf data.tar.gz
> # tar cf data.tar ./usr
> # gzip -f data.tar
> # ar rv  lyx24-2.4.0-50422git-Linux.deb  data.tar.gz
>
> Now everything is OK.
> Other projects do not show this behaviour.
> This is cmake 3.10.20171229-g3e1f5b11, but the same happens with earlier
> version.
>

I'm surprised that this fixed the problem but from what you're describing
I'd say that some paths in the data tarball are too long for the paxr
version of tar to handle correctly (this is the default tar that is used by
CPack and debian packages as it is the most portable one).
If I'm right you could:

1) shorten the file paths in the archive
2) use gnu tar instead by setting CPACK_DEBIAN_ARCHIVE_TYPE to gnutar

See
https://cmake.org/cmake/help/v3.10/module/CPackDeb.html#variable:CPACK_DEBIAN_ARCHIVE_TYPE

Regards,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMP0022 documentation is outdated

2017-12-23 Thread Domen Vrankar
2017-12-23 13:25 GMT+01:00 Alan W. Irwin :

> On 2017-12-19 14:18-0800 Alan W. Irwin wrote:
>
> I have a software project with a dated CMake-based build system that
>> specifically set CMP0022 to OLD.  So while updating that build system
>> I naturally consulted the latest CMP0022 documentation, e.g.,
>> > >, and
>> discovered that documentation was outdated, e.g.,
>> lots of historical references to CMake-2.8 which are likely no
>> longer needed, and the following recommendation
>>
>> Warning-free future-compatible code which works with CMake 2.8.7
>> onwards can be written by using the LINK_PRIVATE and LINK_PUBLIC
>> keywords of target_link_libraries().
>>
>> (The obvious problem with that advice is that LINK_PRIVATE and
>> LINK_PUBLIC are now deprecated themselves!)
>>
>> IF cmake-4 is coming soon and presuming that CMP0022 OLD behaviour
>> will no longer be supported by that version of cmake, then you may not
>> want to do anything about this outdated documentation since it will
>> be removed with cmake-4.
>>
>> But otherwise for current needs like mine (updating an old build system
>> that specifically set CMP0022 to OLD) a complete rewrite would
>> be a good idea with the emphasis on simplifying down to one
>> or two sentences such as
>>
>> Support for CMP0022 OLD behaviour is scheduled for removal with
>> cmake-4 [if that decision has indeed already been made] so do not set
>> this policy to OLD for new build systems.  But if you need to know
>> details about CMP0022 OLD behaviour in order to upgrade an old build
>> system that currently requires the OLD version of this policy, see the
>> target_link_libraries() documentation.
>>
>
> Hmm.  I got no responses to the above.  So I guess the conclusion is
> it's a very low priority to update the documentation of ancient
> policies like this one.  I guess that's fine if the plan is these
> ancient policies will finally be retired as of CMake-4 AND that new
> major version of CMake (which presumably will be allowed to break
> backwards compatibility) is coming reasonably soon.


I don't know what the plans regarding bumping CMake major version or
deprecating old policies are but I remember talks about deprecating some of
them on the mailing list - couldn't find the mails though... but found this
merger request that was already merged:
https://gitlab.kitware.com/cmake/cmake/merge_requests/743

It deprecates OLD policies for CMP0036 and below so the policy you are
talking about falls into that category.

You should raise an issue in CMake gitlab bug tracker:
https://gitlab.kitware.com
And perhaps also create merge request with the documentation changes/clean
up. The link you've provided already contains a note that OLD CMP0022 is
deprecated so perhaps it only needs deletion of some text or even deletion
of the entire text and replacing it with a note that policy no longer works
so it should not be used (maybe even deleting the policy from the code if
it still exists in there).

Regards,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [CMake] Installing and exporting multiple configurations of the same library

2017-12-16 Thread Domen Vrankar
2017-12-16 0:18 GMT+01:00 Saad Khattak :

> Hi,
>
> I have 4 configurations (2 for Debug and 2 for Release) and I would like
> to install the libraries such that they are installed in the correct
> directories.
>
> Installing without worrying about configurations looks like this:
>
> install(TARGETS ${LIB_NAME}
> EXPORT ${LIB_NAME}Config
> PUBLIC_HEADER DESTINATION "include/${LIB_NAME}"
> LIBRARY DESTINATION "bin/${LIB_NAME}/"
> ARCHIVE DESTINATION "lib/${LIB_NAME}/"
> )
>
> However, different configurations overwrite the binaries. So instead, I
> did something like this (I'm going over all my configurations in a foreach):
>
> install(TARGETS ${LIB_NAME}
> CONFIGURATIONS DEBUG
> EXPORT ${LIB_NAME}Config
> PUBLIC_HEADER DESTINATION "include/${LIB_NAME}"
> LIBRARY DESTINATION "bin/${LIB_NAME}/debug/"
> ARCHIVE DESTINATION "lib/${LIB_NAME}/debug"
> )
>
> install(TARGETS ${LIB_NAME}
> CONFIGURATIONS RELEASE
> EXPORT ${LIB_NAME}Config
> PUBLIC_HEADER DESTINATION "include/${LIB_NAME}"
> LIBRARY DESTINATION "bin/${LIB_NAME}/release/"
> ARCHIVE DESTINATION "lib/${LIB_NAME}/release/"
> )
>
> however, that results in the error:
> CMake Error: INSTALL(EXPORT ...) includes target "MyLibrary" more than
> once in the export set.
>
> The error makes sense, in that I cannot have multiple exports in the same
> export set, in this case ${LIB_NAME}Config. However, I would like CMake to
> choose a different directory based on the configuration.
>

A simple solution would be to write

install(TARGETS ${LIB_NAME}
CONFIGURATIONS DEBUG
EXPORT ${LIB_NAME}Config-d
PUBLIC_HEADER DESTINATION "include/${LIB_NAME}"
LIBRARY DESTINATION "bin/${LIB_NAME}/debug/"
ARCHIVE DESTINATION "lib/${LIB_NAME}/debug"
)

install(TARGETS ${LIB_NAME}
CONFIGURATIONS RELEASE
EXPORT ${LIB_NAME}Config
PUBLIC_HEADER DESTINATION "include/${LIB_NAME}"
LIBRARY DESTINATION "bin/${LIB_NAME}/release/"
ARCHIVE DESTINATION "lib/${LIB_NAME}/release/"
)

and then use FILE parameter for install(EXPORT ... FILE
${LIB_NAME}Config.cmake ...) command to rename the file from
${LIB_NAME}Config-d.cmake to ${LIB_NAME}Config.cmake.

See here for details:
https://cmake.org/cmake/help/latest/command/install.html#installing-exports.

Also one thing that you can do is set:

set(CMAKE_DEBUG_POSTFIX "-debug")

so that your libraries when built in Debug mode will automatically get
-debug suffix (example: my_lib.so for Release and my_lib-debug.so for
debug). This way you don't need to install the library in two separate sub
directories (named debug/ and release/ in your case).


> Now there is a workaround... sort of. I could name the binaries based on
> the configuration but that doesn't work with our existing build systems. We
> want the following:
>
> lib/${LIB_NAME}/${CONFIG}/libname
>
> Any way to get CMake to install the libraries this way?
>

Not certain what the intended way of doing this debug/releas export on
Linux is as you can only build one build type at a time but the
install(EXPORT ...) command already generates:
${LIB_NAME}Config.cmake and ${LIB_NAME}Config-debug.cmake or
${LIB_NAME}Config-release.cmake

If you install the files in two separate directories and diff them you'll
notice that ${LIB_NAME}Config.cmake files (and Version files if you
generate one) are the same and -debug.cmake and -release.cmake differ so
possibly it's intended to simply override the two files and don't care
about it since the build specific files are exported under different names
and included automatically in ${LIB_NAME}Config.cmake file anyway.

I hope somebody else will shed some light on this part.

Regards,
Domen
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack: Create debian packge for each sub-project

2017-12-04 Thread Domen Vrankar
2017-12-04 20:35 GMT+01:00 DKLind <davidkl...@gmail.com>:

> Domen Vrankar wrote
> > I'm a bit confused. Is there something missing in the patch?
> > Attached patch only adds per component version override - it doesn't even
> > touch the multiple calls to `include(CPack)` and naming of different
> > packages (not their components but different package names).
> >
> > Could you please provide a simple example of the intended use for
> > packaging
> > of multiple packages with multiple sub-packages?
>
> I have a macro that each sub-project calls. See package macro below.
>
> Each sub project calls CMake install for it's various pieces (.so, .conf,
> init.d, etc.) then:
> For a simple library package:
> package(${PROJECT_NAME}
> ${LIBRARY_VERSION}
> "My library description"
> )
>
> For a daemon package:
> package(${PROJECT_NAME}
> ${DAEMONX_VERSION}
> "My daemonx description"
> ${CMAKE_SOURCE_DIR}/daemonx/debian/DEBIAN/conffiles;
> ${CMAKE_SOURCE_DIR}/daemonx/debian/DEBIAN/postinst;
> ${CMAKE_SOURCE_DIR}/daemonx/debian/DEBIAN/postrm;
> ${CMAKE_SOURCE_DIR}/daemonx/debian/DEBIAN/prerm
> )
>
> The last thing the top level CMakeLists.txt does is:
> string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
> if(${CMAKE_BUILD_TYPE} STREQUAL release)
> set(CPACK_STRIP_FILES TRUE)
> endif()
>
> string(REGEX REPLACE "([0-9]+).*$" "\\1" BUILD_MAJOR_VERSION
> ${BUILD_VERSION})
> string(REGEX REPLACE "[0-9]+\\.([0-9]+).*$" "\\1" BUILD_MINOR_VERSION
> ${BUILD_VERSION})
> string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
> BUILD_PATCH_VERSION ${BUILD_VERSION})
>
> set(CPACK_GENERATOR DEB)
> set(CPACK_PACKAGE_VERSION_MAJOR ${BUILD_MAJOR_VERSION})
> set(CPACK_PACKAGE_VERSION_MINOR ${BUILD_MINOR_VERSION})
> set(CPACK_PACKAGE_VERSION_PATCH ${BUILD_PATCH_VERSION})
> set(CPACK_PACKAGE_VERSION ${BUILD_VERSION})
> set(CPACK_DEBIAN_PACKAGE_MAINTAINER "maintainer <maintai...@xyx.com>")
> set(CPACK_PACKAGE_VENDOR xyz)
>
> set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
>
> set(CPACK_DEB_COMPONENT_INSTALL TRUE)
> set(CPACK_DEB_PACKAGE_COMPONENT TRUE)
>
>
> In the macro, CPACK_DEBIAN_${TARGET}_PACKAGE_VERSION works because of the
> patch.
>
>
> macro(package target version description)
> string(TOUPPER ${target} TARGET)
>
> string(REGEX REPLACE "([0-9]+).*$" "\\1" BUILD_MAJOR_VERSION
> ${version})
> string(REGEX REPLACE "[0-9]+\\.([0-9]+).*$" "\\1" BUILD_MINOR_VERSION
> ${version})
> string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
> BUILD_PATCH_VERSION ${version})
>
> set(CPACK_DEBIAN_${TARGET}_PACKAGE_NAME ${target} CACHE STRING
> "package
> ${target}")
> set(CPACK_DEBIAN_${TARGET}_PACKAGE_VERSION ${version} CACHE STRING
> "package ${target}")
> set(CPACK_DEBIAN_${TARGET}_PACKAGE_SECTION main CACHE STRING "package
> ${target}")
> set(CPACK_DEBIAN_${TARGET}_PACKAGE_PRIORITY standard CACHE STRING
> "package ${target}")
> set(CPACK_DEBIAN_${TARGET}_PACKAGE_ARCHITECTURE
> ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "package ${target}")
> set(CPACK_COMPONENT_${TARGET}_DESCRIPTION ${description} CACHE STRING
> "package ${target}")
> set(CPACK_DEBIAN_${TARGET}_PACKAGE_CONTROL_EXTRA ${ARGN} CACHE STRING
> "package ${target}")
>
> set(CPACK_DEBIAN_${TARGET}_FILE_NAME
> ${target}_${version}_${CMAKE_PACKAGE_PLATFORM}.deb CACHE STRING "package
> ${target}")
> endmacro()
>

Try using this on CPackRPM with debuginfo packages or rpm default naming
convention enabled (with this second part it's the same with CPackDeb
apckages) - these are just two parts that you break that immediately come
to mind.
Now you have to rename every package by hand, require a non standard macro
just to set things up, you forfeit instead of gain automation (e.g. auto
component deduction from install commands, package naming...). And you
still cant override all the variables (e.g. maintainer).

While this might be enough for your use case and CPackDeb it wouldn't play
nice with all CPackRPM features so it would cause them to diverge even
further.

I'm still not convinced that it's worth it.

Regards,
Domen
-- 

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

Re: [CMake] INTERFACE libraries and -config.cmake files

2017-12-04 Thread Domen Vrankar
2017-12-04 23:17 GMT+01:00 Saad Khattak :

> Hi,
>
> I have an interface library and I am not sure how I would get CMake to
> generate the usual -config.cmake file for the library so that I can
> then use "find_package" on the interface library from an external project.
>
> I am adding (and installing) the library like this:
>
> add_library(myLib INTERFACE)
> target_include_directories(myLib INTERFACE
> $
> $
> )
>
> and then installing like this:
>
> install(TARGETS myLib EXPORT myLib_targets INCLUDES DESTINATION include)
> install(EXPORT myLib_targets DESTINATION "lib/cmake")
> install(FILES ${MY_HEADERS} DESTINATION "include/")
>
> Obviously, I am doing it wrong or missing some steps as I do not see the
> myLib-config.cmake file anywhere in the install folder (or the build
> directory for that matter) that is usually generated when using install
> commands.
>
> Ultimately, I would like to use the "find_package" command on the
> interface library from another CMake project.
>

install(EXPORT myLib_targets ,..) will produce myLib_targets.cmake file if
I remember correctly from the top of my head. Just rename it to
"install(EXPORT mylib-config ...)" or create a new config file named
"myLib-config.cmake" and include cmake script produced by the export in
there.

You'll probably also want to create a version file with something like this:

include(CMakePackageConfigHelpers)
write_basic_package_version_file("mylib-config-version.cmake"
  VERSION ${myLib_VERSION}
  COMPATIBILITY SameMajorVersion
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mylib-config-version.cmake"
  DESTINATION lib/cmake
)

Hope this helps.

Regards,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-12-04 Thread Domen Vrankar
2017-12-04 19:57 GMT+01:00 DKLind <davidkl...@gmail.com>:

> Domen Vrankar wrote
> > product_1-component_1-1.0.0
> > product_1-component_2-1.0.0
> > product_2-component_1-3.5.7
> > product_2-component_2-3.5.7
>
> This too is what my patch fixes. Attached is the patch.
>
> CPackDeb.patch
> <http://cmake.3232098.n2.nabble.com/file/t397522/CPackDeb.patch>
>

I'm a bit confused. Is there something missing in the patch?
Attached patch only adds per component version override - it doesn't even
touch the multiple calls to `include(CPack)` and naming of different
packages (not their components but different package names).

Could you please provide a simple example of the intended use for packaging
of multiple packages with multiple sub-packages?

Thanks,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-12-01 Thread Domen Vrankar
2017-12-01 18:04 GMT+01:00 Domen Vrankar <domen.vran...@gmail.com>:

> 2017-12-01 16:47 GMT+01:00 DKLind <davidkl...@gmail.com>:
>
>> This is precisely my situation. I have a large project where 50+ packages
>> are
>> generated. I wanted, needed, to be able to set each packages' version
>> uniquely. Using the CPACK_DEBAIN__PACKAGE_VERSION variable
>> seemed
>> to be the correct way, except it doesn't work. My patch allows
>> CPACK_DEBAIN__PACKAGE_VERSION to be recognized by CPack and
>> it's
>> value used when the package is created. The patch doesn't break the
>> existing
>> functionality of CPACK_PACKAGE_VERSION being used. It simply checks to see
>> of CPACK_DEBAIN__PACKAGE_VERSION is set. If it is, use it's
>> value. It isn't not set use the value of CPACK_PACKAGE_VERSION.
>>
>
> This is exactly what I've described in the reply to Craig. If projects are
> related they should have the same version and release notes and if they
> aren't and are instead just depending on each other (your case) they should
> have a different package name with its own sub-packages, release notes and
> versions. Simply changing the version and release notes but still
> containing one base package name is confusing, hard to maintain and in my
> opinion abusal of sub-packages as the Linux distros that use Rpm and Deb
> packages know them.
>
> This is a case where ExternalProject would be a valid choice but I'm
> guessing that you decided against it as it causes issues when the projects
> are still interdependent enough to warrant extension of functionality on
> all (some) of them at the same time. This was the case on one of the
> projects on which I've worked for a few years now where you have a core and
> different modules that are installed at different clients but not all at
> once (e.g. client one has modules 1, 2 and 3 while client two has 1, 3, 4
> and 5). For such a project you can put everything into one project and
> write "make install" which sets up your entire development environment
> where you can test all the modules interacting with each other and make
> improvements on them.
>
> So my patch adds an alternative to ExternalProject for such cases but
> still packages all of the projects as if they were stand alone projects - a
> superbuild.
>

Craig, David the usual (expected) way of packaging things is (per package
group versioning - currently supported and what my MR enables):

product_1-component_1-1.0.0
product_1-component_2-1.0.0
product_2-component_1-3.5.7
product_2-component_2-3.5.7

And what you are suggesting is (per component versioning):

distro_or_company-product_1-1.0.0
distro_or_company-product_2-3.5.7

On the product where I worked the compromise was to package:

product-component_1_1-1.0.0_3.5.7
product-component_1_2-1.0.0_3.5.7
product-component_2_1-1.0.0_3.5.7
product-component_2_2-1.0.0_3.5.7

Which I would say that it's a bad solution but it gave us what we needed -
group of products that can be built and tested together without a
combination of ExternalProject commands and a build_all.sh script, have
components but their versions increase independently.

The first option is supported by the intuitive use of Linux distributions
by simply running something like "sudo apt search libboost" but it's
possible that the alternative way of packaging is possibly also feasible
for others (and what we did is simply an ugly compromise hack when you need
to hurry and don't want to extend CPack).

Given all of this and if both my proposal and the alternative would be
already implemented in CMake/CPack would you be using the alternative
version from time to time or not?

The alternative would be from my point of view confusing and would probably
add additional custom CPack variable per-component override requirements
but if you think that it would be useful or if my MR is too far off from
where CMake should be going it would still be feasible to implement the per
component version/release notes override.

What do you think?

Thanks,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-12-01 Thread Domen Vrankar
2017-12-01 16:47 GMT+01:00 DKLind :

> This is precisely my situation. I have a large project where 50+ packages
> are
> generated. I wanted, needed, to be able to set each packages' version
> uniquely. Using the CPACK_DEBAIN__PACKAGE_VERSION variable
> seemed
> to be the correct way, except it doesn't work. My patch allows
> CPACK_DEBAIN__PACKAGE_VERSION to be recognized by CPack and
> it's
> value used when the package is created. The patch doesn't break the
> existing
> functionality of CPACK_PACKAGE_VERSION being used. It simply checks to see
> of CPACK_DEBAIN__PACKAGE_VERSION is set. If it is, use it's
> value. It isn't not set use the value of CPACK_PACKAGE_VERSION.
>

This is exactly what I've described in the reply to Craig. If projects are
related they should have the same version and release notes and if they
aren't and are instead just depending on each other (your case) they should
have a different package name with its own sub-packages, release notes and
versions. Simply changing the version and release notes but still
containing one base package name is confusing, hard to maintain and in my
opinion abusal of sub-packages as the Linux distros that use Rpm and Deb
packages know them.

This is a case where ExternalProject would be a valid choice but I'm
guessing that you decided against it as it causes issues when the projects
are still interdependent enough to warrant extension of functionality on
all (some) of them at the same time. This was the case on one of the
projects on which I've worked for a few years now where you have a core and
different modules that are installed at different clients but not all at
once (e.g. client one has modules 1, 2 and 3 while client two has 1, 3, 4
and 5). For such a project you can put everything into one project and
write "make install" which sets up your entire development environment
where you can test all the modules interacting with each other and make
improvements on them.

So my patch adds an alternative to ExternalProject for such cases but still
packages all of the projects as if they were stand alone projects - a
superbuild.

Regards,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-12-01 Thread Domen Vrankar
2017-12-01 5:41 GMT+01:00 Craig Scott <craig.sc...@crascit.com>:

>
>
> On Fri, Dec 1, 2017 at 11:15 AM, Domen Vrankar <domen.vran...@gmail.com>
> wrote:
>
>> 2017-11-29 17:07 GMT+01:00 DKLind <davidkl...@gmail.com>:
>>
>>> I have finally found time to work on a patch so
>>> CPACK_DEBAIN__PACKAGE_VERSION is recognized. I am amazed how
>>> simple the fix actually is.
>>>
>>> I plan on submitting a formal patch soon for Debian and RPM. I don't know
>>> anything about other CMake packaging features that might benefit from
>>> this
>>> patch.
>>>
>>
>> Hi,
>>
>> I've also been working on a bit larger feature extension that would
>> possibly be of interest to you: https://gitlab.kitware.com/cma
>> ke/cmake/merge_requests/1545
>>
>> I haven't decided on implementing per component versioning since it makes
>> no sense to version different components of the same release differently
>> unless they are a separate project which requires more variable overrides
>> and manual setting of components - ExternalProject seems a better
>> alternative in such cases. Maybe your solution can convince me otherwise.
>>
>
> An example where per-component versions would be really useful is if you
> have one large build that produces multiple products (i.e. one git repo and
> one CMake build). You may want to be able to create a release package for
> each product, but if each product has its own distinct version number, then
> you currently can't quite do it with CMake for some package types. I have
> exactly this situation at work at the moment. In one project, I get away
> with it because the release packages are tar balls so I just provide a
> custom name that embeds the version number for each product using
> CPACK_ARCHIVE__FILE_NAME. But I have other projects which
> produce RPMs and for those I don't currently have a solution.
>

The thing is that components are one package split into sub-packages which
are still connected under the same base package name so they should be of
the same version (e.g. I'd be surprised to download Boost rpm packages that
have different version for each component [filesystem, ASIO, Spirit, ...]
and still claim to be the same package group/release).

In super/uber build multiple projects require multiple packages of which
each can have sub-package components and in this case it is logical that
each project has its own package name, version, release notes, debug
package(s) etc.

This is what I'm trying to address with my MR that is work in progress for
now and since it requires changes not just to CPack but also CMake I've
pushed before I invest the time to write all the tests to see what other
people think about it.

As DKLind already found out the addition of per component overrides for
CPack Deb and RPM is trivial but for the past two years I've had the
(possibly misguided) opinion that the first/trivial solution is the wrong
one.

Regards,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-11-30 Thread Domen Vrankar
2017-11-29 17:07 GMT+01:00 DKLind :

> I have finally found time to work on a patch so
> CPACK_DEBAIN__PACKAGE_VERSION is recognized. I am amazed how
> simple the fix actually is.
>
> I plan on submitting a formal patch soon for Debian and RPM. I don't know
> anything about other CMake packaging features that might benefit from this
> patch.
>

Hi,

I've also been working on a bit larger feature extension that would
possibly be of interest to you:
https://gitlab.kitware.com/cmake/cmake/merge_requests/1545

I haven't decided on implementing per component versioning since it makes
no sense to version different components of the same release differently
unless they are a separate project which requires more variable overrides
and manual setting of components - ExternalProject seems a better
alternative in such cases. Maybe your solution can convince me otherwise.

Thanks,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-07-23 Thread Domen Vrankar
2017-07-23 17:19 GMT+02:00 DKLind :

> Also, curious why CPACK_*COMPONENT*__DESCRIPTION is different
> from the other CPACK_*DEBIAN*__PACKAGE_XXX?
>

Most variables are debian package specific/allow to override general CPack
variables specifically for debian packages. For e.g. package description is
set to:
  if CPACK_DEBIAN_PACKAGE_DESCRIPTION # debian specific override
  else if CPACK_PACKAGE_DESCRIPTION_SUMMARY # general package description

There is no particular reason why per component version can't be overridden
by a debian packager specific variable - you would usually want to have a
single description for the same component no matter the package format
(deb, rpm, ...).

With your help, I have individual packaging working now, except for unique
> version. I also realize that I would like to be able to set the contributor
> for some packages to be unique.
>

Per component variable for these variables was not introduced since


> I would like to contribute to CMake. I see the page
> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=
> CONTRIBUTING.rst;hb=master.
> It mentions submitting contributions in patch form. Are pull requests also
> accepted?
>

As described in the link that you've provided create a gitlab account here:
https://gitlab.kitware.com/cmake/cmake
and create a merge request (gitlab equivalent to pull request on github).

2017-07-23 17:37 GMT+02:00 DKLind :

> I forgot, I also have a question about "make package". How do I build and
> package just an individual sub-project. As expected, "make "
> works to build, but there isn't a default target to package an individual
> sub-project.
>

You can set CPACK_COMPONENTS_ALL variable to contain only the components
that you wish to package:

set(CPACK_COMPONENTS_ALL applications libraries headers)

By default it's set by CPack to contain all components.

Regards,
Domen
-- 

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

Re: [CMake] CPack: Create debian packge for each sub-project

2017-07-21 Thread Domen Vrankar
2017-07-22 1:55 GMT+02:00 DKLind :

> I have a large project and I need to create a Debian package for each
> sub-project (essentially each add_subdirectory).
>
> I have been experimenting with CPack components as outlined here:
> https://cmake.org/cmake/help/v3.8/module/CPackComponent.
> html?highlight=cpack_components_grouping#variable:
> CPACK_COMPONENTS_GROUPING
>

Debian packaging generator specific variables are described here:
https://cmake.org/cmake/help/v3.8/module/CPackDeb.html


> I haven't been able to get any CPACK_DEBIAN__PACKAGE_XXX
> variables to work. I've been using the syntax
> CPACK_DEBIAN_${PROJECT_NAME}_PACKAGE_XXX.
>

I'm guessing that ${PROJECT_NAME} contains lower case characters -
 (called  in documentation) part of the variable name
is supposed to be in upper case.


> I'm calling install as:
> install(TARGETS ${PROGRAM_NAME} DESTINATION lib COMPONENT ${PROGRAM_NAME})
> This way each sub-project is a unique component.
>

This looks fine.


> I would expect that CPackConfig.cmake would contain an entry for each
> CPACK_DEBIAN__PACKAGE_XXX variable. But, I'm seeing only
> variables for the last sub-project that called "include(CPack)".
>

Only the top level CMakeLists.txt should call 'include(CPack)' and the rest
of the CMakeLists.txt (if they can be used stand alone) should only call it
if they are the base binary dir:

if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR)
include(CPack)
endif()

The reason is that including this script generates CPackConfig.cmake and
CPackSourceConfig.cmake files from already set variables.

Here are my requrements:
> 1. Each package must have a unique control file info (version, description,
> etc).
>

Description part is not a problem but the version part is - currently only
one version for all packages is used and can't be set per component. Using
ExternalProject instead of subdirectories would be one solution, the other
would be extending CPackDeb.cmake module (contribution would be welcome).


> 2. Each package filename must be
> ${PROGRAM_NAME}_${VERSION}_${ARCHITECTURE}.deb
>

For package names I'd suggest using:

set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")

to get the default deb package file name format but if you wish to use your
naming convention you can set the per component version for each package.

Regards,

Domen
-- 

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

Re: [CMake] CPack and user .spec file

2017-06-20 Thread Domen Vrankar
>
> I have an application repository that is built with CMake, but
> requires additional/custom handling when packaging -- hence the need
> for a custom .spec file.


Can this not be done from CMakeLists.txt by setting some additional CPACK_*
variables depending on the build environment?


> After running CMake and make to generate the
> artifacts, 'make package' (CPack) tells me that the source tar.gz
> isn't found. The  'Source' directive inside my .spec file contains a
> name that is different from the name of the repository or the
> application.
>

Not certain what exactly you're doing here - while creating binary packages
Source directive is not used (CPackRPM is always the build driver so the
build phase of rpm is skipped and instead the CPackRPM prepared/built files
are used directly). Are you trying to produce a binary or a source rpm?

If the answer is binary then you'll have to change your spec file. First
generate a spec file template by setting
CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
[1]

and then change it to suit your needs.

For examples you can look into CPack tests [2]

(CUSTOM_BINARY_SPEC_FILE test is using a custom spec file).

Regards,

Domen

[1]
https://cmake.org/cmake/help/v3.6/module/CPackRPM.html#variable:CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
[2] https://github.com/Kitware/CMake/tree/master/Tests/RunCMake/CPack/tests
-- 

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

Re: [CMake] RPM package and relocation

2017-05-10 Thread Domen Vrankar
>
> > set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp-suite)
> > install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp/" DESTINATION
> ${INSTALL_DIR})
>

Eric already covered this part - use relative paths instead ( no / at the
beginning).


> But I also need to execute a post script, which runs after installation. I
> added
>
> > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/
> postinstall")
>
> to my CMakeLists.txt and in that script, I am using the RPM variable
> $RPM_INSTALL_PREFIX. But during installation, I get this error message
>
> > chmod: cannot access '/usr/usr/bin/startssp': No such file or directory
> > warning: %post(ssp-suite-7.1-1.x86_64) scriptlet failed, exit status 1
> > Non-fatal POSTIN scriptlet failure in rpm package ssp-suite-7.1-1.x86_64
>


Pre/postinstall scripts are outside what CPackRPM is handling automatically
but you can still use the relocation paths as supported by RPM.

Example for single relocation path:
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") # this will become the
relocation path - becomes first relocation path

Example for multiple relocation paths:
set(CPACK_RPM_RELOCATION_PATHS "etc/foo" "opt/bar") # two paths that will
be relocatable - etc will become first relocation path and opt the second
one
set(CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION ON) # this will remove the
default /usr from relocation paths
set(CPACK_PACKAGING_INSTALL_PREFIX "/a") # relative paths will be prefixed
with /a - there is a bug that prevents you from using "/" only for
relocation paths so you might decide to patch CPackRPM.cmake yourself [1]



Now for the postinstall script each relocation path becomes a variable in
RPM (RPM_INSTALL_PREFIX0 for first relocation path, RPM_INSTALL_PREFIX1 for
the second and so on) so what you have to do in your script is instead of
writing something like this:

chown someone:somegroup /etc/some_non_relocatable_path/some_file

you should write:

chown someone:somegroup
${RPM_INSTALL_PREFIX0}/some_non_relocatable_path/some_file

Regards,
Domen

[1] https://gitlab.kitware.com/cmake/cmake/merge_requests/583/diffs
-- 

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

Re: [CMake] CPack - Transaction error

2017-05-09 Thread Domen Vrankar
>
> Transaction check error:
>   file /opt from install of ssp-suite-7.1-1.x86_64 conflicts with file
> from package filesystem-3.2-21.el7.x86_64
>
> Error Summary
>

Directory /opt is already owned by filesystem package but is not
listed in CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST
variable.
Add /opt (and possibly other directories owned by other packages) to
CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION [1]

which is appended to paths listed in
CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST.


[1]
https://cmake.org/cmake/help/v3.5/module/CPackRPM.html?highlight=cpack_rpm_exclude_from_auto_filelist#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION

Regards,
Domen
-- 

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

Re: [cmake-developers] [DISCUSSION] CMake Localization (L10N)

2017-04-19 Thread Domen Vrankar
2017-04-18 19:16 GMT+02:00 Konstantin Podsvirov :

> Draft code:
>
> > set(GREETING "greeting message" # Optional default value
> >  en "Hello, world!"
> >  ru "Привет, мир!")
> >
> > set(CMAKE_OUTPUT_LOCALE "en") # Or CMAKE_L10N_LOCALE...
> >
> > message("$L10N{GREETING}") # Hello, world!
> >
> > set(CMAKE_OUTPUT_LOCALE "fr")
> >
> > message("$L10N{GREETING}") # greeting text
> >
> > message("$L10N:ru{GREETING}") # Привет, мир!
>
> Any feedback?


Coming from a small country I'm not too keen on localization as it makes my
life harder - in case of an error I have to guess what the english version
of the error message would look like just to get results on Google.

I somewhat understand the wish of non programmers to see text in their own
language but for developers english is de facto programming standard
language so I don't see a reason for such an addition.

That being said I'd suggest a more generic alternative that can be used for
things other than localization:

Access by array position:
> set(GREETING "greeting message" "Hello, world!" "Привет, мир!")
> message(${GREETING}) # prints "greeting message"
> message(${GREETING:0}) # also prints "greeting message"
> message(${GREETING:1}) # prints "Hello, world!"
> message(${GREETING:2}) # prints "Привет, мир!"
where the underlying structure of GREETING is "greeting message;Hello,
world!;Привет, мир!"

Or taking that even further by defining maps:
> set(GREETING "greeting message" "en:Hello, world!" "ru:Привет, мир!")
> message(${GREETING}) # prints "greeting message"
> message(${GREETING:}) # also prints "greeting message"
> message(${GREETING:en}) # prints "Hello, world!"
> message(${GREETING:ru}) # prints "Привет, мир!"
where the underlying structure of GREETING is "greeting message;en:Hello,
world!;ru:Привет, мир!"

This could then be used for e.g. for creating enums e.g.:
> set(BUILD_TYPE_OPTIONS "default_flags" "Debug:debug_flags"
"Release:release_flags" ...)
> message("using flags:  ${CMAKE_BUILD_TYPE_OPTIONS:${CMAKE_BUILD_TYPE}}")
# error if outside of range (e.g. OddRelease was specified for
CMAKE_BUILD_TYPE)

For this to really be useful support for if() command would also be
required.

Regards,
Domen
-- 

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] Packaging issues

2017-04-03 Thread Domen Vrankar
2017-04-03 12:30 GMT+02:00 Volker Enderlein <
volker.enderl...@ifm-chemnitz.de>:

> But when I checked the CPack*Config.cmake files none of the entries above
> are referenced. After running the `cmake -G "Visual Studio 14 2015 Win64"
> ..\TestProject` a second time everything is fine; the entries are
> referenced in CPack*Config.cmake files and all three installers can be
> built.
>
> So I really get stuck at this point.
>
>
> Any ideas what could be the issue and how to avoid it?
>

>From what you have described my best guess would be that "include( CPack )"
is called before the variables are set and that second configure step then
sets variables in CPack.cmake script correctly since their values are
already cached by the first configure step. If I'm correct then calling
"include( CPack )" at the end - this is the intended use - of the script
would solve your problem.

Regards,
Domen
-- 

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

Re: [CMake] How to exclude some files from building?

2017-03-31 Thread Domen Vrankar
2017-03-31 4:41 GMT+02:00 kipade :

> There are some files I do not want to build if the specified condition was
> ture.
> For example, for testing, I want build a new file witch include a main
> entry just
> for testing; if not, a new file would be compile for normal task.
> I do not want to write two main entries in the same file just using macros
> to
> control compiling. I want to use different clean and simple files.
> So, how to do it?
>


You can either use generator expressions:

-

cmake_minimum_required(VERSION 3.5)

project(dependent CXX)

set(MY_DEPEND "ON" CACHE BOOL "toggle feature")

add_executable(
${PROJECT_NAME}
main.cpp
$<$:first/a.cpp>
$<$>:second/a.cpp>
  )

target_include_directories(
${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}"
  )

-

Or  add files to a variable:

-

cmake_minimum_required(VERSION 3.5)

project(dependent CXX)

set(MY_DEPEND "ON" CACHE BOOL "toggle feature")

if(MY_DEPEND)
  set(extra_src_ "first/a.cpp")
else()
  set(extra_src_ "second/a.cpp")
endif()

add_executable(
${PROJECT_NAME}
main.cpp
${extra_src_}
  )

target_include_directories(
${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}"
  )

-

Regards,
Domen
-- 

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

Re: [CMake] CPACK, generating deb packages: md5sums and wrong directory permissons

2017-03-08 Thread Domen Vrankar
2017-03-08 16:23 GMT+01:00 Bernhard Seckinger :

> Hi Domen,
>
> > This came up in the past and if I recall correctly the only workaround
> was
> > the install(DIRECTORY ... DIRECTORY_PERMISSIONS) that you mentioned.
> Please
> > file a bug report for this one.
>
> Where is the best place to do so?
>

https://gitlab.kitware.com/users/sign_in

Thanks,
Domen
-- 

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

Re: [CMake] CPACK, generating deb packages: md5sums and wrong directory permissons

2017-03-08 Thread Domen Vrankar
2017-03-08 10:00 GMT+01:00 Bernhard Seckinger :

> Hi all,
>
> I'm using cpack to generate a debian package. There are two things that
> look
> like bugs in cpack to me (although it might also be, that I got something
> wrong):
>
> a) Files, that I install with install(FILES ...) get the wrong name in the
> md5sum section. Names should be e.g. "usr/bin/croco", but are
> "/path/to/build/directory/_CPack_Packages/Linux/DEB/
> croco-0.1.1-Linux/usr/bin/croco".
> Not only, that the md5sums cannot be checked automatically, but also my
> build
> path is exposed in the deb package.
>

This was already reported and the fix should be part of CMake 3.8.


> b) Directory permissions of automatically created directories are set to
> 770
> instead of 755 which is standard. This includes even directories, that are
> part of the ${CMAKE_INSTALL_PREFIX}. For everything else I could add an
> install(DIRECTORY ... DIRECTORY_PERMISSIONS) although I think, that even
> this
> should not be necessary.
>

This came up in the past and if I recall correctly the only workaround was
the install(DIRECTORY ... DIRECTORY_PERMISSIONS) that you mentioned. Please
file a bug report for this one.

Thanks,
Domen
-- 

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

Re: [CMake] Disabling INSTALL target for subdirectory

2017-02-16 Thread Domen Vrankar
2017-02-16 7:59 GMT+01:00 Milan Ziegler :

> Hi,
>
> we are using the CMake install mechanism "install(...)" to copy all
> relevant files and target binaries of the product into the CMake install
> prefix folder, for further packaging. So far so good.
>
> We are also using several thirdparty libraries, hosting them inside our
> own repository and building them along with our own code, usually using
> add_subdirectory utilizing their native CMake buildsystem.
>
> Turns out, other developers also like the CMake install mechanism.
>
> So now the INSTALL target of our whole project also installs thirdparty
> components, which we do not want to deliver with our own product (think
> static libraries, which are already linked into our executable).
>
> After a lot of googling, here's my question: Is there a clean way to
> disable the install target for a subdirectory _without_ also disabling
> it completely for the remaining project?
>

I would never add third party libraries to my own project in such a way
mainly because:
- either my project or external project may change a variable (cache it)
and give me a head ache figuring out where the interaction went wrong (and
having to be so intimate with their build scripts is usually poor use of
time) and
- I would rarely/somewhat independently be changing their code.

I would either build external libraries (of course along with the relevant
headers) and install them somewhere on the system (treating them as a
separate project development wise) and then write find scripts for my
project to be used with "find_package()" command
or in case I'll be making some sort of an uberbuild or changing the
external code a bit more regularly (at which point I'd start to question
the design and maturity of the external dependency...) I'd go with
ExternalProject_Add() command and then install the dependencies that I'd
still like to see in my project by calling combination of
"ExternalProject_Get_Property(... binary_dir)" and "install()" commands -
external projects won't rebuild automatically if you change the code but
you can always go into the relevant subdirectory and rebuild it there (I've
found no problems doing that as usually I won't go changing multiple
external dependencies at the same time - doing that would usually indicate
poor design or invalid use of the external dependencies or my code).

Regards,
Domen
-- 

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

Re: [CMake] Using CMAKE_INSTALL_PREFIX in custom install command fails with CPack

2017-02-09 Thread Domen Vrankar
2017-02-09 12:08 GMT+01:00 Martin Craig :

> Hi, got this problem which I've boiled down to a simple test case. My
> source dir contains just one file (realfile) and the installation should
> install this in bin and make a symlink from linkfile to it. This is the
> CMakeLists.txt file:
>
> cmake_minimum_required(VERSION 2.8.0)
>
> INSTALL(FILES realfile DESTINATION bin)
> INSTALL(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E
> create_symlink realfile ${CMAKE_INSTALL_PREFIX}/bin/linkfile)")
>

You could do it in two separate steps and without absolute path:

execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
../../some_relative_path/bin/realfile linkfile) # at this point path
doesn't need to point to the location of existing file
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/linkfile DESTINATION
some_relative_path COMPONENT libraries)

Not certain which CPack package generator you're using but in case of
CPackRPM there is quite some automated handling of symlink paths (even
support for symlinks in relocatable rpm packages).

In this file are some examples of using symlinks in combination with
CPackRPM (never checked how they behave with other CPack package generators
though...):

https://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/CPackComponentsForAll/CMakeLists.txt;h=344084317166ff4f62850ed77807af2647db6d6a;hb=HEAD

Side note - during packaging CPACK_PACKAGING_INSTALL_PREFIX is used instead
of CMAKE_INSTALL_PREFIX.

Regards,
Domen
-- 

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

[Cmake-commits] CMake branch, next, updated. v3.7.2-2285-g69cd1ce

2017-01-22 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  69cd1ce190268342cc570569afbba1fc6038822e (commit)
   via  624709c824a2d7a75a36dc23551377bdc2aee648 (commit)
   via  1c93eb683b182b1f0bbdcbd39fc50ad48cc57739 (commit)
  from  f6bdf63b18766c59d8ffca0e0383ad7ee14f0ce9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69cd1ce190268342cc570569afbba1fc6038822e
commit 69cd1ce190268342cc570569afbba1fc6038822e
Merge: f6bdf63 624709c
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Jan 22 16:09:08 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Jan 22 16:09:08 2017 -0500

Merge topic 'cpack-stgz-minimal-test' into next

624709c8 CPack/STGZ: minimalistic packages test
1c93eb68 CPack/STGZ prefer pax for extraction


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=624709c824a2d7a75a36dc23551377bdc2aee648
commit 624709c824a2d7a75a36dc23551377bdc2aee648
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Jan 19 23:02:07 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Jan 22 22:07:16 2017 +0100

CPack/STGZ: minimalistic packages test

diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index d2465c4..a43e47b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -345,7 +345,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
   add_RunCMake_test(CompilerLauncher)
 endif()
 
-add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP")
+add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ")
 # add a test to make sure symbols are exported from a shared library
 # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used
 add_RunCMake_test(AutoExportDll)
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index ebaf792..65399db 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -16,7 +16,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true 
"COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
-run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP" false 
"MONOLITHIC;COMPONENT")
+run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ" false 
"MONOLITHIC;COMPONENT")
 run_cpack_test_subtests(PACKAGE_CHECKSUM 
"invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
 run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/STGZ/Helpers.cmake 
b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
new file mode 100644
index 000..08224d3
--- /dev/null
+++ b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
@@ -0,0 +1,64 @@
+set(ALL_FILES_GLOB "*.sh")
+
+function(getPackageContent FILE RESULT_VAR)
+  get_filename_component(path_ "${FILE}" DIRECTORY)
+  file(REMOVE_RECURSE "${path_}/content")
+  file(MAKE_DIRECTORY "${path_}/content")
+  execute_process(COMMAND ${FILE} --prefix=${path_}/content --include-subdir
+  RESULT_VARIABLE extract_result_
+  ERROR_VARIABLE extract_error_
+  OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  if(extract_result_)
+message(FATAL_ERROR "Extracting STGZ archive failed: '${extract_result_}';"
+  " '${extract_error_}'.")
+  endif()
+
+  file(GLOB_RECURSE package_content_ LIST_DIRECTORIES true RELATIVE
+  "${path_}/content" "${path_}/content/*")
+
+  set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE)
+endfunction()
+
+function(getPackageNameGlobexpr NAME COMPONENT VERSION REVISION FILE_NO 
RESULT_VAR)
+  if(COMPONENT)
+set(COMPONENT "-${COMPONENT}")
+  endif()
+
+  set(${RESULT_VAR} "${NAME}-${VERSION}-*${COMPONENT}.sh" PARENT_SCOPE)
+endfunction()
+
+function(getPackageContentList FILE RESULT_VAR)
+  getPackageContent("${FILE}" package_content_)
+
+  set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE)
+endfunction()
+
+function(toExpectedContentList FILE_NO CONTENT_VAR)
+  findExpectedFile("${FILE

[Cmake-commits] CMake branch, next, updated. v3.7.2-2278-g639429c

2017-01-21 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  639429cb85ed679c38223c7be1c4a0dfd3b3de39 (commit)
   via  82eb1702d16723c4f997ded593cbe7cb0ca75999 (commit)
  from  bb234a4b50ecca06c00ab4f4cebdd44261f25653 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=639429cb85ed679c38223c7be1c4a0dfd3b3de39
commit 639429cb85ed679c38223c7be1c4a0dfd3b3de39
Merge: bb234a4 82eb170
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Jan 21 03:36:09 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sat Jan 21 03:36:09 2017 -0500

Merge topic 'cpack-stgz-minimal-test' into next

82eb1702 fixup! CPack/STGZ: minimalistic packages test


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82eb1702d16723c4f997ded593cbe7cb0ca75999
commit 82eb1702d16723c4f997ded593cbe7cb0ca75999
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Jan 21 09:34:54 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Jan 21 09:34:54 2017 +0100

fixup! CPack/STGZ: minimalistic packages test

diff --git a/Tests/RunCMake/CPack/STGZ/Helpers.cmake 
b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
index 96be71b..08224d3 100644
--- a/Tests/RunCMake/CPack/STGZ/Helpers.cmake
+++ b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
@@ -10,15 +10,8 @@ function(getPackageContent FILE RESULT_VAR)
   OUTPUT_STRIP_TRAILING_WHITESPACE)
 
   if(extract_result_)
-find_program(TAIL_EXECUTABLE tail)
-find_program(PAX_EXECUTABLE pax)
-find_program(GTAR_EXECUTABLE gtar)
-find_program(TAR_EXECUTABLE tar)
-find_program(GUNZIP_EXECUTABLE gunzip)
-
-message(FATAL_ERROR "Extracting STGZ archive failed: '${extract_error_}';"
-"'${TAIL_EXECUTABLE}'; '${PAX_EXECUTABLE}'; '${GTAR_EXECUTABLE}';"
-"'${TAR_EXECUTABLE}'; '${GUNZIP_EXECUTABLE}'")
+message(FATAL_ERROR "Extracting STGZ archive failed: '${extract_result_}';"
+  " '${extract_error_}'.")
   endif()
 
   file(GLOB_RECURSE package_content_ LIST_DIRECTORIES true RELATIVE
diff --git a/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake 
b/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
index 46e7757..3b015ca 100644
--- a/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
+++ b/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
@@ -1,6 +1,11 @@
 function(get_test_prerequirements found_var config_file)
   if(EXISTS "/bin/sh")
-file(WRITE "${config_file}" "")
-set(${found_var} true PARENT_SCOPE)
+#gunzip is not part of posix so we should not rely on it being installed
+find_program(GUNZIP_EXECUTABLE gunzip)
+
+if(GUNZIP_EXECUTABLE)
+  file(WRITE "${config_file}" "")
+  set(${found_var} true PARENT_SCOPE)
+endif()
   endif()
 endfunction()

---

Summary of changes:
 Tests/RunCMake/CPack/STGZ/Helpers.cmake |   11 ++-
 Tests/RunCMake/CPack/STGZ/Prerequirements.cmake |9 +++--
 2 files changed, 9 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.2-2270-gb278af8

2017-01-20 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  b278af8e08066537fa4eab38b3001e1c0df9f8d8 (commit)
   via  21de0cc48524e171b19df5f39eaf16543c34c2ae (commit)
  from  33fbedfbf2858051489c4d5d7cbc04f7cfb8d81e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b278af8e08066537fa4eab38b3001e1c0df9f8d8
commit b278af8e08066537fa4eab38b3001e1c0df9f8d8
Merge: 33fbedf 21de0cc
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Jan 20 14:45:09 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Jan 20 14:45:09 2017 -0500

Merge topic 'cpack-stgz-minimal-test' into next

21de0cc4 fixup! CPack/STGZ: minimalistic packages test


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21de0cc48524e171b19df5f39eaf16543c34c2ae
commit 21de0cc48524e171b19df5f39eaf16543c34c2ae
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Jan 20 20:44:39 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Fri Jan 20 20:44:39 2017 +0100

fixup! CPack/STGZ: minimalistic packages test

diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in
index dee576f..c615851 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/CPack.STGZ_Header.sh.in
@@ -130,7 +130,10 @@ echo ""
 use_new_tail_syntax="-n"
 tail $use_new_tail_syntax +1 "$0" > /dev/null 2> /dev/null || 
use_new_tail_syntax=""
 
-tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd 
"${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the 
@CPACK_PACKAGE_FILE_NAME@"
+extractor="pax -r"
+command -v pax > /dev/null 2> /dev/null || extractor="tar xf -"
+
+tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd 
"${toplevel}" && ${extractor}) || cpack_echo_exit "Problem unpacking the 
@CPACK_PACKAGE_FILE_NAME@"
 
 echo "Unpacking finished successfully"
 
diff --git a/Tests/RunCMake/CPack/STGZ/Helpers.cmake 
b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
index 75036db..96be71b 100644
--- a/Tests/RunCMake/CPack/STGZ/Helpers.cmake
+++ b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
@@ -5,9 +5,22 @@ function(getPackageContent FILE RESULT_VAR)
   file(REMOVE_RECURSE "${path_}/content")
   file(MAKE_DIRECTORY "${path_}/content")
   execute_process(COMMAND ${FILE} --prefix=${path_}/content --include-subdir
-  ERROR_QUIET
+  RESULT_VARIABLE extract_result_
+  ERROR_VARIABLE extract_error_
   OUTPUT_STRIP_TRAILING_WHITESPACE)
 
+  if(extract_result_)
+find_program(TAIL_EXECUTABLE tail)
+find_program(PAX_EXECUTABLE pax)
+find_program(GTAR_EXECUTABLE gtar)
+find_program(TAR_EXECUTABLE tar)
+find_program(GUNZIP_EXECUTABLE gunzip)
+
+message(FATAL_ERROR "Extracting STGZ archive failed: '${extract_error_}';"
+"'${TAIL_EXECUTABLE}'; '${PAX_EXECUTABLE}'; '${GTAR_EXECUTABLE}';"
+"'${TAR_EXECUTABLE}'; '${GUNZIP_EXECUTABLE}'")
+  endif()
+
   file(GLOB_RECURSE package_content_ LIST_DIRECTORIES true RELATIVE
   "${path_}/content" "${path_}/content/*")
 

---

Summary of changes:
 Modules/CPack.STGZ_Header.sh.in |5 -
 Tests/RunCMake/CPack/STGZ/Helpers.cmake |   15 ++-
 2 files changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.2-2233-ge9ae0ad

2017-01-19 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  e9ae0adbfc45c716d5bafdd9fb8d5d41f8a52983 (commit)
   via  a802ddd628292cf772674d2ee02772ec832d0422 (commit)
   via  f5fae345e4a0f9f54b69424552f7d85aa85ba907 (commit)
  from  cba760da8de27c311918f2d33ff7f27193f6e6af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9ae0adbfc45c716d5bafdd9fb8d5d41f8a52983
commit e9ae0adbfc45c716d5bafdd9fb8d5d41f8a52983
Merge: cba760d a802ddd
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Jan 19 17:04:34 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Jan 19 17:04:34 2017 -0500

Merge topic 'cpack-stgz-minimal-test' into next

a802ddd6 CPack/STGZ: minimalistic packages test
f5fae345 CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a802ddd628292cf772674d2ee02772ec832d0422
commit a802ddd628292cf772674d2ee02772ec832d0422
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Jan 19 23:02:07 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Jan 19 23:02:07 2017 +0100

CPack/STGZ: minimalistic packages test

diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index d2465c4..a43e47b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -345,7 +345,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
   add_RunCMake_test(CompilerLauncher)
 endif()
 
-add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP")
+add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ")
 # add a test to make sure symbols are exported from a shared library
 # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used
 add_RunCMake_test(AutoExportDll)
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index ebaf792..65399db 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -16,7 +16,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true 
"COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
-run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP" false 
"MONOLITHIC;COMPONENT")
+run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ" false 
"MONOLITHIC;COMPONENT")
 run_cpack_test_subtests(PACKAGE_CHECKSUM 
"invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
 run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/STGZ/Helpers.cmake 
b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
new file mode 100644
index 000..75036db
--- /dev/null
+++ b/Tests/RunCMake/CPack/STGZ/Helpers.cmake
@@ -0,0 +1,58 @@
+set(ALL_FILES_GLOB "*.sh")
+
+function(getPackageContent FILE RESULT_VAR)
+  get_filename_component(path_ "${FILE}" DIRECTORY)
+  file(REMOVE_RECURSE "${path_}/content")
+  file(MAKE_DIRECTORY "${path_}/content")
+  execute_process(COMMAND ${FILE} --prefix=${path_}/content --include-subdir
+  ERROR_QUIET
+  OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  file(GLOB_RECURSE package_content_ LIST_DIRECTORIES true RELATIVE
+  "${path_}/content" "${path_}/content/*")
+
+  set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE)
+endfunction()
+
+function(getPackageNameGlobexpr NAME COMPONENT VERSION REVISION FILE_NO 
RESULT_VAR)
+  if(COMPONENT)
+set(COMPONENT "-${COMPONENT}")
+  endif()
+
+  set(${RESULT_VAR} "${NAME}-${VERSION}-*${COMPONENT}.sh" PARENT_SCOPE)
+endfunction()
+
+function(getPackageContentList FILE RESULT_VAR)
+  getPackageContent("${FILE}" package_content_)
+
+  set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE)
+endfunction()
+
+function(toExpectedContentList FILE_NO CONTENT_VAR)
+  findExpectedFile("${FILE_NO}" "file_")
+
+  get_filename_component(prefix_ "${file_}" NAME)
+  # NAME_WE removes everything after the dot and dot is in version so replace 
instead
+  string(REPLACE ".sh" "" prefix_ "$

Re: [CMake] Managing a local installation of cmake-built open source packages

2017-01-18 Thread Domen Vrankar
2017-01-18 22:37 GMT+01:00 ardi :

> If anybody has further suggestions, please don't hesitate to tell.
>

Alternative 1:
I usually go with the platform supported packages even if that means having
more than one package format... I prefer less custom dependencies to
one-package-to-rule-them-all logic specially since most of the time
programs already have to be recompiled on each platform. For me less custom
dependencies is worth far more than having only one package type to
maintain.

Since you're saying that you can already install the files through CMake
you've already won half the battle - the installation part is basis for all
CPack packages (you set 2-3 variables and you have minimal RPM or DEB
package(s) - even component packages if install commands have components).
I don't know about the rest of the packagers but CPackRPM and Deb are quite
similar in that regard so there is not too much of a learning curve. If you
don't maintain the packages and they don't use CPack it's easy to append
the rules at the end of the root CMakeLists.txt (I did that for C++ version
of apache qpid a while back and produced minimal component RPM packages for
AIX OS in under 5 minutes).

Regarding installation on a different location as I said I'm not too
familiar with the rest of the packagers but you can create a custom package
database for both RPM and Deb packages and then install them on a different
location (relocatable RPM or a bit hackish way with Deb packages - see
LONG_FILENAMES/VerifiResult.cmake CMake test for an example with deb
packages).

Alternative 2:
You were talking about install_manifest.txt file. CPack  Archive packagier
(particularly STGZ - self extracting tar gz - version) could easily be
extended to produce such file and check for it on next install (asking you
if you'd really like to delete the content or something similar).
 Contributing something like that to CPack would even remove the burden of
maintaining a patched cpack version yourself.
Drawbacks are that you loose files database that comes with rpm/deb (nobody
will warn you if a file has been changed, was present in two packages etc.)
and also the currently-not-supported-by-cpack part (but since it's fairly
easy to implement we could probably get it into next CMake release).

Regards,
Domen
-- 

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

[Cmake-commits] CMake branch, next, updated. v3.7.1-1966-g63a8770

2017-01-10 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  63a8770f08d0bcb239ceaaa18f5a6ee99af38be2 (commit)
   via  af77368ed3d81c877fc19a64831aff380cf4646e (commit)
  from  da90f247541d7a3e3cd8ae32fe74450e8ffb46b8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63a8770f08d0bcb239ceaaa18f5a6ee99af38be2
commit 63a8770f08d0bcb239ceaaa18f5a6ee99af38be2
Merge: da90f24 af77368
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 12:48:49 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jan 10 12:48:49 2017 -0500

Merge topic 'cpack-rpm-user-binary-spec-file-test' into next

af77368e CPack/RPM test for using custom binary spec file


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af77368ed3d81c877fc19a64831aff380cf4646e
commit af77368ed3d81c877fc19a64831aff380cf4646e
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 18:47:52 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Jan 10 18:47:52 2017 +0100

CPack/RPM test for using custom binary spec file

diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index af44182..ebaf792 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ include(RunCMake)
 include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
 
 # run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP 
"PACKAGING_TYPES"
+run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT")
 run_cpack_test(CUSTOM_NAMES "RPM;DEB" true "COMPONENT")
 run_cpack_test(DEBUGINFO "RPM" true "COMPONENT")
 run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT")
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake
new file mode 100644
index 000..694dc00
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake
@@ -0,0 +1,9 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(EXPECTED_FILES_COUNT "2")
+  set(EXPECTED_FILE_1_COMPONENT "test")
+  set(EXPECTED_FILE_2_COMPONENT "test2")
+  set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt")
+endif()
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt
new file mode 100644
index 000..e6d86d0
--- /dev/null
+++ 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt
@@ -0,0 +1,2 @@
+^CPackRPM: Will use USER specified spec file: 
(/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in
+CPackRPM: Will use GENERATED spec 
file:.*/Tests/RunCMake/RPM/CPack/CUSTOM_BINARY_SPEC_FILE-build/_CPack_Packages/.*/RPM/SPECS/custom_binary_spec_file-test2\.spec$
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt
new file mode 100644
index 000..d7bb7af
--- /dev/null
+++ 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt
@@ -0,0 +1 @@
+CPackRPM: Will use USER specified spec file: 
(/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in
diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in
new file mode 100644
index 000..db0ac6f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in
@@ -0,0 +1,80 @@
+# -*- rpm-spec -*-
+BuildRoot:  
%_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
+Summary:@CPACK_RPM_PACKAGE_SUMMARY@
+Name:   @CPACK_RPM_PACKAGE_NAME@
+Version:@CPACK_RPM_PACKAGE_VERSION@
+Release:@CPACK_RPM_PACKAGE_RELEASE@
+License:@CPACK_RPM_PACKAGE_LICENSE@
+Group:  @CPACK_RPM_PACKAGE_GROUP@
+Vendor: @CPACK_RPM_PACKAGE_VENDOR@
+
+@TMP_RPM_URL@
+@TMP_RPM_REQUIRES@
+@TMP_RPM_REQUIRES_PRE@
+@TMP_RPM_REQUIRES_POST@
+@TMP_RPM_REQUIRES_PREUN@
+@TMP_RPM_REQUIRES_POSTUN@
+@TMP_RPM_PROVIDES@
+@TMP_RPM_OBSOLETES@
+@TMP_RPM_CONFLICTS@
+@TMP_RPM_SUGGESTS@
+@TMP_RP

[Cmake-commits] CMake branch, next, updated. v3.7.1-1928-gf14f487

2017-01-09 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  f14f4875429bcc4445ec06328f42d3243bd36892 (commit)
   via  adbf72280d1eb823402c4cc7f2c27ec0ef16062a (commit)
   via  aff368bb8456694e2550e2f69451456728ab31eb (commit)
  from  8dc707a2ffd830f95271275808b645a372e7cebd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f14f4875429bcc4445ec06328f42d3243bd36892
commit f14f4875429bcc4445ec06328f42d3243bd36892
Merge: 8dc707a adbf722
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 02:41:09 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jan 10 02:41:09 2017 -0500

Merge topic 'cpack-test-extra-std-out-err-file-overloads' into next

adbf7228 CPack test additional std out/err regex file overloads
aff368bb CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adbf72280d1eb823402c4cc7f2c27ec0ef16062a
commit adbf72280d1eb823402c4cc7f2c27ec0ef16062a
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 23:26:45 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Jan 10 08:40:16 2017 +0100

CPack test additional std out/err regex file overloads

Added std out/std err expected regex file name
overloads for packaging type.

diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake 
b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
index 89da610..f883c69 100644
--- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake
+++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
@@ -60,7 +60,11 @@ function(run_cpack_test_common_ TEST_NAME types build 
SUBTEST_SUFFIX source PACK
   )
 
 foreach(o out err)
-  if(SUBTEST_SUFFIX AND EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt)
+  if(SUBTEST_SUFFIX AND EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt)
+set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt")
+  elseif(EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt)
+set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt")
+  elseif(SUBTEST_SUFFIX AND EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt)
 set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt")
   elseif(EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt)
 set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt")
diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt
index f51d254..7c98f69 100644
--- a/Tests/RunCMake/CPack/README.txt
+++ b/Tests/RunCMake/CPack/README.txt
@@ -155,8 +155,18 @@ VerifyResult.cmake script also automatically prints out 
standard output and
 standard error from CPack execution phase that is compared with
 '/-stdout.txt' regular expression and
 and '/-stderr.txt' regular expresson respectively.
-NOTE: For subtests generator name can also be suffixed with subtest name and in
-  such case subtest file is preferred.
+NOTE: For subtests generator name can also be suffixed with subtest name and/or
+  packaging type (MONOLITHIC, COMPONENT, GROUP) and in such cases the
+  preferences of which file will be used are as follows:
+- generator name + packaging type + subtest name
+- generator name + packaging type
+- generator name + subtest name
+- generator name
+- default generator
+  File name format: 
'---std.txt'
+where  can either be 'out' or 'err'.
+  File name format: '--std.txt'
+where  can either be 'out' or 'err'.
   File name format: '--std.txt' where
  can either be 'out' or 'err'.
 NOTE: If none of the comparison files are present then the default generator
@@ -223,3 +233,4 @@ To add a new generator we must
 - if needed add 'default_expected_std.txt' files where  is either
   'out' or 'err' which will contain default expected output of package
   generation regular expression.
+- add generator to list of other CPack generators in RunCMake/CMakeLists.txt

---

Summary of changes:
 Source/CMakeVersion.cmake   |2 +-
 Tests/RunCMake/CPack/CPackTestHelpe

[Cmake-commits] CMake branch, next, updated. v3.7.1-1925-g8dc707a

2017-01-09 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  8dc707a2ffd830f95271275808b645a372e7cebd (commit)
   via  574c81e28cef6737adc1619ce3b44b43bdcf308b (commit)
  from  1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8dc707a2ffd830f95271275808b645a372e7cebd
commit 8dc707a2ffd830f95271275808b645a372e7cebd
Merge: 1f2f6e0 574c81e
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 02:38:12 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jan 10 02:38:12 2017 -0500

Merge topic 'cpack-rpm-user-binary-spec-file-fix' into next

574c81e2 CPack/RPM fix - custom binary spec file handling


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=574c81e28cef6737adc1619ce3b44b43bdcf308b
commit 574c81e28cef6737adc1619ce3b44b43bdcf308b
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 08:37:14 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Jan 10 08:37:14 2017 +0100

CPack/RPM fix - custom binary spec file handling

Fixes #16507

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 0640630..673aaea 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -2269,8 +2269,8 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
 # We should generate a USER spec file template:
 #  - either because the user asked for it : 
CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
 #  - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
+set(RPMBUILD_FLAGS "-bb")
 if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT 
CPACK_RPM_USER_BINARY_SPECFILE)
-  set(RPMBUILD_FLAGS "-bb")
 
   file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
 "# -*- rpm-spec -*-

---

Summary of changes:
 Modules/CPackRPM.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.1-1923-g1f2f6e0

2017-01-09 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2 (commit)
   via  23435daa22f650a1a6509025fb2d38e8714f8ceb (commit)
   via  9a0bf4d558cfd16917d2cb5c41a754740f159c98 (commit)
   via  d9775228dabb1424d2f8d1a250c5a0e6ffad47b1 (commit)
  from  18e54de628127ac7dd948f473db3977c350c4bca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2
commit 1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2
Merge: 18e54de 23435da
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 02:31:41 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jan 10 02:31:41 2017 -0500

Merge topic 'cpack-rpm-user-bin-spec-file-fix' into next

23435daa Revert "CPack/RPM fix - custom binary spec file handling"
9a0bf4d5 Revert "CPack test additional std out/err regex file overloads"
d9775228 Revert "CPack/RPM test - custom binary spec file handling"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23435daa22f650a1a6509025fb2d38e8714f8ceb
commit 23435daa22f650a1a6509025fb2d38e8714f8ceb
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 08:28:17 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Jan 10 08:28:17 2017 +0100

Revert "CPack/RPM fix - custom binary spec file handling"

This reverts commit e0bfd3f4f565ea936f665a461380079573521916.

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index e1bcb48..5021c41 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -2470,12 +2470,11 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
   endforeach()
 endif()
 
-set(RPMBUILD_FLAGS "-bb")
-
 # We should generate a USER spec file template:
 #  - either because the user asked for it : 
CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
 #  - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
 if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT 
CPACK_RPM_USER_BINARY_SPECFILE)
+  set(RPMBUILD_FLAGS "-bb")
 
   file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
 "# -*- rpm-spec -*-

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a0bf4d558cfd16917d2cb5c41a754740f159c98
commit 9a0bf4d558cfd16917d2cb5c41a754740f159c98
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 08:28:16 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Jan 10 08:28:16 2017 +0100

Revert "CPack test additional std out/err regex file overloads"

This reverts commit 4ce8a4d0a18702cf228beaa6a9ecc7b38e355751.

diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake 
b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
index f883c69..89da610 100644
--- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake
+++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
@@ -60,11 +60,7 @@ function(run_cpack_test_common_ TEST_NAME types build 
SUBTEST_SUFFIX source PACK
   )
 
 foreach(o out err)
-  if(SUBTEST_SUFFIX AND EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt)
-set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt")
-  elseif(EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt)
-set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt")
-  elseif(SUBTEST_SUFFIX AND EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt)
+  if(SUBTEST_SUFFIX AND EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt)
 set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt")
   elseif(EXISTS 
${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt)
 set(RunCMake-std${o}-file 
"tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt")
diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt
index 7c98f69..f51d254 100644
--- a/Tests/RunCMake/CPack/README.txt
+++ b/Tests/RunCMake/CPack/README.txt
@@ -155,18 +155,8 @@ VerifyResult.cmake script also automatically prints out 
standard output and
 standard error from CPack execution phase that is compared with
 '/-stdout.txt' regular expression and
 and '/-stderr.txt' reg

[Cmake-commits] CMake branch, next, updated. v3.7.1-1919-g18e54de

2017-01-09 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  18e54de628127ac7dd948f473db3977c350c4bca (commit)
   via  699ce812f43553bb6b6732141d62e77716ad8726 (commit)
   via  4ce8a4d0a18702cf228beaa6a9ecc7b38e355751 (commit)
   via  e0bfd3f4f565ea936f665a461380079573521916 (commit)
  from  2d08b225f78c13781887dc26ff3a3ce621394262 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18e54de628127ac7dd948f473db3977c350c4bca
commit 18e54de628127ac7dd948f473db3977c350c4bca
Merge: 2d08b22 699ce81
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Jan 10 02:25:10 2017 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jan 10 02:25:10 2017 -0500

Merge topic 'cpack-rpm-user-bin-spec-file-fix' into next

699ce812 CPack/RPM test - custom binary spec file handling
4ce8a4d0 CPack test additional std out/err regex file overloads
e0bfd3f4 CPack/RPM fix - custom binary spec file handling


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=699ce812f43553bb6b6732141d62e77716ad8726
commit 699ce812f43553bb6b6732141d62e77716ad8726
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Jan 9 21:08:47 2017 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Mon Jan 9 21:10:16 2017 +0100

CPack/RPM test - custom binary spec file handling

diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3077340..d550ec7 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ include(RunCMake)
 include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
 
 # run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP 
"PACKAGING_TYPES"
+run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT")
 run_cpack_test(CUSTOM_NAMES "RPM;DEB" true "COMPONENT")
 run_cpack_test(DEBUGINFO "RPM" true "COMPONENT")
 run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT")
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake
new file mode 100644
index 000..694dc00
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake
@@ -0,0 +1,9 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(EXPECTED_FILES_COUNT "2")
+  set(EXPECTED_FILE_1_COMPONENT "test")
+  set(EXPECTED_FILE_2_COMPONENT "test2")
+  set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt")
+endif()
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt
new file mode 100644
index 000..e6d86d0
--- /dev/null
+++ 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt
@@ -0,0 +1,2 @@
+^CPackRPM: Will use USER specified spec file: 
(/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in
+CPackRPM: Will use GENERATED spec 
file:.*/Tests/RunCMake/RPM/CPack/CUSTOM_BINARY_SPEC_FILE-build/_CPack_Packages/.*/RPM/SPECS/custom_binary_spec_file-test2\.spec$
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt
new file mode 100644
index 000..d7bb7af
--- /dev/null
+++ 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt
@@ -0,0 +1 @@
+CPackRPM: Will use USER specified spec file: 
(/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in
diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in
new file mode 100644
index 000..db0ac6f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in
@@ -0,0 +1,80 @@
+# -*- rpm-spec -*-
+BuildRoot:  
%_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
+Summary:@CPACK_RPM_PACKAGE_SUMMARY@
+Name:   @CPACK_RPM_PACKAGE_NAME@
+Version:@CPACK_RPM_PACKAGE_VERSION@
+Release:@CPACK_RPM_PACKAGE_RELEASE@
+License:@CPACK_RPM_PACKAGE_LICENSE@
+Group:  @CPACK_RPM_PACKAGE_GROUP@
+Vendor: @CPACK_RPM_PACKAGE_VENDOR@
+
+@T

[Cmake-commits] CMake branch, next, updated. v3.7.1-1853-g1890504

2016-12-25 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  1890504c1220777f247462f00d9889a6d242e4bd (commit)
   via  36bc7e4c3f91c560df8051afedddea3f49474264 (commit)
  from  6d47003d339c0be17efe467fe06bc97294479e73 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1890504c1220777f247462f00d9889a6d242e4bd
commit 1890504c1220777f247462f00d9889a6d242e4bd
Merge: 6d47003 36bc7e4
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Dec 25 04:55:00 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Dec 25 04:55:00 2016 -0500

Merge topic 'cpack-new-tests' into next

36bc7e4c store old locale to a temporary variable


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36bc7e4c3f91c560df8051afedddea3f49474264
commit 36bc7e4c3f91c560df8051afedddea3f49474264
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Dec 25 10:51:34 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Dec 25 10:51:34 2016 +0100

store old locale to a temporary variable

On Windows XP 32 bit setLocale seems to
cause old pointer invalidation and causes
program crash in destructor.
This was causing CPackZIP to crash so to
fix it we copy the value into a temporary
variable.

diff --git a/Source/cmLocale.h b/Source/cmLocale.h
index e8e751d..cca7cf5 100644
--- a/Source/cmLocale.h
+++ b/Source/cmLocale.h
@@ -6,10 +6,11 @@
 #include 
 
 #include 
+#include 
 
 class cmLocaleRAII
 {
-  const char* OldLocale;
+  std::string OldLocale;
 
 public:
   cmLocaleRAII()
@@ -17,7 +18,7 @@ public:
   {
 setlocale(LC_CTYPE, "");
   }
-  ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale); }
+  ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); }
 };
 
 #endif

---

Summary of changes:
 Source/cmLocale.h |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.1-1851-g6d47003

2016-12-23 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  6d47003d339c0be17efe467fe06bc97294479e73 (commit)
   via  4227f29a67b30f2512af767c785559ce14cabe70 (commit)
   via  26265218e2ca78135f128e80e5ff71adaf5677a8 (commit)
  from  6bfcb004e409915032522b831124b758b1ba5403 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d47003d339c0be17efe467fe06bc97294479e73
commit 6d47003d339c0be17efe467fe06bc97294479e73
Merge: 6bfcb00 4227f29
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 17:41:52 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 23 17:41:52 2016 -0500

Merge topic 'cpack-rpm-user-bin-spec-file-fix' into next

4227f29a CPack custom binary spec file handling fix
26265218 CPack test additional std out/err regex file overloads


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4227f29a67b30f2512af767c785559ce14cabe70
commit 4227f29a67b30f2512af767c785559ce14cabe70
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 23:28:30 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Fri Dec 23 23:40:34 2016 +0100

CPack custom binary spec file handling fix

Fixes #16507

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 5021c41..e1bcb48 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -2470,11 +2470,12 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
   endforeach()
 endif()
 
+set(RPMBUILD_FLAGS "-bb")
+
 # We should generate a USER spec file template:
 #  - either because the user asked for it : 
CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
 #  - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
 if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT 
CPACK_RPM_USER_BINARY_SPECFILE)
-  set(RPMBUILD_FLAGS "-bb")
 
   file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
 "# -*- rpm-spec -*-
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3077340..d550ec7 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ include(RunCMake)
 include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
 
 # run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP 
"PACKAGING_TYPES"
+run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT")
 run_cpack_test(CUSTOM_NAMES "RPM;DEB" true "COMPONENT")
 run_cpack_test(DEBUGINFO "RPM" true "COMPONENT")
 run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT")
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake
new file mode 100644
index 000..694dc00
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake
@@ -0,0 +1,9 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(EXPECTED_FILES_COUNT "2")
+  set(EXPECTED_FILE_1_COMPONENT "test")
+  set(EXPECTED_FILE_2_COMPONENT "test2")
+  set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt")
+endif()
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt
new file mode 100644
index 000..e6d86d0
--- /dev/null
+++ 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt
@@ -0,0 +1,2 @@
+^CPackRPM: Will use USER specified spec file: 
(/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in
+CPackRPM: Will use GENERATED spec 
file:.*/Tests/RunCMake/RPM/CPack/CUSTOM_BINARY_SPEC_FILE-build/_CPack_Packages/.*/RPM/SPECS/custom_binary_spec_file-test2\.spec$
diff --git 
a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt
new file mode 100644
index 000..d7bb7af
--- /dev/null
+++ 
b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt
@@ -0,0 +1 @@
+CPackRPM: Will use USER specified spec file: 
(/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in
diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in 
b/Test

[Cmake-commits] CMake branch, next, updated. v3.7.1-1848-g6bfcb00

2016-12-23 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  6bfcb004e409915032522b831124b758b1ba5403 (commit)
   via  05c14ea0a97f3e8a7287f3e0bbc57f91e2a6e490 (commit)
   via  5b0a64ebc5d03a4dd0022b87e8e6cb77c3db013b (commit)
   via  e8e9034596e15dee3c8febe860c2429df512dc10 (commit)
   via  65c18b2141fb2553911104e0c10fe74d8daf5b9d (commit)
   via  6154a2cddcdb297b1aef20f501fec9af7d7b5262 (commit)
  from  01100b9e899c0a8392f3f1c2d29bcde93a29132f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bfcb004e409915032522b831124b758b1ba5403
commit 6bfcb004e409915032522b831124b758b1ba5403
Merge: 01100b9 05c14ea
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 15:12:18 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 23 15:12:18 2016 -0500

Merge topic 'cpack-new-tests' into next

05c14ea0 RunCMake.CPack_* add COMPONENT to minimal test
5b0a64eb CPack/Archive minimal tests for more formats
e8e90345 CMake Nightly Date Stamp
65c18b21 CMake Nightly Date Stamp
6154a2cd CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05c14ea0a97f3e8a7287f3e0bbc57f91e2a6e490
commit 05c14ea0a97f3e8a7287f3e0bbc57f91e2a6e490
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 21:03:05 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Fri Dec 23 21:03:05 2016 +0100

RunCMake.CPack_* add COMPONENT to minimal test

Add component based packages testing to current
monolithic minimal package tests.

diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 7a83bf2..ea6d96b 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -15,7 +15,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true 
"COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
-run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP" false "MONOLITHIC")
+run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP" false 
"MONOLITHIC;COMPONENT")
 run_cpack_test_subtests(PACKAGE_CHECKSUM 
"invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
 run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false "COMPONENT")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b0a64ebc5d03a4dd0022b87e8e6cb77c3db013b
commit 5b0a64ebc5d03a4dd0022b87e8e6cb77c3db013b
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 21:01:38 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Fri Dec 23 21:01:38 2016 +0100

CPack/Archive minimal tests for more formats

diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index adfd37d..d2465c4 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -345,7 +345,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
   add_RunCMake_test(CompilerLauncher)
 endif()
 
-add_RunCMake_test_group(CPack "DEB;RPM;TGZ")
+add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP")
 # add a test to make sure symbols are exported from a shared library
 # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used
 add_RunCMake_test(AutoExportDll)
diff --git a/Tests/RunCMake/CPack/7Z/Helpers.cmake 
b/Tests/RunCMake/CPack/7Z/Helpers.cmake
new file mode 100644
index 000..f256a42
--- /dev/null
+++ b/Tests/RunCMake/CPack/7Z/Helpers.cmake
@@ -0,0 +1,3 @@
+set(cpack_archive_extension_ "7z")
+
+include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake")
diff --git a/Tests/RunCMake/CPack/7Z/Prerequirements.cmake 
b/Tests/RunCMake/CPack/7Z/Prerequirements.cmake
new file mode 100644
index 000..dbaf682
--- /dev/null
+++ b/Tests/RunCMake/CPack/7Z/Prerequirements.cmake
@@ -0,0 +1,4 @@
+function(get_test_prerequirements found_var config_file)
+  file(WRITE "${config_file}" "")
+  set(${found_var} true PARENT_SCOPE)
+endfunction()
diff --git a/Tests/RunCMake/CPack/7Z/packaging_COMPONENT_default.cmake 
b/Tests/RunCMake/CPack/7Z/packagin

[Cmake-commits] CMake branch, next, updated. v3.7.1-1842-g01100b9

2016-12-23 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  01100b9e899c0a8392f3f1c2d29bcde93a29132f (commit)
   via  6daa2d384ef7f6f9edd5fed18c830168f7496881 (commit)
  from  37debbdfda006617a0e83f171d617bb3bfdf44f2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01100b9e899c0a8392f3f1c2d29bcde93a29132f
commit 01100b9e899c0a8392f3f1c2d29bcde93a29132f
Merge: 37debbd 6daa2d3
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 15:11:40 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 23 15:11:40 2016 -0500

Merge topic 'cpack-deb-md5sums-paths-fix' into next

6daa2d38 CPack/Deb invalid md5sums file fix


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6daa2d384ef7f6f9edd5fed18c830168f7496881
commit 6daa2d384ef7f6f9edd5fed18c830168f7496881
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Dec 20 23:08:52 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Fri Dec 23 21:10:52 2016 +0100

CPack/Deb invalid md5sums file fix

Monolithic deb packages were packaged
with invalid md5sums file as trailing
slash in path was causing string replace
to fail and preserve build path.

Fixes #16517

diff --git a/Source/CPack/cmCPackDebGenerator.cxx 
b/Source/CPack/cmCPackDebGenerator.cxx
index 36566a4..5c50da8 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -173,7 +173,11 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
 std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) +
 this->GetOutputExtension());
   // all GROUP in one vs all COMPONENT in one
-  localToplevel += "/" + compInstDirName;
+  // if must be here otherwise non component paths have a trailing / while
+  // components don't
+  if (!compInstDirName.empty()) {
+localToplevel += "/" + compInstDirName;
+  }
 
   /* replace the TEMP DIRECTORY with the component one */
   this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str());
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3077340..e104866 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -23,3 +23,4 @@ run_cpack_test_subtests(SINGLE_DEBUGINFO 
"no_main_component;one_component;one_co
 run_cpack_source_test(SOURCE_PACKAGE "RPM")
 run_cpack_test(SUGGESTS "RPM" false "MONOLITHIC")
 run_cpack_test(USER_FILELIST "RPM" false "MONOLITHIC")
+run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
new file mode 100644
index 000..6142eb3
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
@@ -0,0 +1,2 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
new file mode 100644
index 000..fbdda9c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
@@ -0,0 +1,3 @@
+set(whitespaces_ "[\t\n\r ]*")
+set(md5sums_md5sums "^.* usr/foo/CMakeLists\.txt${whitespaces_}$")
+verifyDebControl("${FOUND_FILE_1}" "md5sums" "md5sums")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
new file mode 100644
index 000..15c5892
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
@@ -0,0 +1,5 @@
+install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(CPACK_COMPONENTS_ALL test)
+endif()

---

Summary of changes:


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.1-1840-g37debbd

2016-12-23 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  37debbdfda006617a0e83f171d617bb3bfdf44f2 (commit)
   via  803e1735e6bbd394e19e051ca81ee416c6921034 (commit)
  from  451fea216b47ccd5be8e699e1b08536f573e62b4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37debbdfda006617a0e83f171d617bb3bfdf44f2
commit 37debbdfda006617a0e83f171d617bb3bfdf44f2
Merge: 451fea2 803e173
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 15:10:22 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 23 15:10:22 2016 -0500

Merge topic 'cpack-deb-md5sums-paths-fix' into next

803e1735 fixup! confilct with another commit


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=803e1735e6bbd394e19e051ca81ee416c6921034
commit 803e1735e6bbd394e19e051ca81ee416c6921034
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Fri Dec 23 21:09:58 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Fri Dec 23 21:09:58 2016 +0100

fixup! confilct with another commit

diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 96141e9..e104866 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -15,7 +15,6 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true 
"COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
-run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT")
 run_cpack_test(MINIMAL "RPM;DEB;TGZ" false "MONOLITHIC")
 run_cpack_test_subtests(PACKAGE_CHECKSUM 
"invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
@@ -24,3 +23,4 @@ run_cpack_test_subtests(SINGLE_DEBUGINFO 
"no_main_component;one_component;one_co
 run_cpack_source_test(SOURCE_PACKAGE "RPM")
 run_cpack_test(SUGGESTS "RPM" false "MONOLITHIC")
 run_cpack_test(USER_FILELIST "RPM" false "MONOLITHIC")
+run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT")

---

Summary of changes:
 Tests/RunCMake/CPack/RunCMakeTest.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] cpack multiple packages

2016-12-22 Thread Domen Vrankar
2016-12-21 12:29 GMT+01:00 Dvir Yitzchaki :

> Thanks, but as I understand a component can only belong to one group.
>
> How can I get the same component/target on multiple packages?
>

Usually you wouldn't want to package same file on same location with same
filename since during unpackaging they would override each other so this is
not supported out of the box.

Usually in such cases I would split packages even further so that one
package would be base package of others (but automatic dependency tracking
between them would require something more sophisticated than zip - RPM, Deb
or some other CPack supported packager perhaps).

However if you really need to do something like that you could write a
function that you would call instead of install(...) command which would
just forward to it and the first parameter would have a list of components
to which the file should belong. For e.g. some pseudo code:

function(my_install my_list other_params_that_get_forwarded...)
foreach(component_name_ IN LISTS my_list)
install(other_params_that_get_forwarded... COMPONENT
${component_name_})
endforeach()
endfunction()

my_install("first;second;and_anotherone" "TARGETS target_name" "DESTINATION
some_dir")

Hope this helps.

Regards,
Domen
-- 

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

[Cmake-commits] CMake branch, next, updated. v3.7.1-1838-g451fea2

2016-12-21 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  451fea216b47ccd5be8e699e1b08536f573e62b4 (commit)
   via  fb4a45ee9daddfc982e3e85f6f914be93dc51138 (commit)
  from  e2747bb4fca04ea829223496b39036c2b4627e7b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=451fea216b47ccd5be8e699e1b08536f573e62b4
commit 451fea216b47ccd5be8e699e1b08536f573e62b4
Merge: e2747bb fb4a45e
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Wed Dec 21 12:20:31 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Dec 21 12:20:31 2016 -0500

Merge topic 'cpack-deb-md5sums-paths-fix' into next

fb4a45ee CPack/Deb invalid md5sums file fix


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb4a45ee9daddfc982e3e85f6f914be93dc51138
commit fb4a45ee9daddfc982e3e85f6f914be93dc51138
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Dec 20 23:08:52 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Wed Dec 21 18:19:40 2016 +0100

CPack/Deb invalid md5sums file fix

Monolithic deb packages were packaged
with invalid md5sums file as trailing
slash in path was causing string replace
to fail and preserve build path.

Fixes #16517

diff --git a/Source/CPack/cmCPackDebGenerator.cxx 
b/Source/CPack/cmCPackDebGenerator.cxx
index 36566a4..5c50da8 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -173,7 +173,11 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
 std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) +
 this->GetOutputExtension());
   // all GROUP in one vs all COMPONENT in one
-  localToplevel += "/" + compInstDirName;
+  // if must be here otherwise non component paths have a trailing / while
+  // components don't
+  if (!compInstDirName.empty()) {
+localToplevel += "/" + compInstDirName;
+  }
 
   /* replace the TEMP DIRECTORY with the component one */
   this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str());
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3077340..96141e9 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true 
"COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
+run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT")
 run_cpack_test(MINIMAL "RPM;DEB;TGZ" false "MONOLITHIC")
 run_cpack_test_subtests(PACKAGE_CHECKSUM 
"invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
new file mode 100644
index 000..6142eb3
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
@@ -0,0 +1,2 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
new file mode 100644
index 000..fbdda9c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
@@ -0,0 +1,3 @@
+set(whitespaces_ "[\t\n\r ]*")
+set(md5sums_md5sums "^.* usr/foo/CMakeLists\.txt${whitespaces_}$")
+verifyDebControl("${FOUND_FILE_1}" "md5sums" "md5sums")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
new file mode 100644
index 000..15c5892
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
@@ -0,0 +1,5 @@
+install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(CPACK_COMPONENTS_ALL test)
+endif()

---

Summary of changes:


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.1-1836-ge2747bb

2016-12-21 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  e2747bb4fca04ea829223496b39036c2b4627e7b (commit)
   via  04f8752d1d46ecc1d55f50fb5dae195390e345b3 (commit)
  from  a1d713f219bab2475c540af474d80c4949234da0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2747bb4fca04ea829223496b39036c2b4627e7b
commit e2747bb4fca04ea829223496b39036c2b4627e7b
Merge: a1d713f 04f8752
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Wed Dec 21 12:19:23 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Dec 21 12:19:23 2016 -0500

Merge topic 'cpack-deb-md5sums-paths-fix' into next

04f8752d fixup! CPack/Deb invalid md5sums file fix


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04f8752d1d46ecc1d55f50fb5dae195390e345b3
commit 04f8752d1d46ecc1d55f50fb5dae195390e345b3
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Wed Dec 21 18:18:42 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Wed Dec 21 18:18:42 2016 +0100

fixup! CPack/Deb invalid md5sums file fix

diff --git a/Source/CPack/cmCPackDebGenerator.cxx 
b/Source/CPack/cmCPackDebGenerator.cxx
index d45eb78..5c50da8 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -175,8 +175,9 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
   // all GROUP in one vs all COMPONENT in one
   // if must be here otherwise non component paths have a trailing / while
   // components don't
-  if (!compInstDirName.empty())
+  if (!compInstDirName.empty()) {
 localToplevel += "/" + compInstDirName;
+  }
 
   /* replace the TEMP DIRECTORY with the component one */
   this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str());

---

Summary of changes:
 Source/CPack/cmCPackDebGenerator.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Documentation in RPM Package

2016-12-20 Thread Domen Vrankar
2016-12-20 21:53 GMT+01:00 Paul Londino :

> Hello,
>
> I am trying to create an RPM package using CPack. I am having trouble
> packaging the documentation. There is a custom target that generates
> HTML using DoxyGen (in a folder called html), and this gets installed
> to /usr/doc/share during the packaging process. However, this
> generates 12,000+ files which are all added individually to the .spec
> file.
>
> What I would like to do is just add the whole doc directory to the RPM
> package using the %doc attribute so the RPM correctly installs this in
> the package-named subfolder of /usr/share/doc and marks it as
> documentation. I experimented with the
> CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST variable but this doesn't seem to
> work on a wildcard basis and excluding all 12,000 generated files by
> hand does not seem practical. Also, I was able to generate the %doc
> attribute using CPACK_RPM_USER_FILELIST, but I believe in order to
> have the auto-generated doc dir, it needs to be a relative path
> instead of absolute, which I had problems setting using the CMAKE
> variable (this could be more an RPM issue than a CMAKE one).
>
> Any ideas in the best way to achieve what I'm trying to do? I could
> try using a custom .spec file but there is a lot of value in the
> automatically generated one from the CMake, so I would prefer to use
> that if possible.
>

I don't believe that CPack/RPM can currently do what you want.

CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST is not intended to be used for
removing an entire list of files so it doesn't support wildcards - it is
meant to be used to exclude directory paths from being tracked by rpm and
deleted during rpm package uninstall.

Why exactly do you want to remove all those files? Spec file size or
something else?
If you write something like this:

install(FILES CMakeLists.txt DESTINATION x/maabc COMPONENT test RENAME
manx.txt)
install(FILES CMakeLists.txt DESTINATION x/maabc COMPONENT test RENAME
many.txt)

set(CPACK_RPM_USER_FILELIST
  "%doc /usr/x"
  )

Where /usr is packaging install prefix (this part could be replaced with a
variable so that it depends on for e.g. CPACK_PACKAGING_INSTALL_PREFIX or
some other path).

And then expect the generated package with (listing only files marked with
%doc):

rpm -qpld 

You'll get both files in that subdirectory flagged with %doc and I believe
that that's what you'd like to achieve.

If for some reason you'd really like to remove those files from spec file
you'll either have to patch your CPackRPM.cmake or write your own spec
file. If that's the case then please explain the reasons a bit further and
if it would be useful for others it could be added to a later CPackRPM
release.

Regards,
Domen
-- 

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

[Cmake-commits] CMake branch, next, updated. v3.7.1-1834-ga1d713f

2016-12-20 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  a1d713f219bab2475c540af474d80c4949234da0 (commit)
   via  b8e990fade3ad1e8b4b533ada1e86411a7abf39e (commit)
  from  b195005741d7ec9f766fd2bd0c3d0287fed7ef78 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1d713f219bab2475c540af474d80c4949234da0
commit a1d713f219bab2475c540af474d80c4949234da0
Merge: b195005 b8e990f
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Dec 20 17:17:14 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Dec 20 17:17:14 2016 -0500

Merge topic 'cpack-deb-md5sums-paths-fix' into next

b8e990fa CPack/Deb invalid md5sums file fix


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8e990fade3ad1e8b4b533ada1e86411a7abf39e
commit b8e990fade3ad1e8b4b533ada1e86411a7abf39e
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Dec 20 23:08:52 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Dec 20 23:08:52 2016 +0100

CPack/Deb invalid md5sums file fix

Monolithic deb packages were packaged
with invalid md5sums file as trailing
slash in path was causing string replace
to fail and preserve build path.

Fixes #16517

diff --git a/Source/CPack/cmCPackDebGenerator.cxx 
b/Source/CPack/cmCPackDebGenerator.cxx
index 36566a4..d45eb78 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -173,7 +173,10 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
 std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) +
 this->GetOutputExtension());
   // all GROUP in one vs all COMPONENT in one
-  localToplevel += "/" + compInstDirName;
+  // if must be here otherwise non component paths have a trailing / while
+  // components don't
+  if (!compInstDirName.empty())
+localToplevel += "/" + compInstDirName;
 
   /* replace the TEMP DIRECTORY with the component one */
   this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str());
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3077340..96141e9 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true 
"COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
+run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT")
 run_cpack_test(MINIMAL "RPM;DEB;TGZ" false "MONOLITHIC")
 run_cpack_test_subtests(PACKAGE_CHECKSUM 
"invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
new file mode 100644
index 000..6142eb3
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
@@ -0,0 +1,2 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
new file mode 100644
index 000..fbdda9c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
@@ -0,0 +1,3 @@
+set(whitespaces_ "[\t\n\r ]*")
+set(md5sums_md5sums "^.* usr/foo/CMakeLists\.txt${whitespaces_}$")
+verifyDebControl("${FOUND_FILE_1}" "md5sums" "md5sums")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake 
b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
new file mode 100644
index 000..15c5892
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
@@ -0,0 +1,5 @@
+install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(CPACK_COMPONENTS_ALL test)
+endif()

---

Summary of changes:
 Source/CPack/cmCPackDebGenerator.cxx |5 -
 Tests/RunCMake/CPack/RunCMakeTest.cmake  |1 +
 Tests/RunC

[Cmake-commits] CMake branch, next, updated. v3.7.1-1832-gb195005

2016-12-20 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  b195005741d7ec9f766fd2bd0c3d0287fed7ef78 (commit)
   via  f7301e6e5f64cb42573ea7128eef3e7ba91a7779 (commit)
  from  ebb7ff5b9ba490a8645de7092c729f211b8cd464 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b195005741d7ec9f766fd2bd0c3d0287fed7ef78
commit b195005741d7ec9f766fd2bd0c3d0287fed7ef78
Merge: ebb7ff5 f7301e6
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Dec 20 15:13:54 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Dec 20 15:13:54 2016 -0500

Merge topic 'cpack-deb-package-version-override-fix' into next

f7301e6e CPackDeb: use CPACK_DEBIAN_PACKAGE_VERSION


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7301e6e5f64cb42573ea7128eef3e7ba91a7779
commit f7301e6e5f64cb42573ea7128eef3e7ba91a7779
Author: Daniel Pfeifer <dan...@pfeifer-mail.de>
AuthorDate: Tue Dec 20 14:09:20 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Dec 20 21:07:25 2016 +0100

CPackDeb: use CPACK_DEBIAN_PACKAGE_VERSION

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index bee69d9..ddf8b23 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -914,7 +914,7 @@ function(cpack_deb_prepare_package_vars)
 extract_so_info("${_FILE}" libname soversion)
 if(libname AND soversion)
   list(APPEND CPACK_DEBIAN_PACKAGE_SHLIBS_LIST
-   "${libname} ${soversion} ${CPACK_DEBIAN_PACKAGE_NAME} 
(${CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY} ${CPACK_PACKAGE_VERSION})")
+   "${libname} ${soversion} ${CPACK_DEBIAN_PACKAGE_NAME} 
(${CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY} 
${CPACK_DEBIAN_PACKAGE_VERSION})")
 else()
   message(AUTHOR_WARNING "Shared library '${_FILE}' is missing soname 
or soversion. Library will not be added to DEBIAN/shlibs control file.")
 endif()
@@ -967,7 +967,7 @@ function(cpack_deb_prepare_package_vars)
   # Patch package file name to be in corrent debian format:
   # _-_.deb
   set(CPACK_OUTPUT_FILE_NAME
-
"${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
+
"${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
 else()
   cmake_policy(PUSH)
 cmake_policy(SET CMP0010 NEW)

---

Summary of changes:
 Modules/CPackDeb.cmake |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [cmake-developers] not able to push topic to stage

2016-12-20 Thread Domen Vrankar
2016-12-20 18:02 GMT+01:00 Ben Boeckel <ben.boec...@kitware.com>:

> On Tue, Dec 20, 2016 at 17:50:02 +0100, Domen Vrankar wrote:
> > Has anything changed regarding how topics should be pushed to stage and
> > then to next for testing?
> >
> > When following what's written here: https://cmake.org/Wiki/CMake/
> Git/Develop
> > I get a git hook error:
> >
> > remote:
> > --
> > remote: denying cpack-deb-version-override-fix (64e9c38d) which contains
> > deny/topics/next (66805932)
> > remote:
>
> Your branch contains `next` in it. This is not allowed since your branch
> would then bring in all of the history `next` has into `master`.
>
> Are you trying to update your topic on `next`? Or base your branch on
> top of something on on `next`?
>

Oh... My mistake... Not certain how I managed to start from that branch.

Thanks,
Domen
-- 

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] not able to push topic to stage

2016-12-20 Thread Domen Vrankar
Hi,

Has anything changed regarding how topics should be pushed to stage and
then to next for testing?

When following what's written here: https://cmake.org/Wiki/CMake/Git/Develop
I get a git hook error:

remote:
--
remote: denying cpack-deb-version-override-fix (64e9c38d) which contains
deny/topics/next (66805932)
remote:
--
remote: error: hook declined to update
refs/heads/cpack-deb-version-override-fix
To cmake.org:stage/cmake.git
 ! [remote rejected] HEAD -> cpack-deb-version-override-fix (hook declined)
error: failed to push some refs to 'g...@cmake.org:stage/cmake.git'

Thanks,
Domen
-- 

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-commits] CMake branch, next, updated. v3.7.1-1640-g4bba79a

2016-12-07 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  4bba79ad0ceb753c87c268eb1b66dc3d818223f0 (commit)
   via  e326d8cf3eb2ac3f98fe5b4783b35c6141c006a9 (commit)
  from  09219634e58399eef76e06afd2a74caeb93cf905 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bba79ad0ceb753c87c268eb1b66dc3d818223f0
commit 4bba79ad0ceb753c87c268eb1b66dc3d818223f0
Merge: 0921963 e326d8c
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Wed Dec 7 18:13:21 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Dec 7 18:13:21 2016 -0500

Merge topic 'cpack-deb-missing-file-utility-error' into next

e326d8cf CPack/DEB shlibdep options depend on file utility


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e326d8cf3eb2ac3f98fe5b4783b35c6141c006a9
commit e326d8cf3eb2ac3f98fe5b4783b35c6141c006a9
Author: Henning Meyer <henning.me...@dedrone.com>
AuthorDate: Wed Dec 7 20:45:45 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Wed Dec 7 22:25:06 2016 +0100

CPack/DEB shlibdep options depend on file utility

Missing or missconfigured file utility should not
skip adding dependencies. Instead it should print
out a fatal error message.

Fixes #16486

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 909a12b..bee69d9 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -587,12 +587,21 @@ function(cpack_deb_prepare_package_vars)
   file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" 
"${WDIR}/*")
 cmake_policy(POP)
 
+find_program(FILE_EXECUTABLE file)
+if(NOT FILE_EXECUTABLE)
+  message(FATAL_ERROR "CPackDeb: file utility is not available. 
CPACK_DEBIAN_PACKAGE_SHLIBDEPS and CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS options 
are not available.")
+endif()
+
 # get file info so that we can determine if file is executable or not
 unset(CPACK_DEB_INSTALL_FILES)
 foreach(FILE_ IN LISTS FILE_PATHS_)
-  execute_process(COMMAND file "./${FILE_}"
+  execute_process(COMMAND env LC_ALL=C ${FILE_EXECUTABLE} "./${FILE_}"
 WORKING_DIRECTORY "${WDIR}"
+RESULT_VARIABLE FILE_RESULT_
 OUTPUT_VARIABLE INSTALL_FILE_)
+  if(NOT FILE_RESULT_ EQUAL 0)
+message (FATAL_ERROR "CPackDeb: execution of command: 
'${FILE_EXECUTABLE} ./${FILE_}' failed with exit code: ${FILE_RESULT_}")
+  endif()
   list(APPEND CPACK_DEB_INSTALL_FILES "${INSTALL_FILE_}")
 endforeach()
 

---

Summary of changes:
 Modules/CPackDeb.cmake |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.7.1-1494-g1301e17

2016-12-03 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  1301e17efbcf1a286e96240a0aa4082d134f1ea2 (commit)
   via  4e4b786e33cb67250a026efc1bbba6bba8575a07 (commit)
   via  a5a6f61be37bd7fa6997e40ed43b3450834b265e (commit)
  from  3bd5d24975e984b7df2c55855aacaaa291ca35d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1301e17efbcf1a286e96240a0aa4082d134f1ea2
commit 1301e17efbcf1a286e96240a0aa4082d134f1ea2
Merge: 3bd5d24 4e4b786
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Dec 3 14:42:45 2016 -0500
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sat Dec 3 14:42:45 2016 -0500

Merge topic 'cpack-rpm-user-file-list-with-multiple-directives' into next

4e4b786e CPack/RPM CPACK_RPM_USER_FILELIST change release note
a5a6f61b CPackRPM now supports multiple directives in 
CPACK_RPM_USER_FILELIST


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e4b786e33cb67250a026efc1bbba6bba8575a07
commit 4e4b786e33cb67250a026efc1bbba6bba8575a07
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Dec 3 20:38:30 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Dec 3 20:40:29 2016 +0100

CPack/RPM CPACK_RPM_USER_FILELIST change release note

diff --git 
a/Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst 
b/Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst
new file mode 100644
index 000..ad0154d
--- /dev/null
+++ b/Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst
@@ -0,0 +1,6 @@
+cpack-rpm-user-file-list-with-multiple-directives
+-
+
+* The :module:`CPackRPM` module learned to support
+  multiple directives per file when using
+  :variable:`CPACK_RPM_USER_FILELIST` variable.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5a6f61be37bd7fa6997e40ed43b3450834b265e
commit a5a6f61be37bd7fa6997e40ed43b3450834b265e
Author: Harry Mallon <ha...@codexdigital.com>
AuthorDate: Sat Dec 3 20:31:41 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Dec 3 20:39:05 2016 +0100

CPackRPM now supports multiple directives in CPACK_RPM_USER_FILELIST

* In older version "%dir %attr(-, root, root) foo" would put "%dir foo"
  in the final spec file.
* Also added comment to describe this and advise not not to add trailing
  slashes to directories in USER_FILELIST.
* Includes test in RunCMake CPack which now passes.

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 39697f0..5021c41 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -507,10 +507,12 @@
 #
 #  May be used to explicitly specify ``%()`` file line
 #  in the spec file. Like ``%config(noreplace)`` or any other directive
-#  that be found in the ``%files`` section. Since CPackRPM is generating
-#  the list of files (and directories) the user specified files of
-#  the ``CPACK_RPM__USER_FILELIST`` list will be removed from
-#  the generated list.
+#  that be found in the ``%files`` section. You can have multiple directives
+#  per line, as in ``%attr(600,root,root) %config(noreplace)``. Since
+#  CPackRPM is generating the list of files (and directories) the user
+#  specified files of the ``CPACK_RPM__USER_FILELIST`` list will
+#  be removed from the generated list. If referring to directories do
+#  not add a trailing slash.
 #
 # .. variable:: CPACK_RPM_CHANGELOG_FILE
 #
@@ -2055,7 +2057,8 @@ function(cpack_rpm_generate_package)
 set(CPACK_RPM_USER_INSTALL_FILES "")
 foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL)
   string(REGEX REPLACE "%[A-Za-z]+(\\([^()]*\\))? " "" F_PATH ${F})
-  string(REGEX MATCH "%[A-Za-z]+(\\([^()]*\\))?" F_PREFIX ${F})
+  string(REGEX MATCH "(%[A-Za-z]+(\\([^()]*\\))? )*" F_PREFIX ${F})
+  string(STRIP ${F_PREFIX} F_PREFIX)
 
   if(CPACK_RPM_PACKAGE_DEBUG)
 message("CPackRPM:Debug: F_PREFIX=<${F_PREFIX}>, F_PATH=<${F_PATH}>")
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake 
b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 092fb47..3077340 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -22,3 +22,4 @@ run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false 
"COMPONENT")
 run_cpack_test_subtests(SINGLE_DEBUGINFO 
"no_main_component;one_component;one_component_main;no_debuginfo;one_component_no_d

Re: [CMake] CMake 3.7: Test #379: RunCMake.CPack_RPM fails

2016-11-15 Thread Domen Vrankar
2016-11-15 15:16 GMT+01:00 Christoph Grüninger :

> Hi Domen,
> thanks for your answer.
>
> > > CMake 3.7 compiles so far, but test #379 (RunCMake.CPack_RPM) fails,
> see
> > > the error below from OBS. I had a brief look at our patches and I am
> apt
> > > to think they are unrelated.
> > > Can someone have a look and give some hint?
> >
> >
> > I'll test it today in the afternoon but for now since sources are
> > missing from the package I'm guessing that debuginfo rpm packaging
> > rpmbuild macro on openSUSE has some differences compared to the one in
> > other distros. CPack/RPM overrides it to compensate for the fact that
> > sources can be generated during build (rpmbuild debuginfo macro only
> > supports packaging of sources located in source dir during packaging so
> > that works only for insource builds...).
>
> I don't know enough about openSuse rpmbuild macro. But I know it works
> for CMake 3.6.2 and broke for 3.7.0. Is test #379 new or was it changed?
>

This is a new test for new functionality - CPackRPM can now generate
debuginfo rpm and source rpm packages (and in git repository there is also
single debuginfo package for all components which missed the 3.7 release
schedule so even more tests that will fail on openSUSE :)).

Yesterday I managed to confirm that the issue is with overriding debuginfo
template macro but failed to find the reason why (openSUSE seems to
generate debuginfo packages without using that macro - it is defined in
main rpm macros file but as far as I can tell it's not used).
I'll try to find a solution for that but since other tests pass the only
drawback is that people won't be able to use this new feature so this
shouldn't be a showstopper for you packaging a new CMake release.

Regards,
Domen
-- 

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

Re: [CMake] CMake 3.7: Test #379: RunCMake.CPack_RPM fails

2016-11-14 Thread Domen Vrankar
2016-11-12 14:38 GMT+01:00 Christoph Grüninger :

> Dear CMake folks,
> I am trying to package CMake for openSuse. I was a bit surprised that
> the new dependency libuv was nowhere mentioned. Can it be disabled by a
> configure switch for older systems?
>

If I remember correctly libuv is only used for cmake server mode so if you
don't want libuv dependency you just loose that optional functionality but
this would probably be better to ask in a separate mail as I'm not certain
how many people will look into CPack/RPM specific mail.


> CMake 3.7 compiles so far, but test #379 (RunCMake.CPack_RPM) fails, see
> the error below from OBS. I had a brief look at our patches and I am apt
> to think they are unrelated.
> Can someone have a look and give some hint?
>

I'll test it today in the afternoon but for now since sources are missing
from the package I'm guessing that debuginfo rpm packaging rpmbuild macro
on openSUSE has some differences compared to the one in other distros.
CPack/RPM overrides it to compensate for the fact that sources can be
generated during build (rpmbuild debuginfo macro only supports packaging of
sources located in source dir during packaging so that works only for
insource builds...).

Regards,
Domen
-- 

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

Re: [cmake-developers] (Re-)Added RPM Suggested Dependency Support

2016-11-05 Thread Domen Vrankar
2016-11-04 14:15 GMT+01:00 Alexander Adam :

> On Freitag, 4. November 2016 09:34:46 CET you wrote:
>
> > Would you be willing to also write a test for the SUGGESTS tag?
> > The tests are located in Tests/RunCMake/CPack, you add the test to
> > RunCMakeTest.cmake and for an example of a test similar to what you'd
> need
> > to write you can search the CPack directory for all files containing
> > PER_COMPONENT_FIELDS in their name.
>
> I took the LONG_FILENAME test for deb packages as a template for the
> following
> patch. Is it more or less what you had in mind?
>

That was more or less what I needed, thanks.

I've made some changes to the patch and test and also extended it to work
correctly for some tags that are not listed by rpmbuild --querytags.

The topic is now in next for testing:
https://cmake.org/gitweb?p=cmake.git;a=commit;h=838fd5c

Thanks,
Domen
-- 

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-commits] CMake branch, next, updated. v3.7.0-rc3-931-g838fd5c

2016-11-05 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  838fd5c3ecc961323affd2a890ff3421edc82f08 (commit)
   via  b34c045736384fc3ba8574b33211bd75082bc07b (commit)
   via  cd0423300bea21a5c0747a6aeaefbae24c10ecd8 (commit)
   via  228280d8334f2bcac346e5f0d3ea802af7f22862 (commit)
   via  d8e83ab979b0ccfc4887dbf48c088a72dffb2e96 (commit)
   via  f52bcc2ac1b3dddeca2320d8320a9406101c732d (commit)
  from  996e95b07cd311e88c77d245d5f532d1b6c7fbd4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=838fd5c3ecc961323affd2a890ff3421edc82f08
commit 838fd5c3ecc961323affd2a890ff3421edc82f08
Merge: 996e95b b34c045
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Nov 5 07:00:35 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sat Nov 5 07:00:35 2016 -0400

Merge topic 'cpack-rpm-omit-unsupported-tags' into next

b34c0457 Release text for omitting unsupported tags topic
cd042330 CPack/RPM test for Suggests tag
228280d8 CPack/RPM prevent special tags from being removed
d8e83ab9 CPack/RPM omit unsupported tags
f52bcc2a CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b34c045736384fc3ba8574b33211bd75082bc07b
commit b34c045736384fc3ba8574b33211bd75082bc07b
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Nov 5 11:52:30 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Nov 5 11:53:30 2016 +0100

Release text for omitting unsupported tags topic

diff --git a/Help/release/dev/cpack-rpm-omit-unsupported-tags.rst 
b/Help/release/dev/cpack-rpm-omit-unsupported-tags.rst
new file mode 100644
index 000..abcb7a6
--- /dev/null
+++ b/Help/release/dev/cpack-rpm-omit-unsupported-tags.rst
@@ -0,0 +1,8 @@
+cpack-rpm-omit-unsupported-tags
+---
+
+* The :module:`CPackRPM` module learned to omit
+  tags that are not supported by provided
+  rpmbuild tool. If unsupported tags are set
+  they are ignored and a developer warning is
+  printed out.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd0423300bea21a5c0747a6aeaefbae24c10ecd8
commit cd0423300bea21a5c0747a6aeaefbae24c10ecd8
Author: Alexander Adam <alexander.a...@megware.com>
AuthorDate: Sat Nov 5 11:36:12 2016 +0100
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Nov 5 11:44:32 2016 +0100

CPack/RPM test for Suggests tag

Suggests tag was not present in older versions
of rpmbuild so we test that the rpm package is
always generated either with Suggests tag present
or skipped if not supported.

diff --git a/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake
new file mode 100644
index 000..02ebb44
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-ExpectedFiles.cmake
@@ -0,0 +1,5 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_1 "rpm_suggests*.rpm")
+set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$")
diff --git a/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-VerifyResult.cmake 
b/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-VerifyResult.cmake
new file mode 100644
index 000..32cc6d1
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/RPM_SUGGESTS-VerifyResult.cmake
@@ -0,0 +1,31 @@
+execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --querytags
+OUTPUT_VARIABLE RPMBUILD_CAPS
+RESULT_VARIABLE RPMBUILD_CAPS_RESULT)
+
+if(NOT RPMBUILD_CAPS_RESULT)
+  string(REPLACE "\n" ";" RPMBUILD_CAPS "${RPMBUILD_CAPS}")
+  cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW)
+if(SUGGESTS IN_LIST RPMBUILD_CAPS)
+  set(should_contain_suggests_tag_ true)
+endif()
+  cmake_policy(POP)
+endif()
+
+# Only verify that suggests tag is present only if that tag is supported.
+# If it is not supported the rpm package was corretly generated by ignoring
+# that tag and that was already checked by expected files test.
+if(should_contain_suggests_tag_)
+  execute_process(COMMAND ${RPM_EXECUTABLE} -q --suggests -p "${FOUND_FILE_1}"
+  WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
+  RESULT_VARIABLE rpm_result_
+  OUTPUT_VARIABLE rpm_output_
+  ERROR_VARIABLE error_variable_
+  OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  if(rpm_result_ OR NOT rpm_output_ STREQUAL "libsuggested

Re: [cmake-developers] (Re-)Added RPM Suggested Dependency Support

2016-11-04 Thread Domen Vrankar
>
> after searching how to use the documented
> CPACK_RPM__PACKAGE_SUGGESTS feature, I stumbled across the
> following ticket: https://gitlab.kitware.com/cmake/cmake/issues/13423
>
> After reading through the discussion, I tried to fix the remaining issues
> and
> came up with the attached patch (against master). I also added the patched
> CPackRPM.cmake for security.
>

At first glance I like the solution. I'll take a more detailed look at it
in the afternoon.

Would you be willing to also write a test for the SUGGESTS tag?
The tests are located in Tests/RunCMake/CPack, you add the test to
RunCMakeTest.cmake and for an example of a test similar to what you'd need
to write you can search the CPack directory for all files containing
PER_COMPONENT_FIELDS in their name.

Thanks,
Domen
-- 

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] CPack DEB version info is missing patch level

2016-10-25 Thread Domen Vrankar
2016-10-25 16:59 GMT+02:00 cen :

>
> Why is patch level not baked into the DEB but it is in RPM? If install the
> deb, soft links have the proper patch level version so I guess it is
> ultimately ok but kinda annoying.
>

Which version of CPack are you using?

I can't reproduce this even with old CMake version 3.0.2 and minimal
CMakeLists.txt:

#--

cmake_minimum_required(VERSION 3.0)
project(test)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
DESTINATION dest)

set(CPACK_PACKAGE_VERSION_MAJOR 1)
set(CPACK_PACKAGE_VERSION_MINOR 2)
set(CPACK_PACKAGE_VERSION_PATCH 3)
set(CPACK_PACKAGE_CONTACT "Test ")

include(CPack)

#--

cmake -D CPACK_BINARY_DEB:bool=ON ..
make package
dpkg-deb -I test-1.2.3-Linux.deb

result: Version: 1.2.3


Regards,
Domen
-- 

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

[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-95-ga01b549

2016-10-06 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  a01b5490594eb98063d8354acdd52a03fb46232f (commit)
   via  7f15429cc574f90fdd68ee254c28833a4843e2aa (commit)
   via  9d2cb3f668dd79def44829c8bd5791e7c242e026 (commit)
   via  b39bd548f9f1f96a2285e5aff638085352c21f29 (commit)
   via  bf7d0168bfdfbe1b91bae83dd0091af54e7c4e8a (commit)
   via  22605f1e230a187658c57df22b66e1b1ade09a4a (commit)
  from  003dceb9f5b416a41ba9ca38c51f24f82e867091 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a01b5490594eb98063d8354acdd52a03fb46232f
commit a01b5490594eb98063d8354acdd52a03fb46232f
Merge: 003dceb 7f15429
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Oct 6 02:54:44 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Oct 6 02:54:44 2016 -0400

Merge topic 'cpack-rpm-single-debuginfo' into next

7f15429c CPack/RPM single debuginfo packaging
9d2cb3f6 CPack/RPM learned defining main component
b39bd548 CPack/RPM debuginfo package without binaries
bf7d0168 CPack/RPM debuginfo package objdump error suppression
22605f1e CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f15429cc574f90fdd68ee254c28833a4843e2aa
commit 7f15429cc574f90fdd68ee254c28833a4843e2aa
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Oct 6 08:33:16 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Oct 6 08:47:36 2016 +0200

CPack/RPM single debuginfo packaging

Generate a single debuginfo package even
if components packaging is enabled.

This makes issue #15668 resolution feature complete.

Closes: #15486

diff --git a/Help/release/dev/cpack-rpm-single-debuginfo.rst 
b/Help/release/dev/cpack-rpm-single-debuginfo.rst
index 281a988..34a710d 100644
--- a/Help/release/dev/cpack-rpm-single-debuginfo.rst
+++ b/Help/release/dev/cpack-rpm-single-debuginfo.rst
@@ -5,3 +5,7 @@ cpack-rpm-single-debuginfo
   which forces generation of a rpm for defined component without component
   suffix in filename and package name.
   See :variable:`CPACK_RPM_MAIN_COMPONENT` variable.
+
+* The :module:`CPackRPM` module learned to generate a single debuginfo package
+  on demand even if components packagin is used.
+  See :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` variable.
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 2c8c0e0..6017ce3 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -803,6 +803,26 @@
 #  * Mandatory : NO
 #  * Default   : -
 #
+# .. variable:: CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE
+#
+#  Create a single debuginfo package even if components packaging is set.
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+#  When this variable is enabled it produces a single debuginfo package even if
+#  component packaging is enabled.
+#
+#  When using this feature in combination with components packaging and there 
is
+#  more than one component this variable requires 
:variable:`CPACK_RPM_MAIN_COMPONENT`
+#  to be set.
+#
+# .. note::
+#
+#  If none of the :variable:`CPACK_RPM__DEBUGINFO_PACKAGE` variables
+#  is set then :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is automatically set to
+#  ``ON`` when :variable:`CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE` is set.
+#
 # Packaging of sources (SRPM)
 # ^^^
 #
@@ -2076,7 +2096,7 @@ function(cpack_rpm_generate_package)
 "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_DEBUGINFO_PACKAGE"
 "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DEBUGINFO_PACKAGE"
 "CPACK_RPM_DEBUGINFO_PACKAGE")
-  if(CPACK_RPM_DEBUGINFO_PACKAGE)
+  if(CPACK_RPM_DEBUGINFO_PACKAGE OR (CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND 
NOT GENERATE_SPEC_PARTS))
 cpack_rpm_variable_fallback("CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX"
   "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_BUILD_SOURCE_DIRS_PREFIX"
   "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_BUILD_SOURCE_DIRS_PREFIX"
@@ -2084,9 +2104,81 @@ function(cpack_rpm_generate_package)
 if(NOT CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX)
   set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX 
"/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}")
 endif()
-cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}")
 
-set(TMP_RPM_DEBUGINFO "
+if(CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE AND GENERATE_SPEC_PARTS)
+  file(WRITE 
"${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_COMPONENT}.

[Cmake-commits] CMake branch, next, updated. v3.6.2-2493-g6330c8f

2016-09-26 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  6330c8f70b69e8aac2d05846ad509d9972df2090 (commit)
   via  d068b65db17fa6a07970e6640cb69e265746d1ae (commit)
  from  afe788b028034d796f0fc121eee557930fa73e75 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6330c8f70b69e8aac2d05846ad509d9972df2090
commit 6330c8f70b69e8aac2d05846ad509d9972df2090
Merge: afe788b d068b65
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 26 11:00:53 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 26 11:00:53 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

d068b65d fixup! CPack/RPM debuginfo packages must contain sources


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d068b65db17fa6a07970e6640cb69e265746d1ae
commit d068b65db17fa6a07970e6640cb69e265746d1ae
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 26 16:59:56 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Mon Sep 26 16:59:56 2016 +0200

fixup! CPack/RPM debuginfo packages must contain sources

diff --git a/Tests/RunCMake/CPack/DEBUGINFO.cmake 
b/Tests/RunCMake/CPack/DEBUGINFO.cmake
index ead7ad1..d98b682 100644
--- a/Tests/RunCMake/CPack/DEBUGINFO.cmake
+++ b/Tests/RunCMake/CPack/DEBUGINFO.cmake
@@ -1,5 +1,11 @@
 set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
 
+# PGI compiler doesn't add build id to binaries by default
+if(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
+  string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id")
+  string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id")
+endif()
+
 set(CPACK_RPM_COMPONENT_INSTALL "ON")
 
 set(CMAKE_BUILD_TYPE Debug)
diff --git a/Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake 
b/Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake
deleted file mode 100644
index fea8db5..000
--- a/Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-function(get_test_prerequirements found_var)
-  # for now PGI compiler is not supported as it doesn't set --build-id
-  # required by debuginfo rpm packages
-
-  if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
-set(${found_var} true PARENT_SCOPE)
-  endif()
-endfunction()

---

Summary of changes:
 Tests/RunCMake/CPack/DEBUGINFO.cmake |6 ++
 Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake |8 
 2 files changed, 6 insertions(+), 8 deletions(-)
 delete mode 100644 Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.2-2463-ge4d7820

2016-09-25 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  e4d782024d3c654c216bbd32d6ad80f43dde5c29 (commit)
   via  3c63947c9d645a7b9763b116610cc2c58024f5ab (commit)
  from  d1bc55fd7228dd433eb457ec2d2dd38721694151 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4d782024d3c654c216bbd32d6ad80f43dde5c29
commit e4d782024d3c654c216bbd32d6ad80f43dde5c29
Merge: d1bc55f 3c63947
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Sep 25 17:55:29 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Sep 25 17:55:29 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

3c63947c fixup! CPack/RPM debuginfo packages must contain sources


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c63947c9d645a7b9763b116610cc2c58024f5ab
commit 3c63947c9d645a7b9763b116610cc2c58024f5ab
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Sep 25 23:54:53 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Sep 25 23:54:53 2016 +0200

fixup! CPack/RPM debuginfo packages must contain sources

diff --git a/Tests/RunCMake/CPack/DEBUGINFO.cmake 
b/Tests/RunCMake/CPack/DEBUGINFO.cmake
index e8d1c85..ead7ad1 100644
--- a/Tests/RunCMake/CPack/DEBUGINFO.cmake
+++ b/Tests/RunCMake/CPack/DEBUGINFO.cmake
@@ -1,11 +1,5 @@
 set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
 
-# PGI compiler doesn't add build id to binaries by default
-if(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
-  string(APPEND CMAKE_EXE_LINKER_FLAGS "--build-id")
-  string(APPEND CMAKE_SHARED_LINKER_FLAGS "--build-id")
-endif()
-
 set(CPACK_RPM_COMPONENT_INSTALL "ON")
 
 set(CMAKE_BUILD_TYPE Debug)
diff --git a/Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake 
b/Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake
new file mode 100644
index 000..fea8db5
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake
@@ -0,0 +1,8 @@
+function(get_test_prerequirements found_var)
+  # for now PGI compiler is not supported as it doesn't set --build-id
+  # required by debuginfo rpm packages
+
+  if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
+set(${found_var} true PARENT_SCOPE)
+  endif()
+endfunction()

---

Summary of changes:
 Tests/RunCMake/CPack/DEBUGINFO.cmake |6 --
 Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake |8 
 2 files changed, 8 insertions(+), 6 deletions(-)
 create mode 100644 Tests/RunCMake/CPack/RPM/DEBUGINFO-Prerequirements.cmake


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.2-2454-g9f79eb5

2016-09-24 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  9f79eb5caa5e25b987df8a9ff53b5fc4d84f5e74 (commit)
   via  1ef45a30aae240a89893e86e2509d5400da9753f (commit)
   via  08147a7feabba4113c29f8e898ebe3047180e4bf (commit)
  from  767ee352d0d06913b0a4d013bbdd07a28ba9200e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f79eb5caa5e25b987df8a9ff53b5fc4d84f5e74
commit 9f79eb5caa5e25b987df8a9ff53b5fc4d84f5e74
Merge: 767ee35 1ef45a3
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 06:13:43 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sat Sep 24 06:13:43 2016 -0400

Merge topic 'revert-cpack-deb-package-description-fallback' into next

1ef45a30 Revert "CPack/DEB: Make package description variable precedence 
match RPM"
08147a7f CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ef45a30aae240a89893e86e2509d5400da9753f
commit 1ef45a30aae240a89893e86e2509d5400da9753f
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 12:05:06 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Sep 24 12:05:06 2016 +0200

Revert "CPack/DEB: Make package description variable precedence match RPM"

This reverts commit 332b089ad213a1aa89658fffd8f68c9064c6d3db as multiline
descriptions require special formatting.

diff --git a/Help/release/dev/cpack-deb-package-description-fallback.rst 
b/Help/release/dev/cpack-deb-package-description-fallback.rst
deleted file mode 100644
index 71ca821..000
--- a/Help/release/dev/cpack-deb-package-description-fallback.rst
+++ /dev/null
@@ -1,15 +0,0 @@
-cpack-deb-package-description-fallback
---
-
-* The :module:`CPackDeb` module gained a new
-  :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION`
-  variable for component-specific package descriptions.
-
-* The :module:`CPackDeb` module changed its package description
-  override rules to match :module:`CPackRPM` module behavior.
-  If the :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` variable is set to
-  a non-default location then it is preferred to the
-  :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable.
-  This is a behavior change from previous versions but produces
-  more consistent and expected behavior.
-  See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`.
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 423bb00..1a7b923 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -156,18 +156,16 @@
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
-#   CPACK_DEBIAN__PACKAGE_DESCRIPTION
+#   CPACK_COMPONENT__DESCRIPTION
 #
 #  The Debian package description
 #
 #  * Mandatory : YES
 #  * Default   :
 #
-#- :variable:`CPACK_COMPONENT__DESCRIPTION` (component based 
installers only) if set,
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default 
location,
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set,
-#- or "no package description available"
+#- :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
+#
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
 #   CPACK_DEBIAN__PACKAGE_SECTION
@@ -831,23 +829,24 @@ function(cpack_deb_prepare_package_vars)
   endif()
 
   # Description: (mandatory)
-  if(CPACK_DEB_PACKAGE_COMPONENT)
-if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION)
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}")
-elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}")
+  if(NOT CPACK_DEB_PACKAGE_COMPONENT)
+if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 
CPACK_DEBIAN_PACKAGE_DESCRIPTION")
+  endif()
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
 endif()
-  endif()
-
-  if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT 
"${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL 
"${CMAKE_ROOT}/Templates/CPack.Ge

[Cmake-commits] CMake branch, next, updated. v3.6.2-2451-g767ee35

2016-09-24 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  767ee352d0d06913b0a4d013bbdd07a28ba9200e (commit)
   via  d706b72896951ceaeca3696e4269f72259666fc3 (commit)
   via  9b1ea67715caba54f89de2d3b5acaa9628d2dee1 (commit)
   via  9a417c2f68666a8002ef0116bdd2a4ae398d72cc (commit)
   via  18840638560e6826e01e00a88b6949e137f04dfc (commit)
  from  6294b8bf002dfc7e2ae4edb671c3a87c8affae80 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=767ee352d0d06913b0a4d013bbdd07a28ba9200e
commit 767ee352d0d06913b0a4d013bbdd07a28ba9200e
Merge: 6294b8b d706b72
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 05:59:44 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sat Sep 24 05:59:44 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

d706b728 fixup! CPack/RPM debuginfo packages must contain sources
9b1ea677 CPack/RPM debuginfo packaging documentation
9a417c2f CPack/RPM debuginfo directories to sources
18840638 CPack/RPM debuginfo packages must contain sources


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d706b72896951ceaeca3696e4269f72259666fc3
commit d706b72896951ceaeca3696e4269f72259666fc3
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 10:09:15 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Sep 24 11:58:55 2016 +0200

fixup! CPack/RPM debuginfo packages must contain sources

diff --git a/Tests/RunCMake/CPack/DEBUGINFO.cmake 
b/Tests/RunCMake/CPack/DEBUGINFO.cmake
index ead7ad1..e8d1c85 100644
--- a/Tests/RunCMake/CPack/DEBUGINFO.cmake
+++ b/Tests/RunCMake/CPack/DEBUGINFO.cmake
@@ -1,5 +1,11 @@
 set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
 
+# PGI compiler doesn't add build id to binaries by default
+if(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
+  string(APPEND CMAKE_EXE_LINKER_FLAGS "--build-id")
+  string(APPEND CMAKE_SHARED_LINKER_FLAGS "--build-id")
+endif()
+
 set(CPACK_RPM_COMPONENT_INSTALL "ON")
 
 set(CMAKE_BUILD_TYPE Debug)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b1ea67715caba54f89de2d3b5acaa9628d2dee1
commit 9b1ea67715caba54f89de2d3b5acaa9628d2dee1
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 19:24:25 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Sep 24 11:58:43 2016 +0200

CPack/RPM debuginfo packaging documentation

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index ac2ddc0..9ed60d3 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -60,14 +60,6 @@
 #  * Mandatory : YES
 #  * Default   : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
 #
-# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
-#   CPACK_RPM__DEBUGINFO_PACKAGE
-#
-#  Option to additionally generate debuginfo RPM package(s).
-#
-#  * Mandatory : NO
-#  * Default   : OFF
-#
 # .. variable:: CPACK_RPM_PACKAGE_NAME
 #   CPACK_RPM__PACKAGE_NAME
 #
@@ -707,6 +699,96 @@
 #   package installation may cause initial symbolic link to point to an
 #   invalid location.
 #
+# Packaging of debug information
+# ^^
+#
+# Debuginfo packages contain debug symbols and sources for debugging packaged
+# binaries.
+#
+# .. note::
+#
+#  Currently multiple debuginfo packages are generated if component based
+#  packaging is used - one debuginfo package per component. This duplicates
+#  sources if multiple binaries are using them. This is a side effect of
+#  how CPackRPM currently generates component packages and will be addressed
+#  in later versions of the generator.
+#
+# Debuginfo RPM packaging has it's own set of variables:
+#
+# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
+#   CPACK_RPM__DEBUGINFO_PACKAGE
+#
+#  Enable generation of debuginfo RPM package(s).
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+# .. note::
+#
+#  Binaries must contain debug symbols before packaging so use either ``Debug``
+#  or ``RelWithDebInfo`` for :variable:`CMAKE_BUILD_TYPE` variable value.
+#
+# .. note::
+#
+#  Packages generated from packages without binary files, with binary files but
+#  without execute permissions or without debug symbols will be empty.
+#
+# .. variable:: CPACK_BUILD_SOURCE_DIRS
+#
+#  Provides locations of root directories of source files from which binaries
+#  were built.
+#
+#  * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+#  * Default   : -
+#
+# .. note::
+#
+#  For CMake project :variable:`CPACK_BUILD_SOU

[Cmake-commits] CMake branch, next, updated. v3.6.2-2446-g6294b8b

2016-09-24 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  6294b8bf002dfc7e2ae4edb671c3a87c8affae80 (commit)
   via  784abda5e5995c4e29c6ded3d3f72619d3510a14 (commit)
   via  afb7f17e888484cdd3db4e16c7a473a557fbe53a (commit)
   via  b4b740b6003f25d36799af6de429151c65f7b49b (commit)
  from  9041fb2470a9df8ce922bb0c8e591e99b98fd5fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6294b8bf002dfc7e2ae4edb671c3a87c8affae80
commit 6294b8bf002dfc7e2ae4edb671c3a87c8affae80
Merge: 9041fb2 784abda
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 05:57:11 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sat Sep 24 05:57:11 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

784abda5 fixup! CPack/RPM debuginfo packaging documentation
afb7f17e fixup! CPack/RPM debuginfo packages must contain sources
b4b740b6 fixup! CPack/RPM debuginfo packages must contain sources


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=784abda5e5995c4e29c6ded3d3f72619d3510a14
commit 784abda5e5995c4e29c6ded3d3f72619d3510a14
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 11:01:11 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Sep 24 11:56:13 2016 +0200

fixup! CPack/RPM debuginfo packaging documentation

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 8e4aeaf..9ed60d3 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -752,11 +752,13 @@
 #  :variable:`CPACK_BUILD_SOURCE_DIRS` will not be present in debuginfo 
package.
 #
 # .. variable:: CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX
+#   CPACK_RPM__BUILD_SOURCE_DIRS_PREFIX
 #
 #  Prefix of location where sources will be placed during package installation.
 #
 #  * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
-#  * Default   : "/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}"
+#  * Default   : "/usr/src/debug/" and
+#for component packaging 
"/usr/src/debug/-"
 #
 # .. note::
 #

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afb7f17e888484cdd3db4e16c7a473a557fbe53a
commit afb7f17e888484cdd3db4e16c7a473a557fbe53a
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24 10:26:59 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sat Sep 24 11:56:08 2016 +0200

fixup! CPack/RPM debuginfo packages must contain sources

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index d880b24..8e4aeaf 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -2056,8 +2056,12 @@ function(cpack_rpm_generate_package)
 "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_DEBUGINFO_PACKAGE"
 "CPACK_RPM_DEBUGINFO_PACKAGE")
   if(CPACK_RPM_DEBUGINFO_PACKAGE)
+cpack_rpm_variable_fallback("CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX"
+  "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_BUILD_SOURCE_DIRS_PREFIX"
+  "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT_UPPER}_BUILD_SOURCE_DIRS_PREFIX"
+  "CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX")
 if(NOT CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX)
-  set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX 
"/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}")
+  set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX 
"/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}")
 endif()
 cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}")
 
@@ -2373,7 +2377,7 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT
 execute_process(
   COMMAND "${RPMBUILD_EXECUTABLE}" ${RPMBUILD_FLAGS}
   --define "_topdir ${CPACK_RPM_DIRECTORY}"
-  --buildroot 
"%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" # 
TODO should I remove this variable? or change the path?
+  --buildroot 
"%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
   --target "${CPACK_RPM_PACKAGE_ARCHITECTURE}"
   "${CPACK_RPM_BINARY_SPECFILE}"
   WORKING_DIRECTORY 
"${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4b740b6003f25d36799af6de429151c65f7b49b
commit b4b740b6003f25d36799af6de429151c65f7b49b
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sat Sep 24

Re: [cmake-developers] Linux PGI compiler missing --build-id flag by default

2016-09-23 Thread Domen Vrankar
> On 09/23/2016 06:47 AM, Domen Vrankar wrote:
> > I have rpm tests failing on dashboard [1] and it would seem that PGI
> compiler
> > is missing --build-id flag by default which can be added [2]
> >
> > Is this default behavior (missing --build-id flag) intended or simply
> missing from CMake?
> >
> > I'm guessing that this is a linker option (or do I also need a compiler
> flag?) so how do
> > I add it only for this compiler? Which|CMAKE_CXX_COMPILER_ID value
> should I compare
> > to or should I use a different CMake variable?
>
> Is this flag needed in general or only for your test?
>

This is mandatory for rpm debug info packages but as far as I can tell it
only serves for easier identification of binaries/shared libs for debugging
and dump analysis...
I was wondering if this is mandatory on Linux since I didn't even know
until today that this option exists (seems to always be set with gcc/clang).

If nobody else is missing this flag I'll just add the flag in
'if(CMAKE_CXX_COMPILER_ID MATCHES "PGI")' block for this test for now and
explain it in CPackRPM docs.

Thanks,
Domen
-- 

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] Linux PGI compiler missing --build-id flag by default

2016-09-23 Thread Domen Vrankar
Hi all,

I have rpm tests failing on dashboard [1]

and it would seem that PGI compiler is missing --build-id flag by default
which can be added [2]

.

Is this default behavior (missing --build-id flag) intended or simply
missing from CMake?

I'm guessing that this is a linker option (or do I also need a compiler
flag?) so how do I add it only for this compiler? Which CMAKE_CXX_COMPILER_ID
value should I compare to or should I use a different CMake variable?

Thanks,
Domen

[1]
https://open.cdash.org/testSummary.php?project=1=RunCMake.CPack_RPM=2016-09-22

[2]
http://www.pgroup.com/userforum/viewtopic.php?p=11665=330354c1739f0409fd1be6878830b457
-- 

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-commits] CMake branch, next, updated. v3.6.2-2388-g36ab119

2016-09-22 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  36ab1194b924d7b1702993bd250003167bb3ecb1 (commit)
   via  e677ecdf19c64fff2f0307ffcc5becf7a7d8b63f (commit)
  from  a11ba9ee3bc679320d48f207535584cbb14a0e8a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36ab1194b924d7b1702993bd250003167bb3ecb1
commit 36ab1194b924d7b1702993bd250003167bb3ecb1
Merge: a11ba9e e677ecd
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 13:52:23 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Sep 22 13:52:23 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

e677ecdf CPack/RPM debuginfo packaging documentation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e677ecdf19c64fff2f0307ffcc5becf7a7d8b63f
commit e677ecdf19c64fff2f0307ffcc5becf7a7d8b63f
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 19:24:25 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Sep 22 19:51:53 2016 +0200

CPack/RPM debuginfo packaging documentation

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 95904f7..d880b24 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -60,14 +60,6 @@
 #  * Mandatory : YES
 #  * Default   : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
 #
-# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
-#   CPACK_RPM__DEBUGINFO_PACKAGE
-#
-#  Option to additionally generate debuginfo RPM package(s).
-#
-#  * Mandatory : NO
-#  * Default   : OFF
-#
 # .. variable:: CPACK_RPM_PACKAGE_NAME
 #   CPACK_RPM__PACKAGE_NAME
 #
@@ -707,6 +699,94 @@
 #   package installation may cause initial symbolic link to point to an
 #   invalid location.
 #
+# Packaging of debug information
+# ^^
+#
+# Debuginfo packages contain debug symbols and sources for debugging packaged
+# binaries.
+#
+# .. note::
+#
+#  Currently multiple debuginfo packages are generated if component based
+#  packaging is used - one debuginfo package per component. This duplicates
+#  sources if multiple binaries are using them. This is a side effect of
+#  how CPackRPM currently generates component packages and will be addressed
+#  in later versions of the generator.
+#
+# Debuginfo RPM packaging has it's own set of variables:
+#
+# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
+#   CPACK_RPM__DEBUGINFO_PACKAGE
+#
+#  Enable generation of debuginfo RPM package(s).
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+# .. note::
+#
+#  Binaries must contain debug symbols before packaging so use either ``Debug``
+#  or ``RelWithDebInfo`` for :variable:`CMAKE_BUILD_TYPE` variable value.
+#
+# .. note::
+#
+#  Packages generated from packages without binary files, with binary files but
+#  without execute permissions or without debug symbols will be empty.
+#
+# .. variable:: CPACK_BUILD_SOURCE_DIRS
+#
+#  Provides locations of root directories of source files from which binaries
+#  were built.
+#
+#  * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+#  * Default   : -
+#
+# .. note::
+#
+#  For CMake project :variable:`CPACK_BUILD_SOURCE_DIRS` is set by default to
+#  point to :variable:`CMAKE_SOURCE_DIR` and :variable:`CMAKE_BINARY_DIR` 
paths.
+#
+# .. note::
+#
+#  Sources with path prefixes that do not fall under any location provided with
+#  :variable:`CPACK_BUILD_SOURCE_DIRS` will not be present in debuginfo 
package.
+#
+# .. variable:: CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX
+#
+#  Prefix of location where sources will be placed during package installation.
+#
+#  * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+#  * Default   : "/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}"
+#
+# .. note::
+#
+#  Each source path prefix is additionaly suffixed by ``src_`` where
+#  index is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS`
+#  variable. This produces ``/src_``
+#  replacement path.
+#  Limitation is that replaced path part must be shorter or of equal
+#  length than the length of its replacement. If that is not the case either
+#  :variable:`CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX` variable has to be set to
+#  a shorter path or source directories must be placed on a longer path.
+#
+# .. variable:: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS
+#
+#  Directories containing sources that should be excluded from debuginfo 
packages.
+#
+#  * Mandatory : NO
+#  * Default   : "/usr /usr/src /usr/src/debug"
+#
+#  Listed paths are owned by other RPM packages and sh

[Cmake-commits] CMake branch, next, updated. v3.6.2-2386-ga11ba9e

2016-09-22 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  a11ba9ee3bc679320d48f207535584cbb14a0e8a (commit)
   via  04310070588df956f8a925e3ca873ca290a3bd99 (commit)
  from  11d9a18decaffe6cd8941f7e578c54b0b77c579f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a11ba9ee3bc679320d48f207535584cbb14a0e8a
commit a11ba9ee3bc679320d48f207535584cbb14a0e8a
Merge: 11d9a18 0431007
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 13:44:09 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Sep 22 13:44:09 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

04310070 fixup! CPack/RPM debuginfo packaging documentation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04310070588df956f8a925e3ca873ca290a3bd99
commit 04310070588df956f8a925e3ca873ca290a3bd99
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 19:43:49 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Sep 22 19:43:49 2016 +0200

fixup! CPack/RPM debuginfo packaging documentation

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 4ae0382..d880b24 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -760,15 +760,33 @@
 #
 # .. note::
 #
-#  Each source path prefix is additionaly suffixed by ``src_${index_}`` where
-#  index_ is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS`
-#  variable. This produces 
``${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}``
+#  Each source path prefix is additionaly suffixed by ``src_`` where
+#  index is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS`
+#  variable. This produces ``/src_``
 #  replacement path.
 #  Limitation is that replaced path part must be shorter or of equal
 #  length than the length of its replacement. If that is not the case either
 #  :variable:`CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX` variable has to be set to
 #  a shorter path or source directories must be placed on a longer path.
 #
+# .. variable:: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS
+#
+#  Directories containing sources that should be excluded from debuginfo 
packages.
+#
+#  * Mandatory : NO
+#  * Default   : "/usr /usr/src /usr/src/debug"
+#
+#  Listed paths are owned by other RPM packages and should therefore not be
+#  deleted on debuginfo package uninstallation.
+#
+# .. variable:: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION
+#
+#  Paths that should be appended to 
:variable:`CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS`
+#  for exclusion.
+#
+#  * Mandatory : NO
+#  * Default   : -
+#
 # Packaging of sources (SRPM)
 # ^^^
 #

---

Summary of changes:
 Modules/CPackRPM.cmake |   24 +---
 1 file changed, 21 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.2-2384-g11d9a18

2016-09-22 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  11d9a18decaffe6cd8941f7e578c54b0b77c579f (commit)
   via  fea1abfaa20f9c290c9f695a461bc0be5ce1ada3 (commit)
   via  9c109672631853c5393b68de5febd3a59ee57760 (commit)
  from  513509a2e233824225ce57a6487c26c2e28847fb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11d9a18decaffe6cd8941f7e578c54b0b77c579f
commit 11d9a18decaffe6cd8941f7e578c54b0b77c579f
Merge: 513509a fea1abf
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 13:25:27 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Sep 22 13:25:27 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

fea1abfa CPack/RPM debuginfo packaging documentation
9c109672 CPack/RPM debuginfo directories to sources


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fea1abfaa20f9c290c9f695a461bc0be5ce1ada3
commit fea1abfaa20f9c290c9f695a461bc0be5ce1ada3
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 19:24:25 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Sep 22 19:24:25 2016 +0200

CPack/RPM debuginfo packaging documentation

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 95904f7..4ae0382 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -60,14 +60,6 @@
 #  * Mandatory : YES
 #  * Default   : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
 #
-# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
-#   CPACK_RPM__DEBUGINFO_PACKAGE
-#
-#  Option to additionally generate debuginfo RPM package(s).
-#
-#  * Mandatory : NO
-#  * Default   : OFF
-#
 # .. variable:: CPACK_RPM_PACKAGE_NAME
 #   CPACK_RPM__PACKAGE_NAME
 #
@@ -707,6 +699,76 @@
 #   package installation may cause initial symbolic link to point to an
 #   invalid location.
 #
+# Packaging of debug information
+# ^^
+#
+# Debuginfo packages contain debug symbols and sources for debugging packaged
+# binaries.
+#
+# .. note::
+#
+#  Currently multiple debuginfo packages are generated if component based
+#  packaging is used - one debuginfo package per component. This duplicates
+#  sources if multiple binaries are using them. This is a side effect of
+#  how CPackRPM currently generates component packages and will be addressed
+#  in later versions of the generator.
+#
+# Debuginfo RPM packaging has it's own set of variables:
+#
+# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
+#   CPACK_RPM__DEBUGINFO_PACKAGE
+#
+#  Enable generation of debuginfo RPM package(s).
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+# .. note::
+#
+#  Binaries must contain debug symbols before packaging so use either ``Debug``
+#  or ``RelWithDebInfo`` for :variable:`CMAKE_BUILD_TYPE` variable value.
+#
+# .. note::
+#
+#  Packages generated from packages without binary files, with binary files but
+#  without execute permissions or without debug symbols will be empty.
+#
+# .. variable:: CPACK_BUILD_SOURCE_DIRS
+#
+#  Provides locations of root directories of source files from which binaries
+#  were built.
+#
+#  * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+#  * Default   : -
+#
+# .. note::
+#
+#  For CMake project :variable:`CPACK_BUILD_SOURCE_DIRS` is set by default to
+#  point to :variable:`CMAKE_SOURCE_DIR` and :variable:`CMAKE_BINARY_DIR` 
paths.
+#
+# .. note::
+#
+#  Sources with path prefixes that do not fall under any location provided with
+#  :variable:`CPACK_BUILD_SOURCE_DIRS` will not be present in debuginfo 
package.
+#
+# .. variable:: CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX
+#
+#  Prefix of location where sources will be placed during package installation.
+#
+#  * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+#  * Default   : "/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}"
+#
+# .. note::
+#
+#  Each source path prefix is additionaly suffixed by ``src_${index_}`` where
+#  index_ is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS`
+#  variable. This produces 
``${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}``
+#  replacement path.
+#  Limitation is that replaced path part must be shorter or of equal
+#  length than the length of its replacement. If that is not the case either
+#  :variable:`CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX` variable has to be set to
+#  a shorter path or source directories must be placed on a longer path.
+#
 # Packaging of sources (SRPM)
 # ^^^
 #

https:/

[Cmake-commits] CMake branch, next, updated. v3.6.2-2355-gb0e23de

2016-09-22 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  b0e23de782c19caefdfbbb96a1582eed5817d8cc (commit)
   via  dea14afba41ae1af58be0b897557bd0a7c0b3329 (commit)
   via  555ef1e235e62236870b27adb1b6c384313bd792 (commit)
  from  e893a4c791898dc49281d04dc56a0354afc6ca1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0e23de782c19caefdfbbb96a1582eed5817d8cc
commit b0e23de782c19caefdfbbb96a1582eed5817d8cc
Merge: e893a4c dea14af
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Sep 22 02:57:33 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Sep 22 02:57:33 2016 -0400

Merge topic 'cpack-rpm-debuginfo-sources' into next

dea14afb CPack/RPM debuginfo packages must contain sources
555ef1e2 CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dea14afba41ae1af58be0b897557bd0a7c0b3329
commit dea14afba41ae1af58be0b897557bd0a7c0b3329
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 20 00:41:33 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Sep 22 08:54:36 2016 +0200

CPack/RPM debuginfo packages must contain sources

Issue #15668 fix was missing relevant source
files in debuginfo package.

diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 99f22ec..50d9fc3 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -604,6 +604,8 @@ if(CMAKE_OSX_SYSROOT)
   _cpack_set_default(CPACK_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_PATH}")
 endif()
 
+_cpack_set_default(CPACK_BUILD_SOURCE_DIRS 
"${CMAKE_SOURCE_DIR};${CMAKE_BINARY_DIR}")
+
 if(DEFINED CPACK_COMPONENTS_ALL)
   if(CPACK_MONOLITHIC_INSTALL)
 message("CPack warning: both CPACK_COMPONENTS_ALL and 
CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic 
installation.")
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index d78f7fa..5b1eec8 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -1321,13 +1321,37 @@ endif()
 # We need to check if the binaries were compiled with debug symbols
 # because without them the package will be useless
 function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
+  if(NOT CPACK_BUILD_SOURCE_DIRS)
+message(FATAL_ERROR "CPackRPM: CPACK_BUILD_SOURCE_DIRS variable is not 
set!"
+  " Required for debuginfo packaging. See documentation of"
+  " CPACK_RPM_DEBUGINFO_PACKAGE variable for details.")
+  endif()
+
   # With objdump we should check the debug symbols
   find_program(OBJDUMP_EXECUTABLE objdump)
   if(NOT OBJDUMP_EXECUTABLE)
-message(WARNING "CPackRPM: objdump binary could not be found!")
+message(FATAL_ERROR "CPackRPM: objdump binary could not be found!"
+  " Required for debuginfo packaging. See documentation of"
+  " CPACK_RPM_DEBUGINFO_PACKAGE variable for details.")
   endif()
 
+  # With debugedit we prepare source files list
+  find_program(DEBUGEDIT_EXECUTABLE debugedit "/usr/lib/rpm/")
+  if(NOT DEBUGEDIT_EXECUTABLE)
+message(FATAL_ERROR "CPackRPM: debugedit binary could not be found!"
+  " Required for debuginfo packaging. See documentation of"
+  " CPACK_RPM_DEBUGINFO_PACKAGE variable for details.")
+  endif()
+
+  unset(mkdir_list_)
+  unset(cp_list_)
+  unset(additional_sources_)
+
   foreach(F IN LISTS INSTALL_FILES)
+if(IS_DIRECTORY "${WORKING_DIR}/${F}" OR IS_SYMLINK "${WORKING_DIR}/${F}")
+  continue()
+endif()
+
 execute_process(COMMAND "${OBJDUMP_EXECUTABLE}" -h ${WORKING_DIR}/${F}
 WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}"
 RESULT_VARIABLE OBJDUMP_EXEC_RESULT
@@ -1335,11 +1359,70 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES 
WORKING_DIR)
 # Check that if the given file was executable or not
 if(NOT OBJDUMP_EXEC_RESULT)
   string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT)
-  if(NOT FIND_RESULT GREATER -1)
+  if(FIND_RESULT GREATER -1)
+set(index_ 0)
+foreach(source_dir_ IN LISTS CPACK_BUILD_SOURCE_DIRS)
+  string(LENGTH "${source_dir_}" source_dir_len_)
+  string(LENGTH "${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}" 
debuginfo_dir_len)
+  if(source_dir_len_ LESS debuginfo_dir_len)
+message(FATAL_ERROR "CPackRPM: source dir path '${source_dir_}' is&quo

[Cmake-commits] CMake branch, next, updated. v3.6.2-2330-ge713f05

2016-09-20 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  e713f05af166c0f359c0ffb361503df37c330056 (commit)
   via  ccd5f19c24fec74584f4148b0fa27b4ad46d4211 (commit)
  from  41124690a9d66963ec4d80f53d74be1b00da2fd7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e713f05af166c0f359c0ffb361503df37c330056
commit e713f05af166c0f359c0ffb361503df37c330056
Merge: 4112469 ccd5f19
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 20 15:16:14 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Sep 20 15:16:14 2016 -0400

Merge topic 'runcmake-cpack-test-framework-fix' into next

ccd5f19c runcmake-cpack-test-framework-fix


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccd5f19c24fec74584f4148b0fa27b4ad46d4211
commit ccd5f19c24fec74584f4148b0fa27b4ad46d4211
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 20 21:08:36 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Sep 20 21:08:36 2016 +0200

runcmake-cpack-test-framework-fix

Fix for conflicting RunCMake.CPack test
framework changes caused by commits
'cpack-rpm-srpm-package' and
'cpack.hash_computing'

diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake 
b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
index 7c2c9c6..7e6b4b1 100644
--- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake
+++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
@@ -1,72 +1,6 @@
 cmake_policy(SET CMP0057 NEW)
-function(run_cpack_test_common_for_merge_ TEST_NAME types build source)
-  if(TEST_TYPE IN_LIST types)
-set(RunCMake_TEST_NO_CLEAN TRUE)
-set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
-
- # TODO this should be executed only once per ctest run (not per generator)
-file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
-file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
-if(EXISTS 
"${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
-  
include("${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
-
-  set(FOUND_PREREQUIREMENTS false)
-  get_test_prerequirements("FOUND_PREREQUIREMENTS"
-  "${TEST_CONFIG_DIR}/${type}_config.cmake")
-
-  # skip the test if prerequirements are not met
-  if(NOT FOUND_PREREQUIREMENTS)
-message(STATUS "${TEST_NAME} - SKIPPED")
-return()
-  endif()
-endif()
-
-# execute cmake
-set(RunCMake_TEST_OPTIONS "-DGENERATOR_TYPE=${TEST_TYPE}")
-run_cmake(${TEST_NAME})
-
-# execute optional build step
-if(build)
-  run_cmake_command(${TEST_NAME}-Build "${CMAKE_COMMAND}" --build 
"${RunCMake_TEST_BINARY_DIR}")
-endif()
-
-if(source)
-  set(pack_params_ -G ${TEST_TYPE} --config ./CPackSourceConfig.cmake)
-  FILE(APPEND ${RunCMake_TEST_BINARY_DIR}/CPackSourceConfig.cmake
-"\nset(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS 
\"-DRunCMake_TEST:STRING=${TEST_NAME}\")")
-else()
-  unset(pack_params_)
-endif()
 
-# execute cpack
-execute_process(
-  COMMAND ${CMAKE_CPACK_COMMAND} ${pack_params_}
-  WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
-  RESULT_VARIABLE "result_"
-  OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt"
-  ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt"
-  )
-
-# verify result
-run_cmake_command(
-  ${TEST_TYPE}/${TEST_NAME}
-  "${CMAKE_COMMAND}"
--DRunCMake_TEST=${TEST_NAME}
--DGENERATOR_TYPE=${TEST_TYPE}
--DPACKAGING_RESULT=${result_}
-"-Dsrc_dir=${RunCMake_SOURCE_DIR}"
-"-Dbin_dir=${RunCMake_TEST_BINARY_DIR}"
-"-Dconfig_file=${config_file}"
--P "${RunCMake_SOURCE_DIR}/VerifyResult.cmake"
-  )
-  endif()
-endfunction()
-function(run_cpack_source_test TEST_NAME types)
-  run_cpack_test_common_for_merge_("${TEST_NAME}" "${types}" false true)
-endfunction()
-
-function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX)
+function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source)
   if(TEST_TYPE IN_LIST types)
 set(RunCMake_TEST_NO_CLEAN TRUE)
 set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
@@ -106,10 +40,19 @@ function(run_cpack_test_common_ TEST_NAME types 

[Cmake-commits] CMake branch, next, updated. v3.6.2-2289-gc569163

2016-09-19 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  c569163f4fab72d1e8f7c1f066fe864dcc9335fe (commit)
   via  1bb31cc2f89de873ddf84bec65c02266625e84fa (commit)
  from  056a10260dbf914602c7162c8c6d7b5addace1bb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c569163f4fab72d1e8f7c1f066fe864dcc9335fe
commit c569163f4fab72d1e8f7c1f066fe864dcc9335fe
Merge: 056a102 1bb31cc
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 19 18:18:29 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 19 18:18:29 2016 -0400

Merge topic 'cpack-rpm-policy-warnings' into next

1bb31cc2 cpack-rpm-policy-warnings


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bb31cc2f89de873ddf84bec65c02266625e84fa
commit 1bb31cc2f89de873ddf84bec65c02266625e84fa
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 20 00:17:54 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Sep 20 00:17:54 2016 +0200

cpack-rpm-policy-warnings

For older versions of CMake minimum
required version CMP0007 policy
warning was printed out.

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 36caac6..90b3943 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -847,7 +847,10 @@ function(cpack_rpm_prepare_content_list)
 set(_DISTINCT_PATH "${_RPM_RELOCATION_PREFIX}")
 
 string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS " 
${_RPM_RELOCATION_PREFIX}")
-list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1)
+cmake_policy(PUSH)
+  cmake_policy(SET CMP0007 NEW)
+  list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1)
+cmake_policy(POP)
 unset(_TMP_LIST)
 # Now generate all of the parent dirs of the relocation path
 foreach(_PREFIX_PATH_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS})

---

Summary of changes:
 Modules/CPackRPM.cmake |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.2-2287-g056a102

2016-09-19 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  056a10260dbf914602c7162c8c6d7b5addace1bb (commit)
   via  0ba6b21650c0f9db147c390c76c0495b2c445a6e (commit)
  from  2040474e9dbc9fe8a3cc955c3564d48f0afb3664 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=056a10260dbf914602c7162c8c6d7b5addace1bb
commit 056a10260dbf914602c7162c8c6d7b5addace1bb
Merge: 2040474 0ba6b21
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 19 17:53:23 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 19 17:53:23 2016 -0400

Merge topic 'cpack-rpm-srpm-package' into next

0ba6b216 cpack-rpm-srpm-package

diff --cc Tests/RunCMake/CPack/CPackTestHelpers.cmake
index 5a35acd,d09fafe..7c2c9c6
--- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake
+++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
@@@ -1,6 -1,72 +1,72 @@@
  cmake_policy(SET CMP0057 NEW)
+ function(run_cpack_test_common_for_merge_ TEST_NAME types build source)
+   if(TEST_TYPE IN_LIST types)
+ set(RunCMake_TEST_NO_CLEAN TRUE)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
+ 
+  # TODO this should be executed only once per ctest run (not per 
generator)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ 
+ if(EXISTS 
"${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
+   
include("${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
+ 
+   set(FOUND_PREREQUIREMENTS false)
+   get_test_prerequirements("FOUND_PREREQUIREMENTS"
+   "${TEST_CONFIG_DIR}/${type}_config.cmake")
+ 
+   # skip the test if prerequirements are not met
+   if(NOT FOUND_PREREQUIREMENTS)
+ message(STATUS "${TEST_NAME} - SKIPPED")
+ return()
+   endif()
+ endif()
+ 
+ # execute cmake
+ set(RunCMake_TEST_OPTIONS "-DGENERATOR_TYPE=${TEST_TYPE}")
+ run_cmake(${TEST_NAME})
+ 
+ # execute optional build step
+ if(build)
+   run_cmake_command(${TEST_NAME}-Build "${CMAKE_COMMAND}" --build 
"${RunCMake_TEST_BINARY_DIR}")
+ endif()
+ 
+ if(source)
+   set(pack_params_ -G ${TEST_TYPE} --config ./CPackSourceConfig.cmake)
+   FILE(APPEND ${RunCMake_TEST_BINARY_DIR}/CPackSourceConfig.cmake
+ "\nset(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS 
\"-DRunCMake_TEST:STRING=${TEST_NAME}\")")
+ else()
+   unset(pack_params_)
+ endif()
+ 
+ # execute cpack
+ execute_process(
+   COMMAND ${CMAKE_CPACK_COMMAND} ${pack_params_}
+   WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
+   RESULT_VARIABLE "result_"
+   OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt"
+   ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt"
+   )
+ 
+ # verify result
+ run_cmake_command(
+   ${TEST_TYPE}/${TEST_NAME}
+   "${CMAKE_COMMAND}"
+ -DRunCMake_TEST=${TEST_NAME}
+ -DGENERATOR_TYPE=${TEST_TYPE}
+ -DPACKAGING_RESULT=${result_}
+ "-Dsrc_dir=${RunCMake_SOURCE_DIR}"
+ "-Dbin_dir=${RunCMake_TEST_BINARY_DIR}"
+ "-Dconfig_file=${config_file}"
+ -P "${RunCMake_SOURCE_DIR}/VerifyResult.cmake"
+   )
+   endif()
+ endfunction()
+ function(run_cpack_source_test TEST_NAME types)
+   run_cpack_test_common_for_merge_("${TEST_NAME}" "${types}" false true)
+ endfunction()
  
 -function(run_cpack_test TEST_NAME types build)
 +function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX)
if(TEST_TYPE IN_LIST types)
  set(RunCMake_TEST_NO_CLEAN TRUE)
  set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
diff --cc Tests/RunCMake/CPack/VerifyResult.cmake
index 238cbfd,fc929e3..8bc2a58
--- a/Tests/RunCMake/CPack/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/VerifyResult.cmake
@@@ -8,10 -8,10 +8,10 @@@ file(READ "${bin_dir}/test_error.txt" e
  file(READ "${config_file}" config_file_content)
  
  set(output_error_message
- "\nCPack output: '${output}'\nCPack error: '${error}';\nconfig file: 
'${config_file_content}'")
+ "\nCPack output: '${output}'\nCPack error: '${error}';\nCPack result: 
'${PACKAGING_RESULT}';\nconfig file: '${config_file_content}'")
  
  # check that expected gen

[Cmake-commits] CMake branch, next, updated. v3.6.1-1819-gea86f38

2016-09-06 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  ea86f387bd68596159f38b18863072769cf3df58 (commit)
   via  25899e8a9dcc633b6e7495a87299354a14cb834a (commit)
  from  ce7f0cbce58b4688991df6db0e00b93b53d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea86f387bd68596159f38b18863072769cf3df58
commit ea86f387bd68596159f38b18863072769cf3df58
Merge: ce7f0cb 25899e8
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 6 13:51:22 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Sep 6 13:51:22 2016 -0400

Merge topic 'cpack-deb-package-description-fallback' into next

25899e8a cpack-deb-package-description-fallback


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25899e8a9dcc633b6e7495a87299354a14cb834a
commit 25899e8a9dcc633b6e7495a87299354a14cb834a
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 5 23:58:33 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Sep 6 19:49:41 2016 +0200

cpack-deb-package-description-fallback

Breaking change of fallback variable precedence
for CPACK_DEBIAN_PACKAGE_DESCRIPTION that matches
CPackRPM behavior as much as possible.

Closes: #16272

diff --git a/Help/release/dev/cpack-deb-package-description-fallback 
b/Help/release/dev/cpack-deb-package-description-fallback
new file mode 100644
index 000..6300dfc
--- /dev/null
+++ b/Help/release/dev/cpack-deb-package-description-fallback
@@ -0,0 +1,11 @@
+cpack-deb-package-description-fallback
+--
+
+* The :module:`CPackDeb` module learned new package description
+  override rules to match :module:`CPackRPM` module behavior.
+  **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE`
+  variable is set to non default location then it is prefered to
+  :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable.
+  Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION`
+  was introduced for component based packaging.
+  See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`.
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 1a7b923..423bb00 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -156,16 +156,18 @@
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
-#   CPACK_COMPONENT__DESCRIPTION
+#   CPACK_DEBIAN__PACKAGE_DESCRIPTION
 #
 #  The Debian package description
 #
 #  * Mandatory : YES
 #  * Default   :
 #
-#- :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
-#
+#- :variable:`CPACK_COMPONENT__DESCRIPTION` (component based 
installers only) if set,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default 
location,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set,
+#- or "no package description available"
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
 #   CPACK_DEBIAN__PACKAGE_SECTION
@@ -829,24 +831,23 @@ function(cpack_deb_prepare_package_vars)
   endif()
 
   # Description: (mandatory)
-  if(NOT CPACK_DEB_PACKAGE_COMPONENT)
-if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 
CPACK_DEBIAN_PACKAGE_DESCRIPTION")
-  endif()
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+  if(CPACK_DEB_PACKAGE_COMPONENT)
+if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION)
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}")
+elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}")
 endif()
-  else()
-set(component_description_var 
CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
-
-# component description overrides package description
-if(${component_description_var})
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}})
-elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 

[Cmake-commits] CMake branch, next, updated. v3.6.1-1817-gce7f0cb

2016-09-06 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  ce7f0cbce58b4688991df6db0e00b93b53d2 (commit)
   via  a1fc9467271de8614be7c44e4b42613c7e5e2c58 (commit)
  from  345e669b0663a23876c815d46463ea90685bd110 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce7f0cbce58b4688991df6db0e00b93b53d2
commit ce7f0cbce58b4688991df6db0e00b93b53d2
Merge: 345e669 a1fc946
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 6 13:49:17 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Sep 6 13:49:17 2016 -0400

Merge topic 'cpack-deb-package-description-fallback' into next

a1fc9467 fixup! cpack-deb-package-description-fallback


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1fc9467271de8614be7c44e4b42613c7e5e2c58
commit a1fc9467271de8614be7c44e4b42613c7e5e2c58
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 6 19:48:36 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Sep 6 19:48:36 2016 +0200

fixup! cpack-deb-package-description-fallback

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 1032dfc..423bb00 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -163,8 +163,7 @@
 #  * Mandatory : YES
 #  * Default   :
 #
-#- :variable:`CPACK_COMPONENT__DESCRIPTION` (component
-#   based installers only) if set,
+#- :variable:`CPACK_COMPONENT__DESCRIPTION` (component based 
installers only) if set,
 #- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default 
location,
 #- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
 #- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set,

---

Summary of changes:
 Modules/CPackDeb.cmake |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.1-1815-g345e669

2016-09-06 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  345e669b0663a23876c815d46463ea90685bd110 (commit)
   via  9afe1ed94c46071b5ec0b3ef288493d355de75db (commit)
  from  d7cc6846e9bfce3f59161ee1485b181039276d6a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=345e669b0663a23876c815d46463ea90685bd110
commit 345e669b0663a23876c815d46463ea90685bd110
Merge: d7cc684 9afe1ed
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 6 13:41:38 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Sep 6 13:41:38 2016 -0400

Merge topic 'cpack-deb-package-description-fallback' into next

9afe1ed9 cpack-deb-package-description-fallback


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9afe1ed94c46071b5ec0b3ef288493d355de75db
commit 9afe1ed94c46071b5ec0b3ef288493d355de75db
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 5 23:58:33 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Sep 6 19:39:43 2016 +0200

cpack-deb-package-description-fallback

Breaking change of fallback variable precedence
for CPACK_DEBIAN_PACKAGE_DESCRIPTION that matches
CPackRPM behavior as much as possible.

Closes: #16272

diff --git a/Help/release/dev/cpack-deb-package-description-fallback 
b/Help/release/dev/cpack-deb-package-description-fallback
new file mode 100644
index 000..6300dfc
--- /dev/null
+++ b/Help/release/dev/cpack-deb-package-description-fallback
@@ -0,0 +1,11 @@
+cpack-deb-package-description-fallback
+--
+
+* The :module:`CPackDeb` module learned new package description
+  override rules to match :module:`CPackRPM` module behavior.
+  **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE`
+  variable is set to non default location then it is prefered to
+  :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable.
+  Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION`
+  was introduced for component based packaging.
+  See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`.
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 1a7b923..1032dfc 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -156,16 +156,19 @@
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
-#   CPACK_COMPONENT__DESCRIPTION
+#   CPACK_DEBIAN__PACKAGE_DESCRIPTION
 #
 #  The Debian package description
 #
 #  * Mandatory : YES
 #  * Default   :
 #
-#- :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
-#
+#- :variable:`CPACK_COMPONENT__DESCRIPTION` (component
+#   based installers only) if set,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default 
location,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set,
+#- or "no package description available"
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
 #   CPACK_DEBIAN__PACKAGE_SECTION
@@ -829,24 +832,23 @@ function(cpack_deb_prepare_package_vars)
   endif()
 
   # Description: (mandatory)
-  if(NOT CPACK_DEB_PACKAGE_COMPONENT)
-if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 
CPACK_DEBIAN_PACKAGE_DESCRIPTION")
-  endif()
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+  if(CPACK_DEB_PACKAGE_COMPONENT)
+if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION)
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}")
+elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}")
 endif()
-  else()
-set(component_description_var 
CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
-
-# component description overrides package description
-if(${component_description_var})
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}})
-elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 

[Cmake-commits] CMake branch, next, updated. v3.6.1-1794-gd16d98e

2016-09-05 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  d16d98e86a084508666fd9768b779ae0ce96763a (commit)
   via  87a944984abeacbc984e3197f7bcfe54faf6aaad (commit)
  from  ed5cd9993461fabf38e9986dc52b304cd5f2830b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d16d98e86a084508666fd9768b779ae0ce96763a
commit d16d98e86a084508666fd9768b779ae0ce96763a
Merge: ed5cd99 87a9449
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 5 18:24:15 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 5 18:24:15 2016 -0400

Merge topic 'cpack-deb-package-description-fallback' into next

87a94498 fixup! cpack-deb-package-description-fallback


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87a944984abeacbc984e3197f7bcfe54faf6aaad
commit 87a944984abeacbc984e3197f7bcfe54faf6aaad
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 6 00:23:41 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue Sep 6 00:23:41 2016 +0200

fixup! cpack-deb-package-description-fallback

Default description file path is set by CPack.cmake
script so handle the case when that script is
not used.

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index cbba186..25c25ae 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -167,7 +167,8 @@
 #   based installers only) if set,
 #- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default 
location,
 #- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default location content
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set,
+#- or "no package description available"
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
 #   CPACK_DEBIAN__PACKAGE_SECTION
@@ -826,8 +827,10 @@ function(cpack_deb_prepare_package_vars)
   file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" 
CPACK_DEBIAN_PACKAGE_DESCRIPTION)
 elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
   set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
-else() # use default package description file content
+elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description 
file content
   file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" 
CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+else()
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available")
 endif()
   endif()
 

---

Summary of changes:
 Modules/CPackDeb.cmake |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.1-1792-ged5cd99

2016-09-05 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  ed5cd9993461fabf38e9986dc52b304cd5f2830b (commit)
   via  d3c1b906906bd6abab1d42fc1166e117b7ce8567 (commit)
  from  8752d765ae63edd5153a0547727989a4efe4d809 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed5cd9993461fabf38e9986dc52b304cd5f2830b
commit ed5cd9993461fabf38e9986dc52b304cd5f2830b
Merge: 8752d76 d3c1b90
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 5 17:59:22 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 5 17:59:22 2016 -0400

Merge topic 'cpack-deb-package-description-fallback' into next

d3c1b906 cpack-deb-package-description-fallback


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3c1b906906bd6abab1d42fc1166e117b7ce8567
commit d3c1b906906bd6abab1d42fc1166e117b7ce8567
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Sep 5 23:58:33 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Mon Sep 5 23:58:33 2016 +0200

cpack-deb-package-description-fallback

Breaking change of fallback variable precedence
for CPACK_DEBIAN_PACKAGE_DESCRIPTION that matches
CPackRPM behavior as much as possible.
See Issue #16272

diff --git a/Help/release/dev/cpack-deb-package-description-fallback 
b/Help/release/dev/cpack-deb-package-description-fallback
new file mode 100644
index 000..6300dfc
--- /dev/null
+++ b/Help/release/dev/cpack-deb-package-description-fallback
@@ -0,0 +1,11 @@
+cpack-deb-package-description-fallback
+--
+
+* The :module:`CPackDeb` module learned new package description
+  override rules to match :module:`CPackRPM` module behavior.
+  **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE`
+  variable is set to non default location then it is prefered to
+  :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable.
+  Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION`
+  was introduced for component based packaging.
+  See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`.
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index c9678d6..cbba186 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -156,16 +156,18 @@
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
-#   CPACK_COMPONENT__DESCRIPTION
+#   CPACK_DEBIAN__PACKAGE_DESCRIPTION
 #
 #  The Debian package description
 #
 #  * Mandatory : YES
 #  * Default   :
 #
-#- :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
-#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
-#
+#- :variable:`CPACK_COMPONENT__DESCRIPTION` (component
+#   based installers only) if set,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default 
location,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set,
+#- :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default location content
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
 #   CPACK_DEBIAN__PACKAGE_SECTION
@@ -811,24 +813,21 @@ function(cpack_deb_prepare_package_vars)
   endif()
 
   # Description: (mandatory)
-  if(NOT CPACK_DEB_PACKAGE_COMPONENT)
-if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 
CPACK_DEBIAN_PACKAGE_DESCRIPTION")
-  endif()
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+  if(CPACK_DEB_PACKAGE_COMPONENT)
+if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION)
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}")
+elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
+  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}")
 endif()
-  else()
-set(component_description_var 
CPACK_COMPONENT_${_local_component_name}_DESCRIPTION)
-
-# component description overrides package description
-if(${component_description_var})
-  set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}})
-elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
-  if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a 
package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or 
CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_descript

[Cmake-commits] CMake branch, next, updated. v3.6.1-1764-g083f180

2016-09-04 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  083f1806004094f87741ba58655d7536dc05aa1d (commit)
   via  0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23 (commit)
  from  ed02aa4047c6e5aff30d1cb20ab29678399379c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=083f1806004094f87741ba58655d7536dc05aa1d
commit 083f1806004094f87741ba58655d7536dc05aa1d
Merge: ed02aa4 0d7c971
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Sep 4 17:10:07 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Sep 4 17:10:07 2016 -0400

Merge topic 'cpack-deb-long-filenames' into next

0d7c9712 fixup! cpack-deb-long-filenames


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23
commit 0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Sep 4 23:09:53 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Sep 4 23:09:53 2016 +0200

fixup! cpack-deb-long-filenames

diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake 
b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
index 169be1c..0452343 100644
--- a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
@@ -6,6 +6,9 @@ file(MAKE_DIRECTORY 
"${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info")
 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "")
 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "")
 
+# some programs used by fakeroot require sbin in path so we should not
+# leave this to chance (programs: ldconfig and start-stop-daemon)
+set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin")
 
 execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE}
   -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir

---

Summary of changes:
 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake |3 +++
 1 file changed, 3 insertions(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.1-1762-ged02aa4

2016-09-04 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  ed02aa4047c6e5aff30d1cb20ab29678399379c4 (commit)
   via  e42a39918f784d671ce7f51d9269cc754e263e44 (commit)
  from  b8ececb4b62f0fe2bb3fa7000bf00df327d76de5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed02aa4047c6e5aff30d1cb20ab29678399379c4
commit ed02aa4047c6e5aff30d1cb20ab29678399379c4
Merge: b8ececb e42a399
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Sep 4 15:15:09 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Sep 4 15:15:09 2016 -0400

Merge topic 'cpack-deb-long-filenames' into next

e42a3991 cpack-deb-long-filenames


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e42a39918f784d671ce7f51d9269cc754e263e44
commit e42a39918f784d671ce7f51d9269cc754e263e44
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Sep 4 21:13:24 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Sep 4 21:13:24 2016 +0200

cpack-deb-long-filenames

Support for long filenames in deb
packages. See Issue #14332

diff --git a/Help/release/dev/cpack-deb-long-filenames.rst 
b/Help/release/dev/cpack-deb-long-filenames.rst
new file mode 100644
index 000..6113eaf
--- /dev/null
+++ b/Help/release/dev/cpack-deb-long-filenames.rst
@@ -0,0 +1,6 @@
+cpack-deb-long-filenames
+
+
+* The :module:`CPackDeb` module learned to support long file names
+  when archive format is set to GNU tar.
+  See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE`
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index c9678d6..1a7b923 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -177,6 +177,24 @@
 #
 #  See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
 #
+# .. variable:: CPACK_DEBIAN_ARCHIVE_TYPE
+#
+#  The archive format used for creating the Debian package.
+#
+#  * Mandatory : YES
+#  * Default   : "paxr"
+#
+#  Possible values are:
+#
+#  - paxr
+#  - gnutar
+#
+#  .. note::
+#
+#Default pax archive format is the most portable format and generates
+#packages that do not treat sparse files specially.
+#GNU tar format on the other hand supports longer filenames.
+#
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
@@ -842,12 +860,24 @@ function(cpack_deb_prepare_package_vars)
 set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
   endif()
 
+  if(CPACK_DEBIAN_ARCHIVE_TYPE)
+set(archive_types_ "paxr;gnutar")
+cmake_policy(PUSH)
+  cmake_policy(SET CMP0057 NEW)
+  if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_)
+message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported"
+  "type ${CPACK_DEBIAN_ARCHIVE_TYPE}")
+  endif()
+cmake_policy(POP)
+  else()
+set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr")
+  endif()
+
   # Compression: (recommended)
   if(NOT CPACK_DEBIAN_COMPRESSION_TYPE)
 set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip")
   endif()
 
-
   # Recommends:
   # You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS
 
@@ -1000,6 +1030,7 @@ function(cpack_deb_prepare_package_vars)
   set(GEN_CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_DEBIAN_PACKAGE_MAINTAINER}" 
PARENT_SCOPE)
   set(GEN_CPACK_DEBIAN_PACKAGE_DESCRIPTION 
"${CPACK_DEBIAN_PACKAGE_DESCRIPTION}" PARENT_SCOPE)
   set(GEN_CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}" 
PARENT_SCOPE)
+  set(GEN_CPACK_DEBIAN_ARCHIVE_TYPE "${CPACK_DEBIAN_ARCHIVE_TYPE}" 
PARENT_SCOPE)
   set(GEN_CPACK_DEBIAN_COMPRESSION_TYPE "${CPACK_DEBIAN_COMPRESSION_TYPE}" 
PARENT_SCOPE)
   set(GEN_CPACK_DEBIAN_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_RECOMMENDS}" 
PARENT_SCOPE)
   set(GEN_CPACK_DEBIAN_PACKAGE_SUGGESTS "${CPACK_DEBIAN_PACKAGE_SUGGESTS}" 
PARENT_SCOPE)
diff --git a/Source/CPack/cmCPackDebGenerator.cxx 
b/Source/CPack/cmCPackDebGenerator.cxx
index 1f3ac51..b960c0a 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -419,6 +419,12 @@ int cmCPackDebGenerator::createDeb()
 << debian_compression_type << std::endl);
   }
 
+  const char* debian_archive_type =
+this->GetOption("GEN_CPACK_DEBIAN_ARCHIVE_TYPE");
+  if (!debian_archive_type) {
+debian_archive_type = "paxr";
+  }
+
   std::string filename_data_tar =
 strGenWDIR + "/data.tar

[Cmake-commits] CMake branch, next, updated. v3.6.1-1471-g81bb94a

2016-08-25 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  81bb94aff906c89cd7bc0cf070df1c34c0a4086b (commit)
   via  11ad59ca59a7d1372588f14f681211a2ab3ea71f (commit)
  from  33ab8bdd0aad3e44e8d85a730daca64c26ad71b1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81bb94aff906c89cd7bc0cf070df1c34c0a4086b
commit 81bb94aff906c89cd7bc0cf070df1c34c0a4086b
Merge: 33ab8bd 11ad59c
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Aug 25 16:21:14 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Aug 25 16:21:14 2016 -0400

Merge topic 'cpack-rpm-debuginfo-pkg' into next

11ad59ca fixup! cpack-rpm-debuginfo


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11ad59ca59a7d1372588f14f681211a2ab3ea71f
commit 11ad59ca59a7d1372588f14f681211a2ab3ea71f
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Aug 25 22:20:51 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Aug 25 22:20:51 2016 +0200

fixup! cpack-rpm-debuginfo

diff --git a/Help/release/dev/cpack-rpm-debuginfo-pkg.rst 
b/Help/release/dev/cpack-rpm-debuginfo-pkg.rst
index f02a162..8b37fe4 100644
--- a/Help/release/dev/cpack-rpm-debuginfo-pkg.rst
+++ b/Help/release/dev/cpack-rpm-debuginfo-pkg.rst
@@ -1,5 +1,5 @@
 cpack-rpm-debuginfo-pkg
---
+---
 
 * The :module:`CPackRPM` module learned to generate debuginfo
   packages on demand. See :variable:`CPACK_RPM_DEBUGINFO_PACKAGE`

---

Summary of changes:
 Help/release/dev/cpack-rpm-debuginfo-pkg.rst |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.1-1453-g5a38fe2

2016-08-25 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  5a38fe2135c8f421e79027ff0f5d6525c6c4449f (commit)
   via  a6d9d783b45dcec84dd16b2fb0f0bef53c0b2487 (commit)
   via  bc8c0add7f799ad5775e4f229256832e17156b68 (commit)
  from  f80a4113e66cc5e83367af25c96faeaaa95d7a46 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a38fe2135c8f421e79027ff0f5d6525c6c4449f
commit 5a38fe2135c8f421e79027ff0f5d6525c6c4449f
Merge: f80a411 a6d9d78
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Aug 25 13:17:28 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Aug 25 13:17:28 2016 -0400

Merge topic 'cpack-rpm-debuginfo-pkg' into next

a6d9d783 cpack-rpm-debuginfo
bc8c0add CPack RPM debuginfo packages generation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6d9d783b45dcec84dd16b2fb0f0bef53c0b2487
commit a6d9d783b45dcec84dd16b2fb0f0bef53c0b2487
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Thu Aug 25 18:35:42 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Thu Aug 25 18:36:09 2016 +0200

cpack-rpm-debuginfo

test and release notes

diff --git a/Help/release/dev/cpack-rpm-debuginfo-pkg.rst 
b/Help/release/dev/cpack-rpm-debuginfo-pkg.rst
new file mode 100644
index 000..f02a162
--- /dev/null
+++ b/Help/release/dev/cpack-rpm-debuginfo-pkg.rst
@@ -0,0 +1,6 @@
+cpack-rpm-debuginfo-pkg
+--
+
+* The :module:`CPackRPM` module learned to generate debuginfo
+  packages on demand. See :variable:`CPACK_RPM_DEBUGINFO_PACKAGE`
+  and its per component version.
diff --git a/Tests/RunCMake/CPack/DEBUGINFO.cmake 
b/Tests/RunCMake/CPack/DEBUGINFO.cmake
new file mode 100644
index 000..2a65b7f
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEBUGINFO.cmake
@@ -0,0 +1,26 @@
+set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
+
+set(CPACK_RPM_COMPONENT_INSTALL "ON")
+
+set(CMAKE_BUILD_TYPE Debug)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp"
+"int test_lib();\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp"
+"#include \"test_lib.hpp\"\nint test_lib() {return 0;}\n")
+add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
+"#include \"test_lib.hpp\"\nint main() {return test_lib();}\n")
+add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
+target_link_libraries(test_prog test_lib)
+
+install(TARGETS test_prog DESTINATION foo COMPONENT applications)
+install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers)
+install(TARGETS test_lib DESTINATION bas COMPONENT libs)
+
+set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT")
+set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON)
+set(CPACK_RPM_LIBS_DEBUGINFO_PACKAGE ON)
+
+set(CPACK_PACKAGE_NAME "debuginfo")
diff --git a/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake 
b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake
new file mode 100644
index 000..265ca92
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake
@@ -0,0 +1,14 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "5")
+set(EXPECTED_FILE_1 "debuginfo-applications-0*.rpm")
+set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/test_prog$")
+set(EXPECTED_FILE_2 "debuginfo*-headers.rpm")
+set(EXPECTED_FILE_CONTENT_2 "^/usr/bar${whitespaces_}/usr/bar/CMakeLists.txt$")
+set(EXPECTED_FILE_3 "debuginfo*-libs.rpm")
+set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$")
+
+set(EXPECTED_FILE_4 "debuginfo-applications-debuginfo*.rpm")
+set(EXPECTED_FILE_CONTENT_4 ".*")
+set(EXPECTED_FILE_5 "debuginfo-libs-debuginfo*.rpm")
+set(EXPECTED_FILE_CONTENT_5 ".*")
diff --git a/Tests/RunCMake/CPack/RPM/DEBUGINFO-stderr.txt 
b/Tests/RunCMake/CPack/RPM/DEBUGINFO-stderr.txt
new file mode 100644
index 000..557ef3d
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/DEBUGINFO-stderr.txt
@@ -0,0 +1,3 @@
+^CPackRPM: Will use GENERATED spec file: 
.*/Tests/RunCMake/RPM/CPack/DEBUGINFO-build/_CPack_Packages/.*/RPM/SPECS/debuginfo-applications.spec
+CPackRPM: Will use GENERATED spec file: 
.*/Tests/RunCMake/RPM/CPack/DEBUGINFO-build/_CPack_Packages/.*/RPM/SPECS/debuginfo-headers.spec
+CPackRPM: Will use GENERATED spec file: 
.*/Tests/RunCMake/RPM/CPack/DEBUGINFO-buil

Re: [cmake-developers] Some CPackRPM Debug print is printing without DEBUG On

2016-07-11 Thread Domen Vrankar
> Doh. Less haste more speed. Thanks. Patch 2.

Pushed to next:
https://cmake.org/gitweb?p=cmake.git;a=commit;h=49df5d480045ea77295825f2968ec57c4146b5d8

Thanks,
Domen
-- 

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-commits] CMake branch, next, updated. v3.6.0-782-gad63450

2016-07-11 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  ad634507d0155978a0744b5d3b896e696aecc5e1 (commit)
   via  49df5d480045ea77295825f2968ec57c4146b5d8 (commit)
  from  4ba010d93f20335ca5e643c0f1ec196a5a6efc6b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad634507d0155978a0744b5d3b896e696aecc5e1
commit ad634507d0155978a0744b5d3b896e696aecc5e1
Merge: 4ba010d 49df5d4
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Mon Jul 11 14:55:21 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Jul 11 14:55:21 2016 -0400

Merge topic 'cpack-rpm-debug-logging-fix' into next

49df5d48 Debug logging should only print if requested for


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49df5d480045ea77295825f2968ec57c4146b5d8
commit 49df5d480045ea77295825f2968ec57c4146b5d8
Author: Harry Mallon <ha...@codexdigital.com>
AuthorDate: Mon Jul 11 20:53:31 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Mon Jul 11 20:53:31 2016 +0200

Debug logging should only print if requested for

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 7706bbc..7a1cbef 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -859,7 +859,9 @@ function(cpack_rpm_prepare_content_list)
   if(NOT DEFINED CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST)
 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST /etc /etc/init.d /usr /usr/share 
/usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include)
 if(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION)
-  message("CPackRPM:Debug: Adding 
${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION} to builtin omit list.")
+  if(CPACK_RPM_PACKAGE_DEBUG)
+message("CPackRPM:Debug: Adding 
${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION} to builtin omit list.")
+  endif()
   list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST 
"${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION}")
 endif()
   endif()

---

Summary of changes:
 Modules/CPackRPM.cmake |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [cmake-developers] Some CPackRPM Debug print is printing without DEBUG On

2016-07-11 Thread Domen Vrankar
2016-07-11 13:50 GMT+02:00 Harry Mallon :
> I get this line printed a lot even without CPACK_RPM_PACKAGE_DEBUG turned on.
>
> "CPackRPM:Debug: Adding 
> /usr/lib/systemd;/usr/lib/systemd/system;/usr/lib/systemd/system-preset;/usr/lib/udev;/usr/lib/udev/rules.d;/usr/etc;/etc/security;/etc/security/limits.d
>  to builtin omit list."
>
> Patch attached

Provided patchi disables both debug message as well as
CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST functionality. That if statement
should not be changed and instead a new if statement wrapping only
message should be added.

Regards,
Domen
-- 

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] CPack source package install location

2016-07-04 Thread Domen Vrankar
Hi,

> I have a very standard CPack configuration for deb package. I have two
> questions:
>
> 1. I generate the deb with: cpack --config CPackConfig.cmake -G "DEB"
>
> This is supposedly a binary package but when I install it on the machine I
> see header files being installed in /usr/include.
>
> Is this normal?

I'm guessing that CPackConfig.cmake is generated by cmake and not hand written.

CMake generates CPackConfig.cmake that can be used to create a package
with content listed with 'install()' commands (see:
https://cmake.org/cmake/help/v3.5/command/install.html). If those
commands contain header files then those files will be part of the
package. You could also split packages between bin and dev packages by
using COMPONENT attribute in install commands and then generating
component packages - one per component.

> 2. Header files are installed into /usr/include but there is one problem:
> other projects using the library are including header files with #include
>  as a standard practice.
>
> So I actually want them installed in /usr/include/libname instead. After
> scouring the CPack variables in documentation I didn't really find anything
> suitable to do this. Is it possible to achieve?

This would have to be changed in CMakeLists.txt (install commands) or
is possibly already written with prefix variable in mind in which case
you have to look into CMakeLists.txt install commands and set the
variable that is used there for this purpose.

Regards,
Domen
-- 

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


[Cmake-commits] CMake branch, next, updated. v3.6.0-rc2-418-gb661d4a

2016-06-19 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  b661d4a77011f4407b4770a7ee166b557b61893e (commit)
   via  4a104822359a60795f237f848ec00c736638eac9 (commit)
   via  5c6ffd2d6dcc1954966638ee0044f4481fb47cb6 (commit)
   via  d6378091361623a9018925b9cfb2708f6a0183f4 (commit)
  from  828c035c635523af3348082650c2a47d53619239 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b661d4a77011f4407b4770a7ee166b557b61893e
commit b661d4a77011f4407b4770a7ee166b557b61893e
Merge: 828c035 4a10482
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Sun Jun 19 16:36:55 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Sun Jun 19 16:36:55 2016 -0400

Merge topic 'cpack-deb-test-fixes' into next

4a104822 CPack/Deb test regex variable name was invalid and did not test 
preinst script
5c6ffd2d CPack/Deb fix tests for SELinux-enabled systems
d6378091 CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a104822359a60795f237f848ec00c736638eac9
commit 4a104822359a60795f237f848ec00c736638eac9
Author: Patrick mail6543210 <mail6543...@yahoo.com.tw>
AuthorDate: Sun Jun 19 22:28:19 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Jun 19 22:36:05 2016 +0200

CPack/Deb test regex variable name was invalid and did not test preinst 
script

diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake 
b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
index 5b6ae73..85e137f 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
@@ -6,13 +6,13 @@ set(foo_prerm_permissions_regex "-rwxr-xr-x\.? .*")
 verifyDebControl("${FOUND_FILE_1}" "foo" "preinst;prerm")
 
 set(bar_preinst "^echo bar_preinst$")
-set(bar_prerm_permissions_regex "-rwx--\.? .*")
+set(bar_preinst_permissions_regex "-rwx--\.? .*")
 set(bar_prerm "^echo bar_prerm$")
 set(bar_prerm_permissions_regex "-rwx--\.? .*")
 verifyDebControl("${FOUND_FILE_2}" "bar" "preinst;prerm")
 
 set(bas_preinst "^echo default_preinst$")
-set(bas_prerm_permissions_regex "-rwxr-xr-x\.? .*")
+set(bas_preinst_permissions_regex "-rwxr-xr-x\.? .*")
 set(bas_prerm "^echo default_prerm$")
 set(bas_prerm_permissions_regex "-rwxr-xr-x\.? .*")
 verifyDebControl("${FOUND_FILE_3}" "bas" "preinst;prerm")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c6ffd2d6dcc1954966638ee0044f4481fb47cb6
commit 5c6ffd2d6dcc1954966638ee0044f4481fb47cb6
Author: Patrick mail6543210 <mail6543...@yahoo.com.tw>
AuthorDate: Sun Jun 19 22:19:56 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Sun Jun 19 22:35:42 2016 +0200

CPack/Deb fix tests for SELinux-enabled systems

diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake 
b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
index 5f929ff..5b6ae73 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
@@ -1,17 +1,18 @@
 set(foo_preinst "^echo default_preinst$")
-set(foo_preinst_permissions_regex "-rwxr-xr-x .*")
+# NOTE: optional dot at the end of permissions regex is for SELinux enabled 
systems
+set(foo_preinst_permissions_regex "-rwxr-xr-x\.? .*")
 set(foo_prerm "^echo default_prerm$")
-set(foo_prerm_permissions_regex "-rwxr-xr-x .*")
+set(foo_prerm_permissions_regex "-rwxr-xr-x\.? .*")
 verifyDebControl("${FOUND_FILE_1}" "foo" "preinst;prerm")
 
 set(bar_preinst "^echo bar_preinst$")
-set(bar_prerm_permissions_regex "-rwx-- .*")
+set(bar_prerm_permissions_regex "-rwx--\.? .*")
 set(bar_prerm "^echo bar_prerm$")
-set(bar_prerm_permissions_regex "-rwx-- .*")
+set(bar_prerm_permissions_regex "-rwx--\.? .*")
 verifyDebControl("${FOUND_FILE_2}" "bar" "preinst;prerm")
 
 set(bas_preinst "^echo default_preinst$")
-set(bas_prerm_permissions_regex "-rwxr-xr-x .*")
+set(bas_prerm_permissions_regex "-rwxr-xr-x\.? .*")
 set(bas_prerm "^echo default_prerm$")
-set(bas_prerm_permissions_regex "-rwxr-xr-x .*")
+set(bas_prerm_permissions_regex "-rwxr-xr-x\

Re: [CMake] CCMake is not getting updated

2016-06-09 Thread Domen Vrankar
> And now? Do I have to uninstall cmake 3.5 and install it again?

Rebuild (in such cases I usually remove previous build dir as in the
past sometimes it did not detect if a new library was added to the
environment) and install (install is a dumb command that only copies
files so you don't need to uninstall first as it will just overwrite
the old ones).

Regards,
Domen
-- 

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


Re: [CMake] CCMake is not getting updated

2016-06-09 Thread Domen Vrankar
> Now I have the right version of cmake (3.5.2), but the ccmake version is
> still 2.8.12... How can I update ccmake too?

Not 100% certain but my guess would be that you are missing
ncurses-devel package and therefore ccmake was not built.

sudo yum install ncurses-devel

Regards,
Domen
-- 

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


Re: [CMake] CPack and executable permissions on linux

2016-06-08 Thread Domen Vrankar
> This could probably be supported by adding USE_SOURCE_PERMISSIONS for
> install(FILES ...) would you be willing to contribute a patch?

Misses that this is not cmake-dev mailing list... Patch would still be
appreciated but you could also file a feature request (for extending
the documentation regarding default permissions and adding
USE_SOURCE_PERMISSIONS) here:
https://cmake.org/Bug/view_all_bug_page.php
Currently registration is disabled so if you don't have an account I
could do it for you.

Regards,
Domen
-- 

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


[CMake] Fwd: CPack and executable permissions on linux

2016-06-08 Thread Domen Vrankar
> Before running this cmake script, I am setting executable permissions on the
> build machine, where the package is created.

With install(FILES ...) command permissions set to source file will be
ignored by default (this is missing from documentation).
You could set permissions with PERMISSIONS attribute.

See: https://cmake.org/cmake/help/v3.5/command/install.html#installing-files

> Then, I create a docker image, where this RPM is downloaded and installed.
> But when I want to start the executable within a docker container, then I am
> getting the message "permission denied".
> When I look at the permissions of my installed package, then I see, I only
> have read permissions.

Since CPack relies on install commands to set permissions this is
expected behaviour.

> So the question is: What can I do for getting executable permissions for
> this executable? Is this a CMake/CPack problem?

For now either set PERMISSIONS or move executable into separate
directory and use install(DIRECTORY ... USE_SOURCE_PERMISSIONS)

This could probably be supported by adding USE_SOURCE_PERMISSIONS for
install(FILES ...) would you be willing to contribute a patch?

Regards,
Domen
-- 

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


Re: [CMake] cpack ppc64le rhel7.2 CPACK_RPM_PACKAGE_ARCHITECTURE

2016-06-08 Thread Domen Vrankar
> The strange thing is that CMAKE_HOST_SYSTEM_PROCESSOR (outputed by cmake
> --system-information) uses the same "uname -m"
> see Modules/CMakeDetermineSystem.cmake.
>
> So there is something odd to have one right and the other wrong...

In that case it's quite possible that CPACK_RPM_PACKAGE_ARCHITECTURE
is already set to x86_64 somewhere in cmake list which overrides the
default.

Regards,
Domen
-- 

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


Re: [CMake] cpack ppc64le rhel7.2 CPACK_RPM_PACKAGE_ARCHITECTURE

2016-06-08 Thread Domen Vrankar
> I am working on an IBM Power8 RHEL7.2 system and we installed cmake 3.6
> (default cmake from repo was 2.8.12?) but it seems when making a package
> the arch is set incorrectly to x86_64 instead of ppc64le.

I don't have access to a ppc with Linux but it seems that 'uname -m'
(default that is used for setting CPACK_RPM_PACKAGE_ARCHITECTURE)
outputs invalid value on ppc AIX.

What's the output output of 'uname -m' on your system?

As a workaround you could manually set CPACK_RPM_PACKAGE_ARCHITECTURE
in your CMake list.

Regards,
Domen
-- 

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


Re: [cmake-developers] Productbuild CPack generator

2016-06-03 Thread Domen Vrankar
> Does anyone here know if we have test coverage already for some cpack
> generators where we create a package, then unpack it to verify the results?
>

Tests/CPackComponentsDEB (Deb), Tests/CPackComponentsForAll (RPM) and tests
in Tests/RunCMake/CPack (at the moment Deb, RPM, TGZ) all verify content of
generated packages.

I intended for Tests/RunCMake/CPack to be the location of all tests for
CPack generated packages that can be verified with command line tools in a
way that you specify the type of test and if other generators have the same
capabilities they should use the same test with additional generator
specific variables in a separate file.
Unfortunately atm there are still some issues with those tests with the
most annoying being the verbosity because of:
- test should automatically cover different packaging styles [monolithic,
components, ...],
- for most tests files count and content should be the same with each
generator's Helpers.cmake providing the format (at the moment each test has
to provide special ExpectedFiles cmake script so it's too complicated to
write tests)

It's on my TODO list to extend Tests/RunCMake/CPack so hopefully I'll get
to it in the following week or two.
If you'd like to add your tests to it there is a README.txt file there that
explains how it works and how to add your own tests to it.

Regards,
Domen
-- 

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-commits] CMake branch, next, updated. v3.5.2-1627-g2fdaa20

2016-05-31 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  2fdaa209e13e01fff7186d55c1f11901262534b4 (commit)
   via  285d4d0a88b83e8ea46d315ed6d60c954e26e661 (commit)
  from  e4bfebdd3f8433b47c265020ab042ebe639765fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2fdaa209e13e01fff7186d55c1f11901262534b4
commit 2fdaa209e13e01fff7186d55c1f11901262534b4
Merge: e4bfebd 285d4d0
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 17:26:23 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue May 31 17:26:23 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

285d4d0a fixup! CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=285d4d0a88b83e8ea46d315ed6d60c954e26e661
commit 285d4d0a88b83e8ea46d315ed6d60c954e26e661
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 23:25:59 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue May 31 23:25:59 2016 +0200

fixup! CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 300d710..c9678d6 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -31,6 +31,16 @@
 #
 # List of CPackRPM specific variables:
 #
+# .. variable:: CPACK_DEB_PACKAGE_COMPONENT
+#
+#  Enable component packaging for CPackRPM
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+#  If enabled (ON) multiple packages are generated. By default a single package
+#  containing files of all components is generated.
+#
 # .. variable:: CPACK_DEBIAN_PACKAGE_NAME
 #   CPACK_DEBIAN__PACKAGE_NAME
 #
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 8c51b45..d231ff0 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -42,6 +42,16 @@
 #
 # List of CPackRPM specific variables:
 #
+# .. variable:: CPACK_RPM_PACKAGE_COMPONENT
+#
+#  Enable component packaging for CPackRPM
+#
+#  * Mandatory : NO
+#  * Default   : OFF
+#
+#  If enabled (ON) multiple packages are generated. By default a single package
+#  containing files of all components is generated.
+#
 # .. variable:: CPACK_RPM_PACKAGE_SUMMARY
 #   CPACK_RPM__PACKAGE_SUMMARY
 #
@@ -410,6 +420,7 @@
 #   cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
 #
 # .. variable:: CPACK_RPM_USER_BINARY_SPECFILE
+#   CPACK_RPM__USER_BINARY_SPECFILE
 #
 #  A user provided spec file.
 #
@@ -419,8 +430,6 @@
 #  May be set by the user in order to specify a USER binary spec file
 #  to be used by CPackRPM instead of generating the file.
 #  The specified file will be processed by configure_file( @ONLY).
-#  One can provide a component specific file by setting
-#  :variable:`CPACK_RPM__USER_BINARY_SPECFILE`.
 #
 # .. variable:: CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
 #
@@ -449,7 +458,7 @@
 #  May be used to embed a pre (un)installation script in the spec file.
 #  The referred script file (or both) will be read and directly
 #  put after the ``%pre`` or ``%preun`` section
-#  If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the (un)install
+#  If :variable:`CPACK_RPM_PACKAGE_COMPONENT` is set to ON the (un)install
 #  script for each component can be overridden with
 #  ``CPACK_RPM__PRE_INSTALL_SCRIPT_FILE`` and
 #  ``CPACK_RPM__PRE_UNINSTALL_SCRIPT_FILE``.
@@ -468,7 +477,7 @@
 #  May be used to embed a post (un)installation script in the spec file.
 #  The referred script file (or both) will be read and directly
 #  put after the ``%post`` or ``%postun`` section.
-#  If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the (un)install
+#  If :variable:`CPACK_RPM_PACKAGE_COMPONENT` is set to ON the (un)install
 #  script for each component can be overridden with
 #  ``CPACK_RPM__POST_INSTALL_SCRIPT_FILE`` and
 #  ``CPACK_RPM__POST_UNINSTALL_SCRIPT_FILE``.

---

Summary of changes:
 Modules/CPackDeb.cmake |   10 ++
 Modules/CPackRPM.cmake |   17 +
 2 files changed, 23 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.5.2-1625-ge4bfebd

2016-05-31 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  e4bfebdd3f8433b47c265020ab042ebe639765fd (commit)
   via  7f7326ebd77d9471d0f4c496f7214c118bc8260d (commit)
  from  d85aa5879305fb82da613028dbda41ac66f08c93 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4bfebdd3f8433b47c265020ab042ebe639765fd
commit e4bfebdd3f8433b47c265020ab042ebe639765fd
Merge: d85aa58 7f7326e
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 17:08:01 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue May 31 17:08:01 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

7f7326eb CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f7326ebd77d9471d0f4c496f7214c118bc8260d
commit 7f7326ebd77d9471d0f4c496f7214c118bc8260d
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 22:06:39 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue May 31 23:06:38 2016 +0200

CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index ebeb387..300d710 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -2,29 +2,34 @@
 # CPackDeb
 # 
 #
-# The builtin (binary) CPack Deb generator (Unix only)
+# The built in (binary) CPack Deb generator (Unix only)
 #
 # Variables specific to CPack Debian (DEB) generator
 # ^^
 #
-# CPackDeb may be used to create Deb package using CPack.
-# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
-# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
-# CPackDeb generator should work on any linux host but it will produce
-# better deb package when Debian specific tools 'dpkg-xxx' are usable on
+# CPackDeb may be used to create Deb package using :module:`CPack`.
+# CPackDeb is a :module:`CPack` generator thus it uses the ``CPACK_XXX``
+# variables used by :module:`CPack`.
+#
+# CPackDeb generator should work on any Linux host but it will produce
+# better deb package when Debian specific tools ``dpkg-xxx`` are usable on
 # the build system.
 #
 # CPackDeb has specific features which are controlled by the specifics
 # :code:`CPACK_DEBIAN_XXX` variables.
 #
 # :code:`CPACK_DEBIAN__` variables may be used in order to have
-# **component** specific values.  Note however that  refers to 
the
-# **grouping name** written in upper case. It may be either a component name or
-# a component GROUP name.
+# **component** specific values.  Note however that  refers to
+# the **grouping name** written in upper case. It may be either a component 
name
+# or a component GROUP name.
+#
+# Here are some CPackDeb wiki resources that are here for historic reasons and
+# are no longer maintained but may still prove useful:
+#
+#  - https://cmake.org/Wiki/CMake:CPackConfiguration
+#  - https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
 #
-# You'll find a detailed usage on the wiki:
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29 .
-# However as a handy reminder here comes the list of specific variables:
+# List of CPackRPM specific variables:
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_NAME
 #   CPACK_DEBIAN__PACKAGE_NAME
@@ -55,7 +60,7 @@
 #
 #
_-_.deb
 #
-#  Alternatively provided package file name must end with ".deb" suffix.
+#  Alternatively provided package file name must end with ``.deb`` suffix.
 #
 #  .. note::
 #
@@ -98,7 +103,6 @@
 #  * Default   : Output of :code:`dpkg --print-architecture` (or :code:`i386`
 #if :code:`dpkg` is not found)
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
 #   CPACK_DEBIAN__PACKAGE_DEPENDS
 #
@@ -141,7 +145,6 @@
 #  * Mandatory : YES
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
 #   CPACK_COMPONENT__DESCRIPTION
 #
@@ -160,19 +163,23 @@
 #  Set Section control field e.g. admin, devel, doc, ...
 #
 #  * Mandatory : YES
-#  * Default   : 'devel'
+#  * Default   : "devel"
 #
 #  See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
 #
-#
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
-#  Possible values are: lzma, xz, bzip2 and gzip.
 #
 #  * Mandatory : YES
-#  * Default   : 'gzip'
+#  * Default   : "gzip"
+#
+#  Possible values are:

[Cmake-commits] CMake branch, next, updated. v3.5.2-1623-gd85aa58

2016-05-31 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  d85aa5879305fb82da613028dbda41ac66f08c93 (commit)
   via  6d7243240c0a1ad807207c6bfd3d6392a658f7ef (commit)
  from  d975bf0ecbf8e10f745585f82397f07aa161fdf9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d85aa5879305fb82da613028dbda41ac66f08c93
commit d85aa5879305fb82da613028dbda41ac66f08c93
Merge: d975bf0 6d72432
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 17:06:17 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue May 31 17:06:17 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

6d724324 fixup! CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d7243240c0a1ad807207c6bfd3d6392a658f7ef
commit 6d7243240c0a1ad807207c6bfd3d6392a658f7ef
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 23:05:50 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue May 31 23:05:50 2016 +0200

fixup! CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 30b65c2..300d710 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -170,6 +170,10 @@
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
+#
+#  * Mandatory : YES
+#  * Default   : "gzip"
+#
 #  Possible values are:
 #
 #  - lzma
@@ -177,9 +181,6 @@
 #  - bzip2
 #  - gzip
 #
-#  * Mandatory : YES
-#  * Default   : "gzip"
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
 #   CPACK_DEBIAN__PACKAGE_PRIORITY
 #

---

Summary of changes:
 Modules/CPackDeb.cmake |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.5.2-1621-gd975bf0

2016-05-31 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  d975bf0ecbf8e10f745585f82397f07aa161fdf9 (commit)
   via  e9985b3c34609f1385123768f9bb44ce314d51b8 (commit)
  from  b13304569f05d26976ab92a973e000a3eda1a3f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d975bf0ecbf8e10f745585f82397f07aa161fdf9
commit d975bf0ecbf8e10f745585f82397f07aa161fdf9
Merge: b133045 e9985b3
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 16:30:32 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue May 31 16:30:32 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

e9985b3c fixup! CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9985b3c34609f1385123768f9bb44ce314d51b8
commit e9985b3c34609f1385123768f9bb44ce314d51b8
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 22:30:16 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue May 31 22:30:16 2016 +0200

fixup! CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 866e275..30b65c2 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -25,8 +25,9 @@
 #
 # Here are some CPackDeb wiki resources that are here for historic reasons and
 # are no longer maintained but may still prove useful:
-# https://cmake.org/Wiki/CMake:CPackConfiguration
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
+#
+#  - https://cmake.org/Wiki/CMake:CPackConfiguration
+#  - https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
 #
 # List of CPackRPM specific variables:
 #
@@ -380,7 +381,7 @@
 #  * Default   : OFF
 #
 #  Allows to generate shlibs control file automatically. Compatibility is 
defined by
-#  CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY variable value.
+#  :variable:`CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY` variable value.
 #
 #  .. note::
 #
@@ -390,6 +391,8 @@
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY
 #
+#  Compatibility policy for auto-generated shlibs control file.
+#
 #  * Mandatory : NO
 #  * Default   : "="
 #
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 4e68555..8c51b45 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -36,8 +36,9 @@
 #
 # Here are some CPackRPM wiki resources that are here for historic reasons and
 # are no longer maintained but may still prove useful:
-# https://cmake.org/Wiki/CMake:CPackConfiguration
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
+#
+#  - https://cmake.org/Wiki/CMake:CPackConfiguration
+#  - https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
 #
 # List of CPackRPM specific variables:
 #
@@ -375,6 +376,8 @@
 #
 # .. variable:: CPACK_RPM_SPEC_INSTALL_POST
 #
+#  Deprecated - use :variable:`CPACK_RPM_POST_INSTALL_SCRIPT_FILE` instead.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #  * Deprecated: YES
@@ -438,6 +441,8 @@
 # .. variable:: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
 #   CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
 #
+#  Path to file containing pre (un)install script.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #
@@ -455,6 +460,8 @@
 # .. variable:: CPACK_RPM_POST_INSTALL_SCRIPT_FILE
 #   CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
 #
+#  Path to file containing post (un)install script.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #
@@ -520,6 +527,8 @@
 #
 # .. variable:: CPACK_RPM_RELOCATION_PATHS
 #
+#  Packages relocation paths list.
+#
 #  * Mandatory : NO
 #  * Default   : -
 #
@@ -541,15 +550,19 @@
 #
 # .. variable:: CPACK_RPM__PACKAGE_PREFIX
 #
+#  Per component relocation path install prefix.
+#
 #  * Mandatory : NO
 #  * Default   : CPACK_PACKAGING_INSTALL_PREFIX
 #
-#  May be used to set per component CPACK_PACKAGING_INSTALL_PREFIX for
-#  relocatable RPM packages.
+#  May be used to set per component :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
+#  for relocatable RPM packages.
 #
 # .. variable:: CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION
 #   CPACK_RPM_NO__INSTALL_PREFIX_RELOCATION
 #
+#  Removal of default install prefix from relocation paths list.
+#
 #  * Mandatory : NO
 #  * Default   : CPACK_PACKAGING_INSTALL_PREFIX or 
CPACK_RPM__PACKAGE_PREFIX
 #are treated as one of relocation paths

---

Summary of changes:
 Modules/CPackDeb.cmake |9 ++---
 Modules/CPackRPM

[Cmake-commits] CMake branch, next, updated. v3.5.2-1619-gb133045

2016-05-31 Thread Domen Vrankar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  b13304569f05d26976ab92a973e000a3eda1a3f5 (commit)
   via  35998cba3771984b9923cb20a71a1abc1928bbcf (commit)
  from  db87c9ddc46e8da39e282d5f1670584368aafb7e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b13304569f05d26976ab92a973e000a3eda1a3f5
commit b13304569f05d26976ab92a973e000a3eda1a3f5
Merge: db87c9d 35998cb
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 16:07:23 2016 -0400
Commit: CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue May 31 16:07:23 2016 -0400

Merge topic 'cpack-documentation-improvements' into next

35998cba CPackRPM and CPackDeb documentation improvements


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35998cba3771984b9923cb20a71a1abc1928bbcf
commit 35998cba3771984b9923cb20a71a1abc1928bbcf
Author: Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue May 31 22:06:39 2016 +0200
Commit: Domen Vrankar <domen.vran...@gmail.com>
CommitDate: Tue May 31 22:06:39 2016 +0200

CPackRPM and CPackDeb documentation improvements

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index ebeb387..866e275 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -2,29 +2,33 @@
 # CPackDeb
 # 
 #
-# The builtin (binary) CPack Deb generator (Unix only)
+# The built in (binary) CPack Deb generator (Unix only)
 #
 # Variables specific to CPack Debian (DEB) generator
 # ^^
 #
-# CPackDeb may be used to create Deb package using CPack.
-# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
-# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
-# CPackDeb generator should work on any linux host but it will produce
-# better deb package when Debian specific tools 'dpkg-xxx' are usable on
+# CPackDeb may be used to create Deb package using :module:`CPack`.
+# CPackDeb is a :module:`CPack` generator thus it uses the ``CPACK_XXX``
+# variables used by :module:`CPack`.
+#
+# CPackDeb generator should work on any Linux host but it will produce
+# better deb package when Debian specific tools ``dpkg-xxx`` are usable on
 # the build system.
 #
 # CPackDeb has specific features which are controlled by the specifics
 # :code:`CPACK_DEBIAN_XXX` variables.
 #
 # :code:`CPACK_DEBIAN__` variables may be used in order to have
-# **component** specific values.  Note however that  refers to 
the
-# **grouping name** written in upper case. It may be either a component name or
-# a component GROUP name.
+# **component** specific values.  Note however that  refers to
+# the **grouping name** written in upper case. It may be either a component 
name
+# or a component GROUP name.
+#
+# Here are some CPackDeb wiki resources that are here for historic reasons and
+# are no longer maintained but may still prove useful:
+# https://cmake.org/Wiki/CMake:CPackConfiguration
+# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
 #
-# You'll find a detailed usage on the wiki:
-# https://cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29 .
-# However as a handy reminder here comes the list of specific variables:
+# List of CPackRPM specific variables:
 #
 # .. variable:: CPACK_DEBIAN_PACKAGE_NAME
 #   CPACK_DEBIAN__PACKAGE_NAME
@@ -55,7 +59,7 @@
 #
 #
_-_.deb
 #
-#  Alternatively provided package file name must end with ".deb" suffix.
+#  Alternatively provided package file name must end with ``.deb`` suffix.
 #
 #  .. note::
 #
@@ -98,7 +102,6 @@
 #  * Default   : Output of :code:`dpkg --print-architecture` (or :code:`i386`
 #if :code:`dpkg` is not found)
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
 #   CPACK_DEBIAN__PACKAGE_DEPENDS
 #
@@ -141,7 +144,6 @@
 #  * Mandatory : YES
 #  * Default   : :code:`CPACK_PACKAGE_CONTACT`
 #
-#
 # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
 #   CPACK_COMPONENT__DESCRIPTION
 #
@@ -160,19 +162,22 @@
 #  Set Section control field e.g. admin, devel, doc, ...
 #
 #  * Mandatory : YES
-#  * Default   : 'devel'
+#  * Default   : "devel"
 #
 #  See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
 #
-#
 # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
 #
 #  The compression used for creating the Debian package.
-#  Possible values are: lzma, xz, bzip2 and gzip.
+#  Possible values are:
 #
-#  * Mandatory : YES
-#  * Default   : 'gzip'
+#  - lzma
+#  - xz
+#  - bzip2
+#  - gzip
 #
+#  * Mand

  1   2   3   4   >