[CMake] Build tool mode with MSBuild not ignoring targets excluded from default

2017-05-04 Thread Kim Kryger
Hello all,
I am using the Build Tool Mode in CMake 3.7.1 to build INSTALL targets in a
MSVC11 build folder. According to the documentation (and the output from
MSBuild), it should be building 'default targets' only, but it doesn't
specify what that means exactly.

The command I am running:
cmake.exe --build vc110 --target INSTALL --config Release_mdd

This is building every single target in the solution, even if they have
been turned off by EXCLUDE_FROM_DEFAULT_BUILD,
EXCLUDE_FROM_DEFAULT_BUILD_, or even EXCLUDE_FROM_ALL. Seemingly
the only way I can prevent the excluded project from being built is to
remove the target as a dependency on other targets, or invoke MSBuild with
the solution file directly, which isn't very cross-platform friendly, and
I'd prefer to utilize CMake's knowledge of the build tools than write my
own MSBuild finder.


More information:
I have a runtime library and a plugin that is loaded in an executable. The
runtime library is being built for multiple configurations (Release, Debug,
Release_mdd, Debug_md), but the plugin is only supposed to build in Release
and Debug. I have excluded the plugin from the default build:
SET( CMAKE_CONFIGURATION_TYPES "Release;Release_mdd;Debug;Debug_md" )
...
SET_TARGET_PROPERTIES( MyPlugin PROPERTIES
EXCLUDE_FROM_DEFAULT_BUILD_RELEASE_MDD 1
EXCLUDE_FROM_DEFAULT_BUILD_DEBUG_MD 1
)


I can call MSBuild with the solution file, and it correctly ignores the
builds that are marked as excluded, but AFAIK CMake's build tool mode
doesn't support this right now, I believe because of the usage of the
References in ALL BUILD causes all referenced projects to be built,
regardless of the solution configuration ('fixable' by
using /p:BuildProjectReferences=false as an option to MSBuild)


Looking through the code
(cmGlobalVisualStudio10Generator::GenerateBuildCommand), it seems I can
'spoof' it into using the sln and ignoring the ALL_BUILD vcxproj file
completely if I specify 'clean' as the target, and then add /t:Build to the
end of the command line. I'd rather not do this, as it doesn't remove the
'clean' option.

I guess my question is if the build tool mode is making assumptions about
what file I want it to build with?

As a workaround, is there an option to force it to use devenv for the time
being?

Thanks,
Kim
-- 

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 not detecting pkgbuild or product build

2017-05-04 Thread Ayla Khan
OK, good to know.

Best,

Ayla

> On May 4, 2017, at 6:09 AM, Robert Maynard  wrote:
> 
> Hi,
> 
> By default the NSIS generator is enabled. 
> 
> On Wed, May 3, 2017 at 6:39 PM, Ayla Khan  > wrote:
> That worked - thank you! Do I need to add NSIS manually for Windows 
> installers as well? It looks like CMake finds NSIS without any difficulty but 
> I’d rather be sure.
> 
> Thanks,
> 
> Ayla
> 
>> On May 3, 2017, at 2:56 PM, Robert Maynard > > wrote:
>> 
>> You will need to append the productbuild type to you CPACK_GENERATOR so it 
>> would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ")
>> 
>> On Wed, May 3, 2017 at 4:14 PM, Ayla Khan > > wrote:
>> Thank you Robert. The CPACK_GENERATOR variable is currently set to 
>> “STGZ;TGZ”. When I installed Xcode, I made sure using xcode-select that the 
>> usual command line tools were installed. I can find productbuild in my PATH, 
>> but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need to 
>> explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I 
>> append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR was 
>> generated automatically.
>> 
>> Also, I’ve been working with Xcode 8 on OS X 10.11.6, and CPack is ignoring 
>> productbuild completely even if I set it using the generator flag. Command 
>> line tools were also set up using xcode-select.
>> 
>> Thanks,
>> 
>> Ayla
>> 
>> > On May 3, 2017, at 1:12 PM, Robert Maynard > > > wrote:
>> >
>> > Hi Ayla,
>> >
>> > The packages that are built when executing "make package" is determined by 
>> > the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally 
>> > located in the root of your build directory as it is configured ).
>> >
>> >
>> > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan > > > wrote:
>> > I’m trying to build a Mac OS X installer package on 10.10.5 using Xcode 
>> > 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a 
>> > package from the CMake build directory if I call cpack directly on the 
>> > command line with -G productbuild, but not through the CMake build using 
>> > make package. Is there a CPack setting I need or some other build 
>> > configuration information? Is the Xcode version too old?
>> >
>> > Thanks,
>> >
>> > Ayla
>> > --
>> >
>> > 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 
>> > 
>> >
>> 
>> 
> 
> 

-- 

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] avoiding finding system libraries (motivation is superbuilds)

2017-05-04 Thread Kris Thielemans
Hi

 

Short question: if we have a library/include files installed both in the
usual system locations and outside, how do we force CMake to find the
latter? (without modifying the CMake files of the project).

 

Motivation:

We're trying to make a SuperBuild that builds/downloads a specific version
of various packages (such as Boost and GTest). Our motivation is to have
complete control of the version. We don't want to install this in standard
locations to avoid clashes, root permissions etc.  So let's say we install
our versions in ~/our_stuff/lib, ~/our_stuff/include etc

 

It seems very hard (and sometimes impossible) however to let future
find_packages find our own versions as opposed to the system ones. From
https://cmake.org/cmake/help/latest/command/find_library.html I thought that
doing something like this would work

 

cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff

 

but the system version of boost etc are still found first (it does work if
there is no system version of the library). In the case of Boost, even 

 

cmake ../ -DCMAKE_INSTALL_PREFIX=~/our_stuff -DBOOST_ROOT=~/our_stuff

 

doesn't help (tested on Linux). I have to set BOOST_INCLUDEDIR for instance.
As every Find*.cmake has its own conventions of specifying cmake/environment
variables, and some don't at all, this just gets unfeasible.

 

I know about NO_DEFAULT_PATH, NO_CMAKE_SYSTEM_PATH etc options for
find_package, but this would need modification of CMake files in the
dependent packages which is quite undesirable for us.

 

Any suggestions?

 

Thanks

Kris

 

-- 

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] Inconsistent parsing of bracket comments in command arguments

2017-05-04 Thread Volo Zyko
Hi,

I've encountered the following behavior. Code like 'set(FOO#[[bar]]
1)' is parsed fine by cmake, but for the code 'set(FOO #[[bar]]1)'
cmake reports:

  Syntax Error in cmake code at column 13

  Argument not separated from preceding token by whitespace.

Is this by design or just an omission? As for me either separation
should be required on both sides of bracket comment or it should allow
to omit separation on both sides too.


 Volo Zyko
-- 

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 get list of target dependencies?

2017-05-04 Thread Robert Dailey
Forgot to mention, I'm using CMake 3.8.1

On Thu, May 4, 2017 at 10:47 AM, Robert Dailey  wrote:
> How can I get a list of target dependencies of a target? For example,
> if I have 3 library targets that depend on each other like this:
>
> A -> B -> C
>
> When I ask for the target dependencies for A, I should get a list back
> with B in it. Basically this would be the same list I pass to
> target_link_libraries(), minus actual library files with no
> corresponding target known to CMake.
>
> I see a LINK_DEPENDS target property. Is this what I want?
-- 

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] How to get list of target dependencies?

2017-05-04 Thread Robert Dailey
How can I get a list of target dependencies of a target? For example,
if I have 3 library targets that depend on each other like this:

A -> B -> C

When I ask for the target dependencies for A, I should get a list back
with B in it. Basically this would be the same list I pass to
target_link_libraries(), minus actual library files with no
corresponding target known to CMake.

I see a LINK_DEPENDS target property. Is this what I want?
-- 

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] What is ANDROID_JAVA_SOURCE_DIR for?

2017-05-04 Thread Robert Dailey
I am seeing hints of ANT / JAVA support for Android in 3.8.1
documentation. Essentially there is a whole list of properties that
have unexplained use cases under Properties for Targets. I see
ANDROID_JAVA_SOURCE_DIR, for example. What are these for? Will CMake
actually do the "ant release" command for you? I've been using custom
targets to do the java build & packaging steps for Android.
-- 

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, master, updated. v3.8.1-1044-g30cb24f

2017-05-04 Thread Kitware Robot
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  30cb24f39cb5bd4dc053662d4cf1b124813e63d8 (commit)
   via  f15f905babad5977aa422e1753fe1aa658c77fa2 (commit)
  from  a83250880ad511d92d96bfd860873b9c79c0f462 (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=30cb24f39cb5bd4dc053662d4cf1b124813e63d8
commit 30cb24f39cb5bd4dc053662d4cf1b124813e63d8
Merge: a832508 f15f905
Author: Brad King 
AuthorDate: Thu May 4 15:33:33 2017 +
Commit: Kitware Robot 
CommitDate: Thu May 4 11:33:38 2017 -0400

Merge topic 'sunpro-5.14'

f15f905b Features: Record standards and features for SunPro 5.14

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f15f905babad5977aa422e1753fe1aa658c77fa2
commit f15f905babad5977aa422e1753fe1aa658c77fa2
Author: Brad King 
AuthorDate: Wed May 3 13:07:09 2017 -0400
Commit: Brad King 
CommitDate: Wed May 3 13:13:43 2017 -0400

Features: Record standards and features for SunPro 5.14

Oracle Studio 12.5 adds support for C 11 and associated standard flags.
It also adds a few more C++ 11 features.

diff --git a/Help/manual/cmake-compile-features.7.rst 
b/Help/manual/cmake-compile-features.7.rst
index 448fe9a..fa2aa8d 100644
--- a/Help/manual/cmake-compile-features.7.rst
+++ b/Help/manual/cmake-compile-features.7.rst
@@ -335,7 +335,7 @@ versions specified for each:
 * ``Clang``: Clang compiler versions 2.9 through 3.4.
 * ``GNU``: GNU compiler versions 4.4 through 5.0.
 * ``MSVC``: Microsoft Visual Studio versions 2010 through 2015.
-* ``SunPro``: Oracle SolarisStudio version 12.4.
+* ``SunPro``: Oracle SolarisStudio versions 12.4 through 12.5.
 * ``Intel``: Intel compiler versions 12.1 through 17.0.
 
 CMake is currently aware of the :prop_tgt:`C standards `
diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake
index 503684a..263bbe4 100644
--- a/Modules/Compiler/SunPro-C.cmake
+++ b/Modules/Compiler/SunPro-C.cmake
@@ -1,3 +1,8 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+include(Compiler/SunPro)
+
 set(CMAKE_C_VERBOSE_FLAG "-#")
 
 set(CMAKE_C_COMPILE_OPTIONS_PIC -KPIC)
@@ -22,5 +27,14 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
   set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
 endforeach()
 
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.14)
+  set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
+  set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c90")
+  set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
+  set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11")
+endif()
+
+__compiler_check_default_language_standard(C 5.13 90 5.14 11)
+
 set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "  
  -E  > ")
 set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "   
 -S  -o ")
diff --git a/Modules/Compiler/SunPro-CXX-FeatureTests.cmake 
b/Modules/Compiler/SunPro-CXX-FeatureTests.cmake
index 8e97e1d..60280ca 100644
--- a/Modules/Compiler/SunPro-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/SunPro-CXX-FeatureTests.cmake
@@ -5,6 +5,10 @@
 
 set(_cmake_oldestSupported "__SUNPRO_CC >= 0x5130")
 
+set(SolarisStudio125_CXX11 "(__SUNPRO_CC >= 0x5140) && __cplusplus >= 201103L")
+set(_cmake_feature_test_cxx_binary_literals "${SolarisStudio125_CXX11}")
+set(_cmake_feature_test_cxx_reference_qualified_functions 
"${SolarisStudio125_CXX11}")
+
 set(SolarisStudio124_CXX11 "(__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L")
 set(_cmake_feature_test_cxx_alignas "${SolarisStudio124_CXX11}")
 set(_cmake_feature_test_cxx_alignof "${SolarisStudio124_CXX11}")

---

Summary of changes:
 Help/manual/cmake-compile-features.7.rst   |2 +-
 Modules/Compiler/SunPro-C.cmake|   14 ++
 Modules/Compiler/SunPro-CXX-FeatureTests.cmake |4 
 3 files changed, 19 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] Implicit library trouble with mixed languages

2017-05-04 Thread Christian Pfeiffer
On 5/3/2017 5:25 PM, Brad King wrote:

> On 05/02/2017 05:47 PM, Christian Pfeiffer wrote:
>> Before filtering, gcc's output gives me the libgcc and libgcc_s twice.
> I think we already de-duplicate the results after extraction.
This only happens for the implicit library directories and frameworks 
directories. The libraries themselves aren't de-duplicated, most likely 
to prevent causing link errors in cases where some multiplicity is needed.

On it's own this isn't harmful though, so I've opened an MR removing gcc 
entirely from the filter line.
>
>> However, I was mainly asking because the general matching logic there
>> can break down in other ways, too. For example, filtering libclang_rt.*
>> will cause Clang builds that pull in sanitizers, e.g. memory sanitizer
>> or UBsan, which both require libclang_rt.msan-... and
>> libclang_tr.ubsan_... to be linked to break on e.g. Linux.
> That was added for this:
>
> * https://gitlab.kitware.com/cmake/cmake/issues/16194
> * https://gitlab.kitware.com/cmake/cmake/merge_requests/37
I see, thanks. In this case it's certainly better to keep it in there.
> Thanks,
> -Brad
Thanks,
Chris
-- 

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, master, updated. v3.8.1-1042-ga832508

2017-05-04 Thread Kitware Robot
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  a83250880ad511d92d96bfd860873b9c79c0f462 (commit)
   via  71595858b83b37bc855028b5eefaa0dfcc94a511 (commit)
   via  ef9c9c92f5b5fcb48dc0713fb15dfad9c3929dfe (commit)
   via  b888104e44b48628eecfb56e8b74704c04b44f5e (commit)
   via  9c13e8eb6fcc249afaf905d67e24b63884c4aa2f (commit)
   via  01cd88c0e5e3388c2abf67e259c81e1e6fdc5db2 (commit)
  from  ec526768ac5f1e00a39075cd07fd93cffa1f1818 (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=a83250880ad511d92d96bfd860873b9c79c0f462
commit a83250880ad511d92d96bfd860873b9c79c0f462
Merge: 7159585 b888104
Author: Brad King 
AuthorDate: Thu May 4 14:31:39 2017 +
Commit: Kitware Robot 
CommitDate: Thu May 4 10:31:47 2017 -0400

Merge topic 'FindOpenCL-AMDAPPSDKROOT'

b888104e FindOpenCL: add AMDAPPSDKROOT into paths for OpenCL library

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71595858b83b37bc855028b5eefaa0dfcc94a511
commit 71595858b83b37bc855028b5eefaa0dfcc94a511
Merge: ef9c9c9 9c13e8e
Author: Brad King 
AuthorDate: Thu May 4 14:31:22 2017 +
Commit: Kitware Robot 
CommitDate: Thu May 4 10:31:29 2017 -0400

Merge topic 'cpackifw-part-refactoring'

9c13e8eb CPackIFW: Refactor out some commonly used code

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef9c9c92f5b5fcb48dc0713fb15dfad9c3929dfe
commit ef9c9c92f5b5fcb48dc0713fb15dfad9c3929dfe
Merge: ec52676 01cd88c
Author: Brad King 
AuthorDate: Thu May 4 14:30:57 2017 +
Commit: Kitware Robot 
CommitDate: Thu May 4 10:31:05 2017 -0400

Merge topic 'remove-top-level-xcode-groups'

01cd88c0 Xcode: Remove the top-level Sources and Resources groups

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b888104e44b48628eecfb56e8b74704c04b44f5e
commit b888104e44b48628eecfb56e8b74704c04b44f5e
Author: Jeremy Tellaa 
AuthorDate: Wed May 3 14:33:01 2017 +0200
Commit: Brad King 
CommitDate: Wed May 3 11:53:25 2017 -0400

FindOpenCL: add AMDAPPSDKROOT into paths for OpenCL library

This path was only looked up for windows.  The AMD SDK also exists for
Linux, and we may want to use the OpenCL library for there.

diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake
index 3eca5e1..de78e7e 100644
--- a/Modules/FindOpenCL.cmake
+++ b/Modules/FindOpenCL.cmake
@@ -117,7 +117,11 @@ if(WIN32)
   endif()
 else()
   find_library(OpenCL_LIBRARY
-NAMES OpenCL)
+NAMES OpenCL
+  ENV AMDAPPSDKROOT
+PATH_SUFFIXES
+  lib/x86_64
+  lib/x64)
 endif()
 
 set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c13e8eb6fcc249afaf905d67e24b63884c4aa2f
commit 9c13e8eb6fcc249afaf905d67e24b63884c4aa2f
Author: Konstantin Podsvirov 
AuthorDate: Thu Apr 27 23:51:00 2017 +0300
Commit: Brad King 
CommitDate: Wed May 3 11:32:05 2017 -0400

CPackIFW: Refactor out some commonly used code

Move common used code to new cmCPackIFWCommon base class.

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 1ea75bf..40403ca 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -867,10 +867,6 @@ set(CPACK_SRCS
   CPack/cmCPackGenerator.cxx
   CPack/cmCPackLog.cxx
   CPack/cmCPackNSISGenerator.cxx
-  CPack/IFW/cmCPackIFWPackage.cxx
-  CPack/IFW/cmCPackIFWInstaller.cxx
-  CPack/IFW/cmCPackIFWRepository.cxx
-  CPack/IFW/cmCPackIFWGenerator.cxx
   CPack/cmCPackSTGZGenerator.cxx
   CPack/cmCPackTGZGenerator.cxx
   CPack/cmCPackTXZGenerator.cxx
@@ -879,6 +875,19 @@ set(CPACK_SRCS
   CPack/cmCPackZIPGenerator.cxx
   CPack/cmCPack7zGenerator.cxx
   )
+# CPack IFW generator
+set(CPACK_SRCS ${CPACK_SRCS}
+  CPack/IFW/cmCPackIFWCommon.cxx
+  CPack/IFW/cmCPackIFWCommon.h
+  CPack/IFW/cmCPackIFWGenerator.cxx
+  CPack/IFW/cmCPackIFWGenerator.h
+  CPack/IFW/cmCPackIFWInstaller.cxx
+  CPack/IFW/cmCPackIFWInstaller.h
+  CPack/IFW/cmCPackIFWPackage.cxx
+  CPack/IFW/cmCPackIFWPackage.h
+  CPack/IFW/cmCPackIFWRepository.cxx
+  CPack/IFW/cmCPackIFWRepository.h
+  )
 
 if(CYGWIN)
   set(CPACK_SRCS ${CPACK_SRCS}
diff --git 

Re: [CMake] CPack not detecting pkgbuild or product build

2017-05-04 Thread Robert Maynard
Hi,

By default the NSIS generator is enabled.

On Wed, May 3, 2017 at 6:39 PM, Ayla Khan  wrote:

> That worked - thank you! Do I need to add NSIS manually for Windows
> installers as well? It looks like CMake finds NSIS without any difficulty
> but I’d rather be sure.
>
> Thanks,
>
> Ayla
>
> On May 3, 2017, at 2:56 PM, Robert Maynard 
> wrote:
>
> You will need to append the productbuild type to you CPACK_GENERATOR so
> it would look like SET(CPACK_GENERATOR "productbuild;STGZ;TGZ")
>
> On Wed, May 3, 2017 at 4:14 PM, Ayla Khan  wrote:
>
>> Thank you Robert. The CPACK_GENERATOR variable is currently set to
>> “STGZ;TGZ”. When I installed Xcode, I made sure using xcode-select that the
>> usual command line tools were installed. I can find productbuild in my
>> PATH, but CPACK_BINARY_PRODUCTBUILD is off in CPackConfig.cmake. Do I need
>> to explicitly set CPACK_BINARY_PRODUCTBUILD in my CMakeLists.txt, or do I
>> append a type for packages to CPACK_GENERATOR? I assumed CPACK_GENERATOR
>> was generated automatically.
>>
>> Also, I’ve been working with Xcode 8 on OS X 10.11.6, and CPack is
>> ignoring productbuild completely even if I set it using the generator flag.
>> Command line tools were also set up using xcode-select.
>>
>> Thanks,
>>
>> Ayla
>>
>> > On May 3, 2017, at 1:12 PM, Robert Maynard 
>> wrote:
>> >
>> > Hi Ayla,
>> >
>> > The packages that are built when executing "make package" is determined
>> by the variable "CPACK_GENERATOR" inside your CPackConfig.cmake ( generally
>> located in the root of your build directory as it is configured ).
>> >
>> >
>> > On Fri, Apr 7, 2017 at 3:44 PM, Ayla Khan  wrote:
>> > I’m trying to build a Mac OS X installer package on 10.10.5 using Xcode
>> 7.2 tools with the CPack that ships with CMake 3.7.2. I can generate a
>> package from the CMake build directory if I call cpack directly on the
>> command line with -G productbuild, but not through the CMake build using
>> make package. Is there a CPack setting I need or some other build
>> configuration information? Is the Xcode version too old?
>> >
>> > Thanks,
>> >
>> > Ayla
>> > --
>> >
>> > 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
>> >
>>
>>
>
>
-- 

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] When Ninja byproduct is a directory causes `clean` target to fail.

2017-05-04 Thread Dan Liew
Hi,

I recently added support to a project to build its API documentation [1].

The documentation is generated by doxygen.
I used `add_custom_command()` to run doxygen and I use `BYPRODUCTS` to
specify the output directory that will be generated by doxygen in the
hope that this would tell ninja to remove it when the `clean` target
is run.

However this doesn't work because ninja complains that the directory
isn't empty.
Is `BYPRODUCTS` not supposed to be used with directories, or is this a bug?


[1] 
https://github.com/Z3Prover/z3/blob/a9d6ef68f02d636d9628a52a257d968a13321752/contrib/cmake/doc/CMakeLists.txt#L59

Thanks,
Dan.
-- 

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] Circular dependencies with Ninja, not with Unix Makefiles

2017-05-04 Thread Ignacio Fernández Galván via CMake

Hello,

I have a project where circular dependencies are generated when I use 
the Ninja generator, but not the default Unix Makefiles. I could create 
a minimal test like this:


$ cat CMakeLists.txt
add_subdirectory (ext ${PROJECT_BINARY_DIR}/ext)

$ cat ext/CMakeLists.txt
set (OUT ${CMAKE_CURRENT_LIST_DIR})

add_custom_command (OUTPUT ${OUT}/foo
COMMAND touch ${OUT}/foo
)

add_custom_target (foo ALL
DEPENDS ${OUT}/foo
)

add_custom_command (TARGET foo
POST_BUILD
COMMAND cp ${OUT}/foo ${CMAKE_BINARY_DIR}/foo
)

$ touch ext/bar

$ cmake -G Ninja .
[...]

$ ninja
ninja: warning: multiple rules generate ext/foo. builds involving this 
target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: error: dependency cycle: ext/foo -> ext/CMakeFiles/foo.util -> 
ext/CMakeFiles/foo -> ext/foo


I used a freshly compiled CMake 3.8 and the latest binary ninja from 
https://github.com/Kitware/ninja/releases.


Ignacio
--

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] DLL handling under CMake

2017-05-04 Thread lectem
I managed to get it working by using an intermediate script.
One might want to generate the script instead of using the « RUN_IT » variable 
trick.
This was only tested on Windows, but seems to work fine.
Put the following code in a xx.cmake file, include it from your 
CMakeLists.txt and enjoy.


# This is a helper script to run BundleUtilities fixup_bundle as postbuild
# for a target. The primary use case is to copy .DLLs to the build directory for
# the Windows platform. It allows generator expressions to be used to determine
# the binary location
#
# Usage : run_fixup(TARGET LIBS DIRS)
# - TARGET : A cmake target
# - See fixup_bundle for LIBS and DIRS arguments

if(RUN_IT)
# Script ran by the add_custom_command
include(BundleUtilities)
fixup_bundle("${TO_FIXUP_FILE}" "${TO_FIXUP_LIBS}" "${TO_FIXUP_DIRS}")
# End of script ran by the add_custom_command
else()

set(THIS_FILE ${CMAKE_CURRENT_LIST_FILE})
message(${THIS_FILE})
function(run_fixup _target _libs _dirs)
message(${THIS_FILE})
add_custom_command(
TARGET ${_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -DRUN_IT:BOOL=ON 
-DTO_FIXUP_FILE=$ -DTO_FIXUP_LIBS=${_libs} 
-DTO_FIXUP_DIRS=${_dirs}  -P ${THIS_FILE}
COMMENT "Fixing up dependencies for ${_target}"
VERBATIM
)

endfunction()

endif()


De : Clément Gregoire
Envoyé le :jeudi 4 mai 2017 08:37
À : Hendrik Sattler; Louis-Paul CORDIER; Cmake Mailing List
Objet :Re: [CMake] DLL handling under CMake

I'd also be interested in this. I saw an old mail in the ML about this, but it 
seems fixup_bundle is old and cant use generator expressions, making it hard to 
use (I don't want to hardcode the executable path).

Do you have a sample for this ?
CMake would really benefit from having those features made more accessible 
instead of everyone having to write its own script 
Le sam. 29 avr. 2017 22:10, Hendrik Sattler  a écrit :


Am 27. April 2017 10:43:50 MESZ schrieb Louis-Paul CORDIER 
:
>This steps are tedious and I'm wondering if there is a mechanism that
>exists or that have to be imagined to make the DLL nightmare end.

I use BundleUtilities to achieve the copying of DLL files to the installation 
directory. The main problem for this is to enumerate the needed directories.

I use the same for copying DLL files to the output directory to ease debugging.

The advantage is the inspection of the exe for really needed DLL files. This 
AUTOMATICALLY handles the case debug vs. release.

HS

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
--

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

-- 

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] DLL handling under CMake

2017-05-04 Thread Clément Gregoire
I'd also be interested in this. I saw an old mail in the ML about this, but
it seems fixup_bundle is old and cant use generator expressions, making it
hard to use (I don't want to hardcode the executable path).

Do you have a sample for this ?
CMake would really benefit from having those features made more accessible
instead of everyone having to write its own script

Le sam. 29 avr. 2017 22:10, Hendrik Sattler  a
écrit :

>
>
> Am 27. April 2017 10:43:50 MESZ schrieb Louis-Paul CORDIER <
> lp.cord...@dynamixyz.com>:
> >This steps are tedious and I'm wondering if there is a mechanism that
> >exists or that have to be imagined to make the DLL nightmare end.
>
> I use BundleUtilities to achieve the copying of DLL files to the
> installation directory. The main problem for this is to enumerate the
> needed directories.
>
> I use the same for copying DLL files to the output directory to ease
> debugging.
>
> The advantage is the inspection of the exe for really needed DLL files.
> This AUTOMATICALLY handles the case debug vs. release.
>
> HS
>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.
> --
>
> 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
>
-- 

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