[Cmake-commits] CMake branch, master, updated. v3.15.3-1216-g8c56872

2019-09-26 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  8c568722d79f9de0c03550981cbcb9453733a8bb (commit)
  from  b4087a23538f87efebcc8e4ece248416c242167f (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=8c568722d79f9de0c03550981cbcb9453733a8bb
commit 8c568722d79f9de0c03550981cbcb9453733a8bb
Author: Kitware Robot 
AuthorDate: Fri Sep 27 00:02:11 2019 -0400
Commit: Kitware Robot 
CommitDate: Fri Sep 27 00:02:11 2019 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index d24c2c0..d9ca09b 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 15)
-set(CMake_VERSION_PATCH 20190925)
+set(CMake_VERSION_PATCH 20190927)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 

---

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


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


Re: [CMake] Single library with both shared and static binaries

2019-09-26 Thread J Decker
I ended up using external_project() because unless you also copy the source
files, each source file each only gets one set of flags... so if you have
different compile options (the config file I suppose) the sources will only
build with one or the other.

If you copy all of the sources to the CMAKE_BiNARY_DIR (which can be done
passing a list of sources to a macro, which can then extract the path part
and append it) then use copy_file_if_different()  (And I additionally touch
that file to make sure the copy definitely gets built when it dos get
copied)  then you can build two targets with different options for the
sources.

Otherwise, an internal external project works pretty well.
https://github.com/d3x0r/SACK/blob/master/binary/CMakeLists.txt#L61

I kinda moved away from building both dynamic static libaries,and the
static binaries are just external projects that reference the original
sources.


On Thu, Sep 26, 2019 at 1:06 PM Avraham Shukron 
wrote:

> There is no hard requirement for shipping both static and shared. With the
> back against the wall I could get away with SHARED only, since it is the
> most common way the library will be consumed. I wanted to also distribute a
> static version just for those who want a single, self-contained executable.
>
> I understand that static and shared libraries ARE in fact two different
> target, but for the most part they are configured the same way and have the
> same properties.
>
> The fact that the recommended practice is to NOT specify SHARED / STATIC
> in add_library and let the user decide which one to compile using
> BUILD_SHARED_LIBS, proves that a library target is expected to be
> independent on whether it is compiled as a shared object or static library.
>
> I agree that it would be great to have the ability to produce both shared
> and static binaries from a single library target, although we need to think
> of how users importing such target, will be able to specify if they want to
> link against the static or the shared binary.
>
>
> On Thu, Sep 26, 2019 at 5:38 PM Juan Sanchez 
> wrote:
>
>> Here is an example where two libraries are created from object files that
>> have only been compiled once:
>>
>> ADD_LIBRARY(symdiff_objects OBJECT ${CXX_SRCS} ${MC_SRCS})
>> set_property(TARGET symdiff_objects PROPERTY POSITION_INDEPENDENT_CODE ON)
>> ADD_LIBRARY(symdiff_dynamic STATIC $)
>> ADD_LIBRARY(symdiff SHARED $)
>>
>> The "symdiff_dynamic" library is a static archive that can then be linked
>> into another shared library or an executable. The "symdiff" library is a
>> standalone object.  The POSITION_INDEPENDENT_CODE property is required for
>> the linux platform, but not for macOS or Windows.  If the original poster
>> is comfortable with having a PIC static library, this is an approach they
>> can take.
>>
>> Regards,
>>
>> Juan
>>
>> On Wed, Sep 25, 2019 at 8:43 AM Kyle Edwards via CMake 
>> wrote:
>>
>>> On Tue, 2019-09-24 at 23:41 +0300, Avraham Shukron wrote:
>>> > Hi!
>>> >
>>> > I have a library which I want to distribute in both shared object and
>>> > static library forms.
>>> > Is there a modern way to do it without creating two completely
>>> > separate library targets?
>>> > Since I want to be a good CMake citizen I use `target_*` and
>>> > `set_target_properties` as much as possible, and creating two
>>> > different libraries will force me to duplicate that information about
>>> > each one of them.
>>> >
>>> > I also tries not specifying STATIC/SHARED, and then running cmake
>>> > twice - once with BUILD_SHARED_LIBS=ON and once OFF and then
>>> > installing to the same directory. I got my both .a and .so libraries
>>> > installed, but I couldn't get the Config file correctly for this
>>> > arrangement.
>>> >
>>> > So - what is the community-recommended pattern to do this?
>>>
>>> Unfortunately, the recommendation is to do exactly what you don't want
>>> to do: create a shared target and a static target.
>>>
>>> To make this slightly simpler, you can use functions to de-duplicate
>>> the target_* and set_target_properties calls:
>>>
>>> function(create_foo_target name type)
>>>   add_library(${name} ${type} foo.c foo.h)
>>>   set_target_properties(${name} OUTPUT_NAME foo)
>>> endfunction()
>>>
>>> create_foo_target(foo_shared SHARED)
>>> create_foo_target(foo_static STATIC)
>>>
>>> Kyle
>>> --
>>>
>>> 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:
>>> 

Re: [CMake] Single library with both shared and static binaries

2019-09-26 Thread Avraham Shukron
There is no hard requirement for shipping both static and shared. With the
back against the wall I could get away with SHARED only, since it is the
most common way the library will be consumed. I wanted to also distribute a
static version just for those who want a single, self-contained executable.

I understand that static and shared libraries ARE in fact two different
target, but for the most part they are configured the same way and have the
same properties.

The fact that the recommended practice is to NOT specify SHARED / STATIC in
add_library and let the user decide which one to compile using
BUILD_SHARED_LIBS, proves that a library target is expected to be
independent on whether it is compiled as a shared object or static library.

I agree that it would be great to have the ability to produce both shared
and static binaries from a single library target, although we need to think
of how users importing such target, will be able to specify if they want to
link against the static or the shared binary.


On Thu, Sep 26, 2019 at 5:38 PM Juan Sanchez 
wrote:

> Here is an example where two libraries are created from object files that
> have only been compiled once:
>
> ADD_LIBRARY(symdiff_objects OBJECT ${CXX_SRCS} ${MC_SRCS})
> set_property(TARGET symdiff_objects PROPERTY POSITION_INDEPENDENT_CODE ON)
> ADD_LIBRARY(symdiff_dynamic STATIC $)
> ADD_LIBRARY(symdiff SHARED $)
>
> The "symdiff_dynamic" library is a static archive that can then be linked
> into another shared library or an executable. The "symdiff" library is a
> standalone object.  The POSITION_INDEPENDENT_CODE property is required for
> the linux platform, but not for macOS or Windows.  If the original poster
> is comfortable with having a PIC static library, this is an approach they
> can take.
>
> Regards,
>
> Juan
>
> On Wed, Sep 25, 2019 at 8:43 AM Kyle Edwards via CMake 
> wrote:
>
>> On Tue, 2019-09-24 at 23:41 +0300, Avraham Shukron wrote:
>> > Hi!
>> >
>> > I have a library which I want to distribute in both shared object and
>> > static library forms.
>> > Is there a modern way to do it without creating two completely
>> > separate library targets?
>> > Since I want to be a good CMake citizen I use `target_*` and
>> > `set_target_properties` as much as possible, and creating two
>> > different libraries will force me to duplicate that information about
>> > each one of them.
>> >
>> > I also tries not specifying STATIC/SHARED, and then running cmake
>> > twice - once with BUILD_SHARED_LIBS=ON and once OFF and then
>> > installing to the same directory. I got my both .a and .so libraries
>> > installed, but I couldn't get the Config file correctly for this
>> > arrangement.
>> >
>> > So - what is the community-recommended pattern to do this?
>>
>> Unfortunately, the recommendation is to do exactly what you don't want
>> to do: create a shared target and a static target.
>>
>> To make this slightly simpler, you can use functions to de-duplicate
>> the target_* and set_target_properties calls:
>>
>> function(create_foo_target name type)
>>   add_library(${name} ${type} foo.c foo.h)
>>   set_target_properties(${name} OUTPUT_NAME foo)
>> endfunction()
>>
>> create_foo_target(foo_shared SHARED)
>> create_foo_target(foo_static STATIC)
>>
>> Kyle
>> --
>>
>> 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
>>
>
-- 

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


[CMake] Cmake error

2019-09-26 Thread Enrique González
Dear all,

I'm trying to install LLVM with all the projects because I need Clang and
the SPIR-V target. I am using cmake like the llvm manual says and it give
me this error, could you help me to solve it?

I am following the steps from this page:
https://llvm.org/docs/GettingStarted.html

CMAKE ERROR TRACE:

enrique@enrique-VirtualBox:~/Escritorio/llvm-project/build$ cmake
-DLLVM_ENABLE_PROJECTS='all' -DCMAKE_BUILD_TYPE=Release -G 'Ninja' ../llvm
-- clang project is enabled
-- clang-tools-extra project is enabled
-- compiler-rt project is enabled
-- debuginfo-tests project is enabled
-- libclc project is enabled
-- libcxx project is enabled
-- libcxxabi project is enabled
-- libunwind project is enabled
-- lld project is enabled
-- lldb project is enabled
-- llgo project is enabled
-- openmp project is enabled
-- parallel-libs project is enabled
-- polly project is enabled
-- pstl project is enabled
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at
least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Ninja version: 1.8.2
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Failed to locate sphinx-build executable (missing: SPHINX_EXECUTABLE)
-- Linker detection: GNU ld
-- Parallel STL uses the serial backend
-- Linker detection: GNU ld
-- Linker detection: GNU ld
-- gdb found: /usr/bin/gdb
-- Linker detection: GNU ld
-- Compiler-RT supported architectures: x86_64
-- Builtin supported architectures: x86_64
-- Linker detection: GNU ld
-- Linker detection: GNU ld
-- Builtin supported architectures: x86_64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is
"asan;lsan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against
"asan;lsan;msan;tsan;ubsan"
-- check-shadowcallstack does nothing.
-- Could NOT find LIBOMPTARGET_DEP_LIBELF (missing:
LIBOMPTARGET_DEP_LIBELF_LIBRARIES LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIRS)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find LIBOMPTARGET_DEP_CUDA_DRIVER (missing:
LIBOMPTARGET_DEP_CUDA_DRIVER_LIBRARIES)
-- LIBOMPTARGET: Building offloading runtime library libomptarget.
-- LIBOMPTARGET: Not building aarch64 offloading plugin: machine not found
in the system.
-- LIBOMPTARGET: Not building CUDA offloading plugin: libelf dependency not
found.
-- LIBOMPTARGET: Not building PPC64 offloading plugin: machine not found in
the system.
-- LIBOMPTARGET: Not building PPC64le offloading plugin: machine not found
in the system.
-- LIBOMPTARGET: Not building x86_64 offloading plugin: libelf dependency
not found.
-- LIBOMPTARGET: Not building CUDA offloading device RTL: CUDA tools not
found in the system.
-- ISL version: isl-0.20-65-gb822a210
-- PPCG version: ppcg-0.07
-- Clang version: 10.0.0
CMake Error at /usr/share/cmake-3.10/Modules/ExternalProject.cmake:2759
(get_property):
  get_property could not find TARGET llgo.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/ExternalProject.cmake:3032
(_ep_add_configure_command)
  /home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:200
(externalproject_add)
  /home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:219
(add_libgo_variant)


CMake Error at /usr/share/cmake-3.10/Modules/ExternalProject.cmake:2759
(get_property):
  get_property could not find TARGET cc-wrapper.  Perhaps it has not yet
been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/ExternalProject.cmake:3032
(_ep_add_configure_command)
  /home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:200
(externalproject_add)
  /home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:219
(add_libgo_variant)


CMake Error at /usr/share/cmake-3.10/Modules/ExternalProject.cmake:2759
(get_property):
  get_property could not find TARGET llgo.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/ExternalProject.cmake:3032
(_ep_add_configure_command)
  /home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:200
(externalproject_add)
  /home/enrique/Escritorio/llvm-project/llgo/CMakeLists.txt:222
(add_libgo_variant)


CMake Error at 

[Cmake-commits] CMake branch, master, updated. v3.15.3-1215-gb4087a2

2019-09-26 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  b4087a23538f87efebcc8e4ece248416c242167f (commit)
   via  4dc8c153ec40c48f88e74beb127949395dfbcf55 (commit)
   via  481070a78a90a7e6c0bfc433fec842c78d63d9de (commit)
   via  acdb326610416ea3a559740fa79ad807a44838ee (commit)
  from  28a2613dd291c641f17940e3f996bd4cc9b9888d (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=b4087a23538f87efebcc8e4ece248416c242167f
commit b4087a23538f87efebcc8e4ece248416c242167f
Merge: 28a2613 4dc8c15
Author: Brad King 
AuthorDate: Thu Sep 26 14:43:16 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 10:43:27 2019 -0400

Merge topic 'vs-ReferenceOutputAssembly-conditions'

4dc8c153ec Tests: Teach VSWinStorePhone to verify the content of generated 
xap
481070a78a Tests: Teach VSWinStorePhone to verify the content of generated 
appx/msix
acdb326610 VS: Do not reference output assemblies of targets with no output

Acked-by: Kitware Robot 
Merge-request: !3778


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dc8c153ec40c48f88e74beb127949395dfbcf55
commit 4dc8c153ec40c48f88e74beb127949395dfbcf55
Author: Vedran Vujinovic 
AuthorDate: Wed Sep 25 20:57:47 2019 +0200
Commit: Vedran Vujinovic 
CommitDate: Wed Sep 25 20:57:47 2019 +0200

Tests: Teach VSWinStorePhone to verify the content of generated xap

XAP format was used as app package format on Windows Phone 7 and 8.
It was replaced by APPX format since Windows Phone 8.1.

diff --git a/Tests/VSWinStorePhone/VerifyAppPackage.cmake 
b/Tests/VSWinStorePhone/VerifyAppPackage.cmake
index f1cf030..f9440d7 100644
--- a/Tests/VSWinStorePhone/VerifyAppPackage.cmake
+++ b/Tests/VSWinStorePhone/VerifyAppPackage.cmake
@@ -8,8 +8,8 @@ set(EXPECTED_APP_PKG_CONTENT
   JusticeLeagueWinRT.dll
 )
 
-# Windows app package formats can be either appx or msix
-file(GLOB_RECURSE ALL_APP_PKG_FILES ${APP_PACKAGE_DIR}/AppPackages 
${APP_PKG_NAME}*.appx ${APP_PKG_NAME}*.msix)
+# Windows app package formats can be either msix, appx or xap
+file(GLOB_RECURSE ALL_APP_PKG_FILES ${APP_PACKAGE_DIR} ${APP_PKG_NAME}*.msix 
${APP_PKG_NAME}*.appx ${APP_PKG_NAME}*.xap)
 
 # There can be only one generated app package
 list(LENGTH ALL_APP_PKG_FILES APP_PKG_COUNT)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=481070a78a90a7e6c0bfc433fec842c78d63d9de
commit 481070a78a90a7e6c0bfc433fec842c78d63d9de
Author: Vedran Vujinovic 
AuthorDate: Wed Sep 4 11:32:10 2019 +0200
Commit: Brad King 
CommitDate: Tue Sep 24 10:12:43 2019 -0400

Tests: Teach VSWinStorePhone to verify the content of generated appx/msix

Add a test to verify the content of generated UWP app package - appx/msix.
MSIX format was introduced Visual Studio 2017 version 15.9.0 and
Windows SDK version 17763.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 78ae7aa..c284603 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2079,6 +2079,9 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev 
-- '${CMake_BUILD_NIGH
 --build-config $
 --build-options -DCMAKE_SYSTEM_NAME=${systemName}
 -DCMAKE_SYSTEM_VERSION=${systemVersion}
+--test-command
+  ${CMAKE_CMAKE_COMMAND} 
-DAPP_PACKAGE_DIR="${CMake_BINARY_DIR}/Tests/VSWinStorePhone/${name}"
+ -P 
"${CMake_SOURCE_DIR}/Tests/VSWinStorePhone/VerifyAppPackage.cmake"
 )
   list(APPEND TEST_BUILD_DIRS 
"${CMake_BINARY_DIR}/Tests/VSWinStorePhone/${name}")
 endmacro()
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt 
b/Tests/VSWinStorePhone/CMakeLists.txt
index efc7760..b8e157d 100644
--- a/Tests/VSWinStorePhone/CMakeLists.txt
+++ b/Tests/VSWinStorePhone/CMakeLists.txt
@@ -9,6 +9,7 @@ elseif(MSVC_VERSION GREATER 1600)
 endif()
 
 add_subdirectory(WinRT)
+add_subdirectory(CxxDLL)
 
 set (APP_MANIFEST_NAME Package.appxmanifest)
 if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
@@ -151,4 +152,4 @@ if("${SHORT_VERSION}" STREQUAL "10.0")
   set_property(TARGET ${EXE_NAME} PROPERTY VS_SDK_REFERENCES 
"Microsoft.UniversalCRT.Debug, 
Version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
 endif()
 
-target_link_libraries(${EXE_NAME} d3d11 JusticeLeagueWinRT)
+target_link_libraries(${EXE_NAME} d3d11 JusticeLeagueWinRT CxxDll)
diff --git a/Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt 
b/Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt
new file mode 100644
index 000..6bd32a2
--- /dev/null
+++ b/Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(CxxDll CXX)
+

Re: [CMake] Single library with both shared and static binaries

2019-09-26 Thread Juan Sanchez
Here is an example where two libraries are created from object files that
have only been compiled once:

ADD_LIBRARY(symdiff_objects OBJECT ${CXX_SRCS} ${MC_SRCS})
set_property(TARGET symdiff_objects PROPERTY POSITION_INDEPENDENT_CODE ON)
ADD_LIBRARY(symdiff_dynamic STATIC $)
ADD_LIBRARY(symdiff SHARED $)

The "symdiff_dynamic" library is a static archive that can then be linked
into another shared library or an executable. The "symdiff" library is a
standalone object.  The POSITION_INDEPENDENT_CODE property is required for
the linux platform, but not for macOS or Windows.  If the original poster
is comfortable with having a PIC static library, this is an approach they
can take.

Regards,

Juan

On Wed, Sep 25, 2019 at 8:43 AM Kyle Edwards via CMake 
wrote:

> On Tue, 2019-09-24 at 23:41 +0300, Avraham Shukron wrote:
> > Hi!
> >
> > I have a library which I want to distribute in both shared object and
> > static library forms.
> > Is there a modern way to do it without creating two completely
> > separate library targets?
> > Since I want to be a good CMake citizen I use `target_*` and
> > `set_target_properties` as much as possible, and creating two
> > different libraries will force me to duplicate that information about
> > each one of them.
> >
> > I also tries not specifying STATIC/SHARED, and then running cmake
> > twice - once with BUILD_SHARED_LIBS=ON and once OFF and then
> > installing to the same directory. I got my both .a and .so libraries
> > installed, but I couldn't get the Config file correctly for this
> > arrangement.
> >
> > So - what is the community-recommended pattern to do this?
>
> Unfortunately, the recommendation is to do exactly what you don't want
> to do: create a shared target and a static target.
>
> To make this slightly simpler, you can use functions to de-duplicate
> the target_* and set_target_properties calls:
>
> function(create_foo_target name type)
>   add_library(${name} ${type} foo.c foo.h)
>   set_target_properties(${name} OUTPUT_NAME foo)
> endfunction()
>
> create_foo_target(foo_shared SHARED)
> create_foo_target(foo_static STATIC)
>
> Kyle
> --
>
> 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
>
-- 

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


[Cmake-commits] CMake branch, master, updated. v3.15.3-1211-g28a2613

2019-09-26 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  28a2613dd291c641f17940e3f996bd4cc9b9888d (commit)
   via  d867e058924d348ee5ec5bba867965e8f1f276e2 (commit)
   via  881e3cfbf96c7b4f48304d3dfc07899c2e6703de (commit)
   via  fc36f4410bcdb76ef23a07e5172cb57b41ff5ce3 (commit)
   via  1f0d23546d5721fdd92883da4c4368dad3931393 (commit)
   via  6a05bd3fa6a3f4ecf45c4cc32abc616883998ff9 (commit)
  from  3cb12895f3d99614ac30bd2f7703f721154b7068 (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=28a2613dd291c641f17940e3f996bd4cc9b9888d
commit 28a2613dd291c641f17940e3f996bd4cc9b9888d
Merge: 3cb1289 d867e05
Author: Brad King 
AuthorDate: Thu Sep 26 13:56:57 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 09:57:15 2019 -0400

Merge topic 'autogen_json'

d867e05892 Autogen: Use JSON instead of CMake script for info files
881e3cfbf9 Autogen: Variable renames and cleanups
fc36f4410b Autogen: Inline GetKnownQtVersions function
1f0d23546d Autogen: Return unsigned int from GetParallelCPUCount()
6a05bd3fa6 cm/algorithm: Provide function cm::clamp

Acked-by: Kitware Robot 
Merge-request: !3859


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d867e058924d348ee5ec5bba867965e8f1f276e2
commit d867e058924d348ee5ec5bba867965e8f1f276e2
Author: Sebastian Holtermann 
AuthorDate: Fri Sep 20 22:39:13 2019 +0200
Commit: Brad King 
CommitDate: Wed Sep 25 10:07:09 2019 -0400

Autogen: Use JSON instead of CMake script for info files

We used to store information for the _autogen target in a CMake script
file AutogenInfo.cmake, which was imported by a temporary cmake instance in
the _autogen target.  This introduced the overhead of creating a temporary
cmake instance and inherited the limitations of the CMake language which
only supports lists.

This patch introduces JSON files to pass information to AUTORCC and
autogen_ targets.  JSON files are more flexible for passing data, e.g. they
support nested lists.

The patch has the side effects that

- AutogenInfo.cmake is renamed to AutogenInfo.json
- AutogenOldSettings.txt is renamed to AutogenUsed.txt
- RCCInfo.cmake is renamed to
  AutoRcc___Info.json
- RCC.lock is renamed to
  AutoRcc___Lock.lock
- RCCSettings.txt is renamed to
  AutoRcc___Used.txt

diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 57c8825..0f0e864 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -72,7 +72,6 @@ void MergeOptions(std::vector& baseOpts,
 // - Class definitions
 
 unsigned int const cmQtAutoGen::ParallelMax = 64;
-std::string const cmQtAutoGen::ListSep = "<<>>";
 
 cm::string_view cmQtAutoGen::GeneratorName(GenT genType)
 {
@@ -162,6 +161,16 @@ std::string 
cmQtAutoGen::QuotedCommand(std::vector const& command)
   return res;
 }
 
+std::string cmQtAutoGen::FileNameWithoutLastExtension(cm::string_view filename)
+{
+  auto slashPos = filename.rfind('/');
+  if (slashPos != cm::string_view::npos) {
+filename.remove_prefix(slashPos + 1);
+  }
+  auto dotPos = filename.rfind('.');
+  return std::string(filename.substr(0, dotPos));
+}
+
 std::string cmQtAutoGen::ParentDir(cm::string_view filename)
 {
   auto slashPos = filename.rfind('/');
diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h
index c8e4203..d070b79 100644
--- a/Source/cmQtAutoGen.h
+++ b/Source/cmQtAutoGen.h
@@ -62,8 +62,6 @@ public:
 RCC  // AUTORCC
   };
 
-  /// @brief Nested lists separator
-  static std::string const ListSep;
   /// @brief Maximum number of parallel threads/processes in a generator
   static unsigned int const ParallelMax;
 
@@ -81,6 +79,9 @@ public:
 
   static std::string QuotedCommand(std::vector const& command);
 
+  /// @brief Returns the file name without path and extension (thread safe)
+  static std::string FileNameWithoutLastExtension(cm::string_view filename);
+
   /// @brief Returns the parent directory of the file (thread safe)
   static std::string ParentDir(cm::string_view filename);
 
diff --git a/Source/cmQtAutoGenInitializer.cxx 
b/Source/cmQtAutoGenInitializer.cxx
index 0329ac7..0d56fe1 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -8,7 +8,7 @@
 #include "cmAlgorithms.h"
 #include "cmCustomCommand.h"
 #include "cmCustomCommandLines.h"
-#include "cmFilePathChecksum.h"
+#include "cmGeneratedFileStream.h"
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGenerator.h"
@@ -17,7 +17,6 @@
 #include "cmLocalGenerator.h"

[Cmake-commits] CMake branch, master, updated. v3.15.3-1205-g3cb1289

2019-09-26 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  3cb12895f3d99614ac30bd2f7703f721154b7068 (commit)
   via  c54448e1855432de95844d4d0546bbe6d7f47c84 (commit)
  from  a29b8d285e176b40c9c5f1ce506dd97ed38f9c97 (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=3cb12895f3d99614ac30bd2f7703f721154b7068
commit 3cb12895f3d99614ac30bd2f7703f721154b7068
Merge: a29b8d2 c54448e
Author: Brad King 
AuthorDate: Thu Sep 26 13:51:41 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 09:51:55 2019 -0400

Merge topic 'pch-export'

c54448e185 PCH: Propagate INTERFACE_PRECOMPILE_HEADERS in install(EXPORT)

Acked-by: Kitware Robot 
Acked-by: Cristian Adam 
Merge-request: !3862


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c54448e1855432de95844d4d0546bbe6d7f47c84
commit c54448e1855432de95844d4d0546bbe6d7f47c84
Author: Brad King 
AuthorDate: Mon Sep 23 13:51:07 2019 -0400
Commit: Brad King 
CommitDate: Wed Sep 25 12:06:28 2019 -0400

PCH: Propagate INTERFACE_PRECOMPILE_HEADERS in install(EXPORT)

This was accidentally left out of commit 0467a2f91b (PCH: add
PRECOMPILE_HEADERS to special properties, 2015-03-12).  Also add a test
case for `install(EXPORT)` and `export()` propagation of precompiled
headers.

Fixes: #19741

diff --git a/Source/cmExportInstallFileGenerator.cxx 
b/Source/cmExportInstallFileGenerator.cxx
index 0009b3a..1e843b6 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -94,6 +94,9 @@ bool 
cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
 this->PopulateInterfaceProperty("INTERFACE_COMPILE_OPTIONS", gt,
 cmGeneratorExpression::InstallInterface,
 properties, missingTargets);
+this->PopulateInterfaceProperty("INTERFACE_PRECOMPILE_HEADERS", gt,
+cmGeneratorExpression::InstallInterface,
+properties, missingTargets);
 this->PopulateInterfaceProperty("INTERFACE_AUTOUIC_OPTIONS", gt,
 cmGeneratorExpression::InstallInterface,
 properties, missingTargets);
diff --git a/Tests/ExportImport/Export/Interface/CMakeLists.txt 
b/Tests/ExportImport/Export/Interface/CMakeLists.txt
index 22a4ef6..43b7217 100644
--- a/Tests/ExportImport/Export/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Export/Interface/CMakeLists.txt
@@ -6,6 +6,12 @@ set_property(TARGET headeronly PROPERTY 
INTERFACE_INCLUDE_DIRECTORIES
 )
 set_property(TARGET headeronly PROPERTY INTERFACE_COMPILE_DEFINITIONS 
"HEADERONLY_DEFINE")
 
+add_library(pch_iface INTERFACE)
+target_precompile_headers(pch_iface INTERFACE
+  "$"
+  "$/include/pch/pch.h>"
+  )
+
 include(GenerateExportHeader)
 add_library(sharedlib SHARED sharedlib.cpp)
 generate_export_header(sharedlib)
@@ -45,7 +51,7 @@ set_property(TARGET cmakeonly PROPERTY custom_property 
CustomPropertyValue)
 set_property(TARGET cmakeonly PROPERTY EXPORT_PROPERTIES custom_property)
 
 install(TARGETS headeronly sharediface use_auto_type use_c_restrict 
source_target
-cmakeonly
+pch_iface cmakeonly
   EXPORT expInterface
 )
 install(TARGETS sharedlib
@@ -61,6 +67,10 @@ install(FILES
   DESTINATION include/headeronly
 )
 install(FILES
+  pch/pch.h
+  DESTINATION include/pch
+)
+install(FILES
   sharedlib/sharedlib.h
   "${CMAKE_CURRENT_BINARY_DIR}/sharedlib_export.h"
   DESTINATION include/sharedlib
diff --git a/Tests/ExportImport/Export/Interface/pch/pch.h 
b/Tests/ExportImport/Export/Interface/pch/pch.h
new file mode 100644
index 000..bc50727
--- /dev/null
+++ b/Tests/ExportImport/Export/Interface/pch/pch.h
@@ -0,0 +1 @@
+#define PCH_PCH_H_INCLUDED
diff --git a/Tests/ExportImport/Import/Interface/CMakeLists.txt 
b/Tests/ExportImport/Import/Interface/CMakeLists.txt
index a07a5b3..ef666b1 100644
--- a/Tests/ExportImport/Import/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Import/Interface/CMakeLists.txt
@@ -98,6 +98,17 @@ set_property(TARGET exp::sharediface APPEND PROPERTY 
INTERFACE_LINK_LIBRARIES de
 add_executable(interfacetest_exp interfacetest.cpp)
 target_link_libraries(interfacetest_exp exp::sharediface)
 
+if(NOT CMAKE_OSX_ARCHITECTURES MATCHES "[;$]" OR CMAKE_GENERATOR STREQUAL 
"Xcode")
+  add_executable(pch_iface_test_bld pch_iface_test.cpp)
+  target_link_libraries(pch_iface_test_bld bld::pch_iface)
+  add_executable(pch_iface_test_exp pch_iface_test.cpp)
+  

[Cmake-commits] CMake branch, master, updated. v3.15.3-1203-ga29b8d2

2019-09-26 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  a29b8d285e176b40c9c5f1ce506dd97ed38f9c97 (commit)
   via  df982c4e189c01896db487ec5edfe85d27911007 (commit)
   via  7847fef51056432e2e822b64d72b598a993e9524 (commit)
   via  fd3a39461457540157ea9bee2f9ea7620dfd1c7f (commit)
   via  a1cc6b4447787b84777fdf9a860e8c39f0f4a090 (commit)
   via  cbb861ade85e3b7e550bb1f150513b237efc1f02 (commit)
  from  5fa625d611414ac567fd7a6bb5b3b416ea93eca2 (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=a29b8d285e176b40c9c5f1ce506dd97ed38f9c97
commit a29b8d285e176b40c9c5f1ce506dd97ed38f9c97
Merge: df982c4 7847fef
Author: Brad King 
AuthorDate: Thu Sep 26 13:49:36 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 09:49:56 2019 -0400

Merge topic 'fix-vsmacro-access-violation'

7847fef510 VS: Fix access violation when calling Visual Studio macro

Acked-by: Kitware Robot 
Merge-request: !3853


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df982c4e189c01896db487ec5edfe85d27911007
commit df982c4e189c01896db487ec5edfe85d27911007
Merge: 5fa625d fd3a394
Author: Brad King 
AuthorDate: Thu Sep 26 13:47:41 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 09:47:51 2019 -0400

Merge topic 'add-custom-target-byproduct-checks'

fd3a394614 add_custom_command: Format files in error message in a single 
line
a1cc6b4447 add_custom_target: Add output checks for custom target byproducts
cbb861ade8 add_custom_command: Add tests for custom command output checks

Acked-by: Kitware Robot 
Merge-request: !3850


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7847fef51056432e2e822b64d72b598a993e9524
commit 7847fef51056432e2e822b64d72b598a993e9524
Author: Daniel Eiband 
AuthorDate: Sun Sep 22 17:55:12 2019 +0200
Commit: Daniel Eiband 
CommitDate: Tue Sep 24 17:44:28 2019 +0200

VS: Fix access violation when calling Visual Studio macro

Fixes: #19730

diff --git a/Source/cmGlobalVisualStudio7Generator.cxx 
b/Source/cmGlobalVisualStudio7Generator.cxx
index 92316d3..188aef2 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -45,6 +45,14 @@ static cmVS7FlagTable cmVS7ExtraFlagTable[] = {
   { "", "", "", "", 0 }
 };
 
+namespace {
+std::string GetSLNFile(cmLocalGenerator* root)
+{
+  return cmStrCat(root->GetCurrentBinaryDirectory(), '/',
+  root->GetProjectName(), ".sln");
+}
+}
+
 cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
   cmake* cm, std::string const& platformInGeneratorName)
   : cmGlobalVisualStudioGenerator(cm, platformInGeneratorName)
@@ -286,8 +294,10 @@ void cmGlobalVisualStudio7Generator::Generate()
   this->OutputSLNFile();
   // If any solution or project files changed during the generation,
   // tell Visual Studio to reload them...
-  if (!cmSystemTools::GetErrorOccuredFlag()) {
-this->CallVisualStudioMacro(MacroReload);
+  if (!cmSystemTools::GetErrorOccuredFlag() &&
+  !this->LocalGenerators.empty()) {
+this->CallVisualStudioMacro(MacroReload,
+GetSLNFile(this->LocalGenerators[0]));
   }
 }
 
@@ -298,8 +308,7 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile(
 return;
   }
   this->CurrentProject = root->GetProjectName();
-  std::string fname = cmStrCat(root->GetCurrentBinaryDirectory(), '/',
-   root->GetProjectName(), ".sln");
+  std::string fname = GetSLNFile(root);
   cmGeneratedFileStream fout(fname.c_str());
   fout.SetCopyIfDifferent(true);
   if (!fout) {
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index 61e8f58..1cb8b53 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -288,11 +288,10 @@ void 
cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros()
 }
 
 void cmGlobalVisualStudioGenerator::CallVisualStudioMacro(
-  MacroName m, const char* vsSolutionFile)
+  MacroName m, const std::string& vsSolutionFile)
 {
   // If any solution or project files changed during the generation,
   // tell Visual Studio to reload them...
-  cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
   std::string dir = this->GetUserMacrosDirectory();
 
   // Only really try to call the macro if:
@@ -307,27 +306,18 @@ void cmGlobalVisualStudioGenerator::CallVisualStudioMacro(
 if (cmSystemTools::FileExists(macrosFile.c_str()) &&
 IsVisualStudioMacrosFileRegistered(
   macrosFile, 

[Cmake-commits] CMake branch, master, updated. v3.15.3-1197-g5fa625d

2019-09-26 Thread Kitware Robot via Cmake-commits
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  5fa625d611414ac567fd7a6bb5b3b416ea93eca2 (commit)
   via  67e6b55c5885c445b5b78b41a66529553dcab069 (commit)
   via  33c7ea513dc8a7e1322c5c37003c7c515bd8ad99 (commit)
   via  53be31e19c0dc0f517825d1be056c55d7729a4b7 (commit)
   via  0aa8a2ab8b00c0889df3d0fa1be47ad5a0b9db22 (commit)
   via  d5a6a133680e4d5798522a4b29ae6bced1f2db3a (commit)
   via  b2c67a7703836a0015a7e4bf3837dbb613061a74 (commit)
  from  b42cb1ff80dc056da4036c7b65109d1a77d84bf4 (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=5fa625d611414ac567fd7a6bb5b3b416ea93eca2
commit 5fa625d611414ac567fd7a6bb5b3b416ea93eca2
Merge: 67e6b55 33c7ea5
Author: Kyle Edwards 
AuthorDate: Thu Sep 26 13:22:18 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 09:23:31 2019 -0400

Merge topic 'cpack-DEB-use-CPACK_PACKAGE_DESCRIPTION_FILE'

33c7ea513d CPackDeb: Use `CPACK_PACKAGE_DESCRIPTION_FILE`
53be31e19c Refactor: Use `list` commands instead of old-way string ops
b2c67a7703 Style: Remove spaces after command call and `(`

Acked-by: Kitware Robot 
Merge-request: !3541


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67e6b55c5885c445b5b78b41a66529553dcab069
commit 67e6b55c5885c445b5b78b41a66529553dcab069
Merge: b42cb1f 0aa8a2a
Author: Kyle Edwards 
AuthorDate: Thu Sep 26 13:22:00 2019 +
Commit: Kitware Robot 
CommitDate: Thu Sep 26 09:22:13 2019 -0400

Merge topic 'ctest-argument-parser'

0aa8a2ab8b cmCTest*Command: Port to cmArgumentParser
d5a6a13368 cmArgumentParser: Record parsed keywords

Acked-by: Kitware Robot 
Merge-request: !3835

diff --cc Source/CTest/cmCTestCoverageCommand.h
index 75aefdf,f7b6315..fcffa75
--- a/Source/CTest/cmCTestCoverageCommand.h
+++ b/Source/CTest/cmCTestCoverageCommand.h
@@@ -8,11 -8,11 +8,11 @@@
  #include "cmCTestHandlerCommand.h"
  #include "cmCommand.h"
  
- #include 
  #include 
  #include 
+ #include 
  
 -#include "cm_memory.hxx"
 +#include 
  
  class cmCTestGenericHandler;
  
diff --cc Source/CTest/cmCTestMemCheckCommand.h
index 5dad4e7,200cc2e..8f4ffb8
--- a/Source/CTest/cmCTestMemCheckCommand.h
+++ b/Source/CTest/cmCTestMemCheckCommand.h
@@@ -5,9 -5,10 +5,10 @@@
  
  #include "cmConfigure.h" // IWYU pragma: keep
  
+ #include 
  #include 
  
 -#include "cm_memory.hxx"
 +#include 
  
  #include "cmCTestTestCommand.h"
  #include "cmCommand.h"
diff --cc Source/CTest/cmCTestUploadCommand.h
index 39314f2,a962497..f78f0ec
--- a/Source/CTest/cmCTestUploadCommand.h
+++ b/Source/CTest/cmCTestUploadCommand.h
@@@ -8,11 -8,11 +8,11 @@@
  #include "cmCTestHandlerCommand.h"
  #include "cmCommand.h"
  
- #include 
  #include 
  #include 
+ #include 
  
 -#include "cm_memory.hxx"
 +#include 
  
  class cmCTestGenericHandler;
  

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33c7ea513dc8a7e1322c5c37003c7c515bd8ad99
commit 33c7ea513dc8a7e1322c5c37003c7c515bd8ad99
Author: Alex Turbov 
AuthorDate: Thu Jul 11 19:31:59 2019 +0300
Commit: Alex Turbov 
CommitDate: Sun Sep 22 00:31:24 2019 +0200

CPackDeb: Use `CPACK_PACKAGE_DESCRIPTION_FILE`

Also, handle per-component description nicely.

diff --git a/Help/cpack_gen/deb.rst b/Help/cpack_gen/deb.rst
index 23f0515..db71c87 100644
--- a/Help/cpack_gen/deb.rst
+++ b/Help/cpack_gen/deb.rst
@@ -179,16 +179,24 @@ List of CPack DEB generator specific variables:
  * Default   : ``CPACK_PACKAGE_CONTACT``
 
 .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
-  CPACK_COMPONENT__DESCRIPTION
+  CPACK_DEBIAN__DESCRIPTION
 
  The Debian package description
 
  * Mandatory : YES
  * Default   :
 
-   - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or
-   - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
+   - :variable:`CPACK_DEBIAN__DESCRIPTION` (component
+ based installers only) if set, or 
:variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set, or
+   - :variable:`CPACK_COMPONENT__DESCRIPTION` (component
+ based installers only) if set, or :variable:`CPACK_PACKAGE_DESCRIPTION` 
if set, or
+   - content of the file specified in 
:variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set
 
+ If after that description is not set, 
:variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` going to be
+ used if set. Otherwise, :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` will be 
added as the first
+ line of description as defined in `Debian Policy Manual`_.
+
+.. _Debian Policy Manual: 
https://www.debian.org/doc/debian-policy/ch-controlfields.html#description
 
 .. variable:: CPACK_DEBIAN_PACKAGE_SECTION

Re: [cmake-developers] Possible feature request concerning conditional linking support by generator expressions

2019-09-26 Thread Brad King via cmake-developers
On 9/24/19 5:02 PM, Alan W. Irwin wrote:
> I. Possible feature request
> 
> After reading through the generator-expression documentation at
> 
> it appears for my use case (see below) I need generator expressions of
> the form
> 
> $<$>:-pthread>
> $<$:-pthread>
> $<$:-Xcc-pthread>
> $<$:libbasename> (where libbasename is likely pthread)
> 
> where I guess (since I am pretty much a newbie with regard to detailed
> generator expressions) they would all be combined together in a list
> for a library target INTERFACE_LINK_LIBRARIES property.

I've opened an issue for that proposal and the associated use case:

* https://gitlab.kitware.com/cmake/cmake/issues/19757

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [CMake] Single library with both shared and static binaries

2019-09-26 Thread Simon Richter
Hi,

On Tue, Sep 24, 2019 at 11:41:54PM +0300, Avraham Shukron wrote:

> I have a library which I want to distribute in both shared object and
> static library forms.

Is that a requirement for your project, or a requirement for the system
integrator?

With my Debian Developer hat on, I'm always grateful when a project's build
system doesn't do anything unexpected.

We know that libtool generates shared and static libraries at the same
time, and so when wrapping an autoconf based project, we use a single build
tree and expect both to pop up.

With CMake, we know that the build system cannot generate both at the same
time. It would be cool if it could, but the expectation is that a library
project will have to be built twice, and our tools mirror that expectation.

If the majority of your users compile from source and need both shared and
static libraries to be built, it makes sense to have two targets.
Otherwise, the principle of least surprise applies.

That said, a hypothetical future version of CMake that makes this easier so
we can at some point remove the requirement to build twice would be
awesome.

   Simon
-- 

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