[Cmake-commits] CMake branch, master, updated. v3.6.0-452-g811bcf5

2016-07-20 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  811bcf543ceb04f72d0127ac42b7b198be4791dc (commit)
  from  df14a98e9c4af316cd5e75d6af8cc7b75da2db8f (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=811bcf543ceb04f72d0127ac42b7b198be4791dc
commit 811bcf543ceb04f72d0127ac42b7b198be4791dc
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Thu Jul 21 00:01:03 2016 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Thu Jul 21 00:01:03 2016 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c377549..2e503f9 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 6)
-set(CMake_VERSION_PATCH 20160720)
+set(CMake_VERSION_PATCH 20160721)
 #set(CMake_VERSION_RC 1)

---

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
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] skip install of subdirectory

2016-07-20 Thread Tiago Macarios
Hi Alan,

Thanks a lot! Yeah I was thinking about something along those lines, but i
was wondering if there is a solution that does not involve modifying the
submodules.

On Wed, Jul 20, 2016 at 12:09 PM, Alan W. Irwin 
wrote:

> On 2016-07-20 11:02-0700 Tiago Macarios wrote:
>
> Hi,
>>
>> I have a project which uses git submodules to manage it's dependencies.
>> Right now we want to add a installer to it, problem we have is that some
>> of
>> the dependencies have their own "install" directives. Is there a way to
>> ignore a project install command?
>>
>> Long version case it is unclear:
>>
>> main project
>>   submodule - has a install directive
>>   myCode - actual code, links statically to submodule above
>>
>> I would like to only issue the install of myCode. is there a way to tell
>> cmake or cpack to ignore "submodule" install directives?
>>
>
> Hi Tiago:
>
> You could brute force it by surrounding each install directive in
> submodule by
>
> if(INSTALL_SUBMODULE)
> 
> endif(INSTALL_SUBMODULE)
>
> Then add
>
> option(INSTALL_SUBMODULE, "Install submodule?" OFF)
>
> to your top-level CMakeLists.txt file.
>
> Then because of that OFF, by default users would not install
> submodule, but if users desired that install, they could specify the
> -DINSTALL_SUBMODULE=ON option on the cmake command line.  Or you could
> choose to default to ON.
>
> Note, I have characterized the above as brute force, but in fact the
> method is completely flexible, and most mature CMake projects use this
> kind of option-based method a lot.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
>
-- 

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 clang-tidy with cmake 3.6.0

2016-07-20 Thread Bill Hoffman

On 7/20/2016 4:02 PM, Robert Maynard wrote:

I believe the correct form is:

set_target_properties(example PROPERTIES CXX_CLANG_TIDY
"${path_to_tidy} -some -args")

No, that won't work.

You want it to be a semi-colon separated list of arguments.  Not space 
separated.


https://cmake.org/cmake/help/v3.6/prop_tgt/LANG_CLANG_TIDY.html#prop_tgt:_CLANG_TIDY


In a ctest script it would be done something like this:

set(DASHBOARD_CLANG_TIDAY
"/path/to/clang-tidy" "-arg1" "-arg2")


Then put this in the cache:
"CMAKE_CXX_CLANG_TIDY:STRING=${DASHBOARD_CLANG_TIDY}"

-Bill
--

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] Why is target installation done in 2 separate steps?

2016-07-20 Thread Tamás Kenéz
I believe you can install and assign multiple targets in different
subdirectories to a single export:

/foo/CMakeLists.txt:
install(TARGETS foo EXPORT mylib-targets ...)

/bar/CMakeLists.txt
install(TARGETS bar EXPORT mylib-targets ...)

/CMakeLists.txt
install(EXPORT mylib-targets ...)

On Mon, Jul 11, 2016 at 12:26 AM, Robert Dailey 
wrote:

> Documentation states, that to export a file that imports your targets,
> you must do roughly:
>
> install(TARGETS fubar EXPORT fubar-targets)
> install(EXPORT fubar-targets DESTINATION lib/cmake/fubar)
>
> Why is this done in two steps? Based on reading the install()
> documentation, I don't see how the install(TARGETS) command is useful
> without the corresponding install(EXPORT).
>
> Can someone explain why these are separate commands instead of 1
> complete command? Thanks in advance.
> --
>
> 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] Using clang-tidy with cmake 3.6.0

2016-07-20 Thread Robert Maynard
I believe the correct form is:

set_target_properties(example PROPERTIES CXX_CLANG_TIDY
"${path_to_tidy} -some -args")

On Wed, Jul 20, 2016 at 9:02 AM, Theodoros Theodoridis
 wrote:
> Hello everyone,
>
> I am trying to use the new _CLANG_TIDY property but I can't figure
> out the proper syntax. How can I specify the checks I want?
>
> I tried setting the checks in set_target_properties(target PROPERTIES
> CXX_CLANG_TIDY "checks to be performed") but cmake would complain with
> "wrong number of arguments".
>
> I would appreciate any help.
>
> Thanks,
> Theodor
>
> --
>
> 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-commits] CMake branch, next, updated. v3.6.0-936-g41da930

2016-07-20 Thread Brad King
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  41da93010df18cb1ecec68c9334305d1bdfb77f6 (commit)
   via  c7a7c655f0433c7ca4ea6ec5ce78b7f17cbf5140 (commit)
   via  34ba5c53481e7f2101dafa735504cb98f94ec6db (commit)
  from  927ab805e5a07d266b272e56af52835f52f2c64f (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=41da93010df18cb1ecec68c9334305d1bdfb77f6
commit 41da93010df18cb1ecec68c9334305d1bdfb77f6
Merge: 927ab80 c7a7c65
Author: Brad King 
AuthorDate: Wed Jul 20 15:18:13 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 15:18:13 2016 -0400

Merge topic 'makefile-response-files' into next

c7a7c655 Makefile: Avoid link line object list lengths nearing system limits
34ba5c53 Makefile: Factor out response file checks into common helper


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7a7c655f0433c7ca4ea6ec5ce78b7f17cbf5140
commit c7a7c655f0433c7ca4ea6ec5ce78b7f17cbf5140
Author: Brad King 
AuthorDate: Wed Jul 20 14:57:18 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 15:09:42 2016 -0400

Makefile: Avoid link line object list lengths nearing system limits

Use response files for object file lists that approach the scale of the
system `ARG_MAX` limit.

Fixes #16206.

diff --git a/Source/cmMakefileTargetGenerator.cxx 
b/Source/cmMakefileTargetGenerator.cxx
index abf50d6..e12fc09 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -31,6 +31,10 @@
 
 #include 
 
+#ifndef _WIN32
+#include 
+#endif
+
 cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
   : cmCommonTargetGenerator(target)
   , OSXBundleGenerator(CM_NULLPTR)
@@ -1447,6 +1451,15 @@ void cmMakefileTargetGenerator::CreateLinkScript(
   makefile_depends.push_back(linkScriptName);
 }
 
+static size_t calculateCommandLineLengthLimit()
+{
+#if defined(_SC_ARG_MAX)
+  return ((size_t)sysconf(_SC_ARG_MAX)) - 1000;
+#else
+  return 0;
+#endif
+}
+
 bool cmMakefileTargetGenerator::CheckUseResponseFileForObjects(
   std::string const& l) const
 {
@@ -1459,6 +1472,32 @@ bool 
cmMakefileTargetGenerator::CheckUseResponseFileForObjects(
 }
   }
 
+  // Check for a system limit.
+  if (size_t const limit = calculateCommandLineLengthLimit()) {
+// Compute the total length of our list of object files with room
+// for argument separation and quoting.  This does not convert paths
+// relative to START_OUTPUT like the final list will be, so the actual
+// list will likely be much shorter than this.  However, in the worst
+// case all objects will remain as absolute paths.
+size_t length = 0;
+for (std::vector::const_iterator i = this->Objects.begin();
+ i != this->Objects.end(); ++i) {
+  length += i->size() + 3;
+}
+for (std::vector::const_iterator i =
+   this->ExternalObjects.begin();
+ i != this->ExternalObjects.end(); ++i) {
+  length += i->size() + 3;
+}
+
+// We need to guarantee room for both objects and libraries, so
+// if the objects take up more than half then use a response file
+// for them.
+if (length > (limit / 2)) {
+  return true;
+}
+  }
+
   // We do not need a response file for objects.
   return false;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34ba5c53481e7f2101dafa735504cb98f94ec6db
commit 34ba5c53481e7f2101dafa735504cb98f94ec6db
Author: Brad King 
AuthorDate: Wed Jul 20 14:39:38 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 15:00:56 2016 -0400

Makefile: Factor out response file checks into common helper

Factor CMAKE__USE_RESPONSE_FILE_FOR_{OBJECTS,LIBRARIES} lookup out
into a common helper.  Use a separate helper for each because more
specific logic may be added to each later.

diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx 
b/Source/cmMakefileExecutableTargetGenerator.cxx
index 8730ccd..3b8bf5a 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -277,27 +277,10 @@ void 
cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
 }
   }
 
-  // Select whether to use a response file for objects.
-  bool useResponseFileForObjects = false;
-  {
-std::string responseVar = "CMAKE_";
-responseVar += linkLanguage;
-responseVar += "_USE_RESPONSE_FILE_FOR_OBJECTS";
-if (this->Makefile->IsOn(responseVar)) {
-

Re: [CMake] skip install of subdirectory

2016-07-20 Thread Alan W. Irwin

On 2016-07-20 11:02-0700 Tiago Macarios wrote:


Hi,

I have a project which uses git submodules to manage it's dependencies.
Right now we want to add a installer to it, problem we have is that some of
the dependencies have their own "install" directives. Is there a way to
ignore a project install command?

Long version case it is unclear:

main project
  submodule - has a install directive
  myCode - actual code, links statically to submodule above

I would like to only issue the install of myCode. is there a way to tell
cmake or cpack to ignore "submodule" install directives?


Hi Tiago:

You could brute force it by surrounding each install directive in
submodule by

if(INSTALL_SUBMODULE)

endif(INSTALL_SUBMODULE)

Then add

option(INSTALL_SUBMODULE, "Install submodule?" OFF)

to your top-level CMakeLists.txt file.

Then because of that OFF, by default users would not install
submodule, but if users desired that install, they could specify the
-DINSTALL_SUBMODULE=ON option on the cmake command line.  Or you could
choose to default to ON.

Note, I have characterized the above as brute force, but in fact the
method is completely flexible, and most mature CMake projects use this
kind of option-based method a lot.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

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] skip install of subdirectory

2016-07-20 Thread Tiago Macarios
Hi,

I have a project which uses git submodules to manage it's dependencies.
Right now we want to add a installer to it, problem we have is that some of
the dependencies have their own "install" directives. Is there a way to
ignore a project install command?

Long version case it is unclear:

main project
   submodule - has a install directive
   myCode - actual code, links statically to submodule above

I would like to only issue the install of myCode. is there a way to tell
cmake or cpack to ignore "submodule" install directives?

Tiago
-- 

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] object-libraries and compile-dependencies to other target

2016-07-20 Thread Robert Maynard
Hi Patrick,

Can you provide a simple example of what you are trying to do, and
where it is failing?

On Wed, Jul 20, 2016 at 8:29 AM, Patrick Boettcher
 wrote:
> Hi list,
>
> I'm using an object-library to generate a list of .o-files instead of
> archives which I use to link into several executable.
>
> Even though it is only an object-library it has compile-dependencies to
> other targets - this includes include-paths, compile-definitions and
> compile-features.
>
> I can't (or I don't know how) use target_link_libraries() with my
> object-library.
>
> What can I do to make it work? I'm exploring generator-expressions, but
> this seems redundant as I need to list all dependencies again.
>
> best regards,
> --
> Patrick.
>
> --
>
> 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-commits] CMake branch, next, updated. v3.6.0-933-g927ab80

2016-07-20 Thread Brad King
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  927ab805e5a07d266b272e56af52835f52f2c64f (commit)
   via  554e8273ee4a697420a3f427361f15c97813d590 (commit)
  from  467a182d46a3ff7caf822f287f947ce9ad214cde (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=927ab805e5a07d266b272e56af52835f52f2c64f
commit 927ab805e5a07d266b272e56af52835f52f2c64f
Merge: 467a182 554e827
Author: Brad King 
AuthorDate: Wed Jul 20 13:36:06 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 13:36:06 2016 -0400

Merge topic 'windows-export-all-fix-objlib' into next

554e8273 VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object libraries


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=554e8273ee4a697420a3f427361f15c97813d590
commit 554e8273ee4a697420a3f427361f15c97813d590
Author: Brad King 
AuthorDate: Wed Jul 20 11:26:55 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 13:29:14 2016 -0400

VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object libraries

Teach Visual Studio generators to include object files from object
libraries in the list of objects whose symbols are to be exported.
The Makefile and Ninja generators already did this.  Update the
test to cover this case.

Reported-by: Bertrand Bellenot 

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index 1bec581..7bdd74d 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -827,6 +827,7 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
 cmSystemTools::Error("could not open ", objs_file.c_str());
 return;
   }
+  std::vector objs;
   for (std::vector::const_iterator it =
  objectSources.begin();
it != objectSources.end(); ++it) {
@@ -836,6 +837,12 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
 // It must exist because we populated the mapping just above.
 assert(!map_it->second.empty());
 std::string objFile = obj_dir + map_it->second;
+objs.push_back(objFile);
+  }
+  gt->UseObjectLibraries(objs, configName);
+  for (std::vector::iterator it = objs.begin(); it != objs.end();
+   ++it) {
+std::string objFile = *it;
 // replace $(ConfigurationName) in the object names
 cmSystemTools::ReplaceString(objFile, this->GetCMakeCFGIntDir(),
  configName.c_str());
diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake 
b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
index bdddb38..dd74a4d 100644
--- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake
+++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
@@ -2,7 +2,8 @@ project(autoexport)
 set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${autoexport_BINARY_DIR}/bin)
 add_subdirectory(sub)
-add_library(autoexport SHARED hello.cxx world.cxx foo.c)
+add_library(objlib OBJECT objlib.c)
+add_library(autoexport SHARED hello.cxx world.cxx foo.c 
$)
 
 add_executable(say say.cxx)
 if(MSVC)
diff --git a/Tests/RunCMake/AutoExportDll/objlib.c 
b/Tests/RunCMake/AutoExportDll/objlib.c
new file mode 100644
index 000..54a9658
--- /dev/null
+++ b/Tests/RunCMake/AutoExportDll/objlib.c
@@ -0,0 +1,4 @@
+int objlib()
+{
+  return 7;
+}
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx 
b/Tests/RunCMake/AutoExportDll/say.cxx
index 9ca8d31..e966b1f 100644
--- a/Tests/RunCMake/AutoExportDll/say.cxx
+++ b/Tests/RunCMake/AutoExportDll/say.cxx
@@ -11,6 +11,7 @@ extern "C" {
 int WINAPI foo();
 // test regular C
 int bar();
+int objlib();
 }
 
 // test c++ functions
@@ -39,6 +40,7 @@ int main()
   foo();
   printf("\n");
   bar();
+  objlib();
   printf("\n");
   return 0;
 }

---

Summary of changes:
 Source/cmGlobalVisualStudioGenerator.cxx  |7 +++
 Tests/RunCMake/AutoExportDll/AutoExport.cmake |3 ++-
 Tests/RunCMake/AutoExportDll/objlib.c |4 
 Tests/RunCMake/AutoExportDll/say.cxx  |2 ++
 4 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 Tests/RunCMake/AutoExportDll/objlib.c


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.0-929-g5617062

2016-07-20 Thread Brad King
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  5617062f3a26b09b45b1ea1887e746420c4bed20 (commit)
   via  e263196db9415eaee607a4cbbccd137ae9788635 (commit)
  from  91ec400aec135c60e6d22b6c17405a88cc352de9 (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=5617062f3a26b09b45b1ea1887e746420c4bed20
commit 5617062f3a26b09b45b1ea1887e746420c4bed20
Merge: 91ec400 e263196
Author: Brad King 
AuthorDate: Wed Jul 20 13:12:16 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 13:12:16 2016 -0400

Merge topic 'ninja-target-deps' into next

e263196d fixup! Ninja: Fix inter-target order-only dependencies of custom 
commands


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e263196db9415eaee607a4cbbccd137ae9788635
commit e263196db9415eaee607a4cbbccd137ae9788635
Author: Brad King 
AuthorDate: Wed Jul 20 13:10:35 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 13:10:35 2016 -0400

fixup! Ninja: Fix inter-target order-only dependencies of custom commands

diff --git a/Source/cmGlobalNinjaGenerator.cxx 
b/Source/cmGlobalNinjaGenerator.cxx
index a2e0a2e..51175c7 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -920,7 +920,7 @@ void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
   }
   std::set const& targets = i->second;
   cmNinjaDeps outs;
-  for (std::set::iterator ti = targets.begin();
+  for (std::set::const_iterator ti = targets.begin();
ti != targets.end(); ++ti) {
 this->AppendTargetOutputs(*ti, outs);
   }

---

Summary of changes:
 Source/cmGlobalNinjaGenerator.cxx |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.0-931-g467a182

2016-07-20 Thread Brad King
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  467a182d46a3ff7caf822f287f947ce9ad214cde (commit)
   via  1296a0eadae05acb03f1313242f937b785a9bcc3 (commit)
  from  5617062f3a26b09b45b1ea1887e746420c4bed20 (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=467a182d46a3ff7caf822f287f947ce9ad214cde
commit 467a182d46a3ff7caf822f287f947ce9ad214cde
Merge: 5617062 1296a0e
Author: Brad King 
AuthorDate: Wed Jul 20 13:12:40 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 13:12:40 2016 -0400

Merge topic 'ninja-target-deps' into next

1296a0ea Ninja: Fix inter-target order-only dependencies of custom commands


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1296a0eadae05acb03f1313242f937b785a9bcc3
commit 1296a0eadae05acb03f1313242f937b785a9bcc3
Author: Brad King 
AuthorDate: Wed Jul 20 09:32:32 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 13:12:24 2016 -0400

Ninja: Fix inter-target order-only dependencies of custom commands

Custom command dependencies are followed for each target's source files
and add their transitive closure to the corresponding target.  This
means that when a custom command in one target has a dependency on a
custom command in another target, both will appear in the dependent
target's sources.  For the Makefile, VS IDE, and Xcode generators this
is not a problem because each target gets its own independent build
system that is evaluated in target dependency order.  By the time the
dependent target is built the custom command that belongs to one of its
dependencies will already have been brought up to date.

For the Ninja generator we need to generate a monolithic build system
covering all targets so we can have only one copy of a custom command.
This means that we need to reconcile the target-level ordering
dependencies from its appearance in multiple targets to include only the
least-dependent common set.  This is done by computing the set
intersection of the dependencies of all the targets containing a custom
command.  However, we previously included only the direct dependencies
so any target-level dependency not directly added to all targets into
which a custom command propagates was discarded.

Fix this by computing the transitive closure of dependencies for each
target and then intersecting those sets.  That will get the common set
of dependencies.  Also add a test to cover a case in which the
incorrectly dropped target ordering dependencies would fail.

diff --git a/Source/cmGlobalNinjaGenerator.cxx 
b/Source/cmGlobalNinjaGenerator.cxx
index 91f08e6..51175c7 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -493,6 +493,8 @@ void cmGlobalNinjaGenerator::Generate()
   this->OpenBuildFileStream();
   this->OpenRulesFileStream();
 
+  this->TargetDependsClosures.clear();
+
   this->InitOutputPathPrefix();
   this->TargetAll = this->NinjaOutputPath("all");
   this->CMakeCacheFile = this->NinjaOutputPath("CMakeCache.txt");
@@ -905,6 +907,42 @@ void cmGlobalNinjaGenerator::AppendTargetDepends(
   }
 }
 
+void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
+  cmGeneratorTarget const* target, cmNinjaDeps& outputs)
+{
+  TargetDependsClosureMap::iterator i =
+this->TargetDependsClosures.find(target);
+  if (i == this->TargetDependsClosures.end()) {
+TargetDependsClosureMap::value_type e(
+  target, std::set());
+i = this->TargetDependsClosures.insert(e).first;
+this->ComputeTargetDependsClosure(target, i->second);
+  }
+  std::set const& targets = i->second;
+  cmNinjaDeps outs;
+  for (std::set::const_iterator ti = targets.begin();
+   ti != targets.end(); ++ti) {
+this->AppendTargetOutputs(*ti, outs);
+  }
+  std::sort(outs.begin(), outs.end());
+  outputs.insert(outputs.end(), outs.begin(), outs.end());
+}
+
+void cmGlobalNinjaGenerator::ComputeTargetDependsClosure(
+  cmGeneratorTarget const* target, std::set& depends)
+{
+  cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target);
+  for (cmTargetDependSet::const_iterator i = targetDeps.begin();
+   i != targetDeps.end(); ++i) {
+if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) {
+  continue;
+}
+if (depends.insert(*i).second) {
+  this->ComputeTargetDependsClosure(*i, depends);
+}
+  }
+}
+
 void cmGlobalNinjaGenerator::AddTargetAlias(const std::string& alias,

[Cmake-commits] CMake branch, next, updated. v3.6.0-927-g91ec400

2016-07-20 Thread Brad King
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  91ec400aec135c60e6d22b6c17405a88cc352de9 (commit)
   via  8aa97fba9eb5d54d7141895c1db1ed8afe820d75 (commit)
  from  d2a5bf08e9c46931b79307ed616c8ac4a61ae09d (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=91ec400aec135c60e6d22b6c17405a88cc352de9
commit 91ec400aec135c60e6d22b6c17405a88cc352de9
Merge: d2a5bf0 8aa97fb
Author: Brad King 
AuthorDate: Wed Jul 20 11:40:16 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 11:40:16 2016 -0400

Merge topic 'vs-alternate-RootNamespace' into next

8aa97fba VS: Handle VS_GLOBAL_RootNamespace special case


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8aa97fba9eb5d54d7141895c1db1ed8afe820d75
commit 8aa97fba9eb5d54d7141895c1db1ed8afe820d75
Author: Benjamin Ballet 
AuthorDate: Wed Jul 20 17:10:07 2016 +0200
Commit: Brad King 
CommitDate: Wed Jul 20 11:34:47 2016 -0400

VS: Handle VS_GLOBAL_RootNamespace special case

Although we provide a `VS_GLOBAL_ROOTNAMESPACE` option to both set
the `RootNamespace` value and reference it, some users may try to
set `VS_GLOBAL_RootNamespace` to set `RootNamespace` as a variant
of the `VS_GLOBAL_` property.  In this case we still
need to add the reference to `$(RootNamespace)`.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx 
b/Source/cmVisualStudio10TargetGenerator.cxx
index 29459db..7624f78 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -531,7 +531,9 @@ void 
cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
  this->Configurations.begin();
i != this->Configurations.end(); ++i) {
 this->WritePlatformConfigTag("LogicalName", i->c_str(), 3);
-if (this->GeneratorTarget->GetProperty("VS_GLOBAL_ROOTNAMESPACE")) {
+if (this->GeneratorTarget->GetProperty("VS_GLOBAL_ROOTNAMESPACE") ||
+// Handle variant of VS_GLOBAL_ for RootNamespace.
+this->GeneratorTarget->GetProperty("VS_GLOBAL_RootNamespace")) {
   (*this->BuildFileStream) << "$(RootNamespace).";
 }
 (*this->BuildFileStream) << "%(Filename)";

---

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx |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


[CMake] [CMAKE] Call macro in CMake as last step

2016-07-20 Thread SOUMAGNE Jeremy
Hi all,

I'm trying to emulate a custom global target (like the CMake install target).
The only that came through is by only writing commands in a global variable 
throughout the cmakelists and at the very end, the last line in the top 
cmakelists.txt does an include(final) to create the target with all the 
commands previously produced.

I would like to know if there is a way of doing this as the last step without 
the need to be called explicitly at the end of the CMakeLists.txt. To prevent 
all the developer to change their CMake to add this line.

I saw a similarly thread on stackoverflow, but I was wondering if since a 
better approach was implemented.

(link: 
http://www.google.fr/url?sa=t=j==s=web=3=rja=8=0ahUKEwi6xffHqoLOAhWFVRoKHQUBCH4QFgguMAI=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F15760580%2Fexecute-command-or-macro-in-cmake-as-last-step-before-configure-step-finishes=AFQjCNGHo0jkrpqw5vm7nx2_YzhJtRtenQ=bv.127521224,d.d2s)

Best regards,
jeremy
-- 

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-developers] patch VS2010 generator : handle VS_GLOBAL_RootNamespace as well as VS_GLOBAL_ROOTNAMESPACE

2016-07-20 Thread Benjamin Ballet via cmake-developers
Hi folks,

As user I'm currently working on migrating C++CLI projects to CMake.

I wasted a few hours because I used VS_GLOBAL_RootNamespace (a specialized
version of VS_GLOBAL_ property) instead of
VS_GLOBAL_ROOTNAMESPACE.

So here is a patch to save the next one from wasting those same hours.

In my opinion, VS_GLOBAL_ROOTNAMESPACE with VS_GLOBAL_PROJECT_TYPE and
VS_GLOBAL_KEYWORD should be tagged as deprecated and users should be
redirected to VS_GLOBAL_. It would be simpler.


-- 
*Benjamin BALLET*
Ingénieur R

*ACTIVISU*
19, rue Klock - 92110 Clichy
*> Standard Tél* :  01 44 69 37 37
*>* www.activisu.com


0001-VisualStudio10-generator-the-RootNamespace-property-.patch
Description: Binary data
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH v4] For consoles output on Windows use our own std::streambuf

2016-07-20 Thread Brad King
On 07/09/2016 10:12 PM, Dāvis Mosāns wrote:
>  int main(int ac, char const* const* av)
>  {
> +#if defined(_WIN32)
> +  // Replace streambuf so we can output Unicode to console
> +  cmsys::ConsoleBuf *cbufio = CM_NULLPTR;
> +  cmsys::ConsoleBuf *cbuferr = CM_NULLPTR;
> +  std::streambuf *coutbuf = std::cout.rdbuf();
> +  std::streambuf *cerrbuf = std::cerr.rdbuf();
> +  try {
> +cbufio = new cmsys::ConsoleBuf();
> +coutbuf = std::cout.rdbuf(cbufio);
> +cbuferr = new cmsys::ConsoleBuf(true);
> +cerrbuf = std::cerr.rdbuf(cbuferr);
> +  } catch (const std::runtime_error& ex) {
> +std::cerr << "Failed to create ConsoleBuf!" << std::endl
> +  << ex.what() << std::endl;
> +  };
> +#endif
...
> +#if defined(_WIN32)
> +  if (cbufio) {
> +delete cbufio;
> +std::cout.rdbuf(coutbuf);
> +  }
> +  if (cbuferr) {
> +delete cbuferr;
> +std::cerr.rdbuf(cerrbuf);
> +  }
> +#endif

Please add to KWSys ConsoleBuf a RAII-style helper to perform
the above steps.  Its constructor can take either std::cout
or std:cerr by reference.

Also, please add a test case for this to KWSys itself.  The
test should at least be able to compile and run.  Verification
that output looks right may need to be a manual step though.

Thanks,
-Brad

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH v4 2/4] Deprecate const char* SystemTools::GetEnv function

2016-07-20 Thread Brad King
On 07/07/2016 05:54 PM, Dāvis Mosāns wrote:
>  Source/kwsys/SystemTools.hxx.in | 14 --

Thanks.  Applied to KWSys first:

 http://review.source.kitware.com/21348

-Brad

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH v5 2/2] Add MinGW support for FStream

2016-07-20 Thread Brad King
On 07/18/2016 09:28 AM, Brad King wrote:
> Thanks.  I've added this and its parent commit to KWSys:
> 
>  http://review.source.kitware.com/21339

This is now in KWSys `master`.  I've updated it in CMake:

 KWSys 2016-07-19 (9d1dbd95)
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ef2b2b1

Thanks,
-Brad

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH v3 6/7] Use Windows version of Directory::Load for MinGW too

2016-07-20 Thread Brad King
On 07/06/2016 03:12 PM, Dāvis Mosāns wrote:
> Otherwise it would use POSIX functions which works only for ASCII paths.

Thanks.  Applied to KWSys first with minor tweaks:

 http://review.source.kitware.com/21349

-Brad

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH v4 3/4] Use SystemTools::GetEnv and HasEnv functions

2016-07-20 Thread Brad King
On 07/18/2016 10:00 AM, Brad King wrote:
> On 07/07/2016 05:54 PM, Dāvis Mosāns wrote:
>>  Source/kwsys/SystemTools.cxx| 38 
>> +++--
>>  Source/kwsys/testSystemTools.cxx|  9 ---
> 
> Applied to upstream KWSys first:
> 
>  http://review.source.kitware.com/21340

This is now in KWSys `master`.  I've updated it in CMake:

 KWSys 2016-07-18 (19732229)
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb7b5087

Thanks,
-Brad

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[Cmake-commits] CMake branch, next, updated. v3.6.0-925-gd2a5bf0

2016-07-20 Thread Brad King
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  d2a5bf08e9c46931b79307ed616c8ac4a61ae09d (commit)
   via  a488216886d67e7c964a5670f0cd0165575ba2bb (commit)
  from  b0f86b5f5abfb50a4c93ec93e2f9b82ea7e16733 (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=d2a5bf08e9c46931b79307ed616c8ac4a61ae09d
commit d2a5bf08e9c46931b79307ed616c8ac4a61ae09d
Merge: b0f86b5 a488216
Author: Brad King 
AuthorDate: Wed Jul 20 09:57:48 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 09:57:48 2016 -0400

Merge topic 'ninja-target-deps' into next

a4882168 Ninja: Fix inter-target order-only dependencies of custom commands


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a488216886d67e7c964a5670f0cd0165575ba2bb
commit a488216886d67e7c964a5670f0cd0165575ba2bb
Author: Brad King 
AuthorDate: Wed Jul 20 09:32:32 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 09:57:32 2016 -0400

Ninja: Fix inter-target order-only dependencies of custom commands

Custom command dependencies are followed for each target's source files
and add their transitive closure to the corresponding target.  This
means that when a custom command in one target has a dependency on a
custom command in another target, both will appear in the dependent
target's sources.  For the Makefile, VS IDE, and Xcode generators this
is not a problem because each target gets its own independent build
system that is evaluated in target dependency order.  By the time the
dependent target is built the custom command that belongs to one of its
dependencies will already have been brought up to date.

For the Ninja generator we need to generate a monolithic build system
covering all targets so we can have only one copy of a custom command.
This means that we need to reconcile the target-level ordering
dependencies from its appearance in multiple targets to include only the
least-dependent common set.  This is done by computing the set
intersection of the dependencies of all the targets containing a custom
command.  However, we previously included only the direct dependencies
so any target-level dependency not directly added to all targets into
which a custom command propagates was discarded.

Fix this by computing the transitive closure of dependencies for each
target and then intersecting those sets.  That will get the common set
of dependencies.  Also add a test to cover a case in which the
incorrectly dropped target ordering dependencies would fail.

diff --git a/Source/cmGlobalNinjaGenerator.cxx 
b/Source/cmGlobalNinjaGenerator.cxx
index 91f08e6..a2e0a2e 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -493,6 +493,8 @@ void cmGlobalNinjaGenerator::Generate()
   this->OpenBuildFileStream();
   this->OpenRulesFileStream();
 
+  this->TargetDependsClosures.clear();
+
   this->InitOutputPathPrefix();
   this->TargetAll = this->NinjaOutputPath("all");
   this->CMakeCacheFile = this->NinjaOutputPath("CMakeCache.txt");
@@ -905,6 +907,42 @@ void cmGlobalNinjaGenerator::AppendTargetDepends(
   }
 }
 
+void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
+  cmGeneratorTarget const* target, cmNinjaDeps& outputs)
+{
+  TargetDependsClosureMap::iterator i =
+this->TargetDependsClosures.find(target);
+  if (i == this->TargetDependsClosures.end()) {
+TargetDependsClosureMap::value_type e(
+  target, std::set());
+i = this->TargetDependsClosures.insert(e).first;
+this->ComputeTargetDependsClosure(target, i->second);
+  }
+  std::set const& targets = i->second;
+  cmNinjaDeps outs;
+  for (std::set::iterator ti = targets.begin();
+   ti != targets.end(); ++ti) {
+this->AppendTargetOutputs(*ti, outs);
+  }
+  std::sort(outs.begin(), outs.end());
+  outputs.insert(outputs.end(), outs.begin(), outs.end());
+}
+
+void cmGlobalNinjaGenerator::ComputeTargetDependsClosure(
+  cmGeneratorTarget const* target, std::set& depends)
+{
+  cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target);
+  for (cmTargetDependSet::const_iterator i = targetDeps.begin();
+   i != targetDeps.end(); ++i) {
+if ((*i)->GetType() == cmState::INTERFACE_LIBRARY) {
+  continue;
+}
+if (depends.insert(*i).second) {
+  this->ComputeTargetDependsClosure(*i, depends);
+}
+  }
+}
+
 void cmGlobalNinjaGenerator::AddTargetAlias(const std::string& alias,
  

[Cmake-commits] CMake branch, next, updated. v3.6.0-923-gb0f86b5

2016-07-20 Thread Brad King
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  b0f86b5f5abfb50a4c93ec93e2f9b82ea7e16733 (commit)
   via  7ec32a00d74bca7ff1a4873c8133b4811edc7bba (commit)
  from  abaec3872e181abb8d0757e06d431b6089805c11 (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=b0f86b5f5abfb50a4c93ec93e2f9b82ea7e16733
commit b0f86b5f5abfb50a4c93ec93e2f9b82ea7e16733
Merge: abaec38 7ec32a0
Author: Brad King 
AuthorDate: Wed Jul 20 09:19:31 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 09:19:31 2016 -0400

Merge topic 'bootstrap-msys2' into next

7ec32a00 bootstrap: Add support for MSYS2


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ec32a00d74bca7ff1a4873c8133b4811edc7bba
commit 7ec32a00d74bca7ff1a4873c8133b4811edc7bba
Author: Brad King 
AuthorDate: Wed Jul 20 09:15:36 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 09:17:08 2016 -0400

bootstrap: Add support for MSYS2

Bootstrapping under MSYS2 is the same as under MSYS/MinGW except that
`uname` reports `MSYS...` instead of `MINGW...`.

diff --git a/bootstrap b/bootstrap
index 20b64a1..742fa2b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -90,7 +90,7 @@ else
 fi
 
 # Determine whether this is a MinGW environment.
-if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then
+if echo "${cmake_system}" | grep 'MINGW\|MSYS' >/dev/null 2>&1; then
   cmake_system_mingw=true
 else
   cmake_system_mingw=false

---

Summary of changes:
 bootstrap |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.0-921-gabaec38

2016-07-20 Thread Brad King
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  abaec3872e181abb8d0757e06d431b6089805c11 (commit)
   via  e9849d35aa612bc49667a9db7dadc30f87653783 (commit)
   via  51d9e8ae3ecd1f188fe236a25b810597edf30af7 (commit)
   via  9ef2b2b164a92081bf3466af9ac0d0c28acae79d (commit)
  from  b761ed2fa8a2c61607178ea720bfa18f8f04cb34 (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=abaec3872e181abb8d0757e06d431b6089805c11
commit abaec3872e181abb8d0757e06d431b6089805c11
Merge: b761ed2 e9849d3
Author: Brad King 
AuthorDate: Wed Jul 20 09:19:24 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 09:19:24 2016 -0400

Merge topic 'update-kwsys' into next

e9849d35 bootstrap: Add check for ext/stdio_filebuf.h needed by KWSys
51d9e8ae Merge branch 'upstream-KWSys' into update-kwsys
9ef2b2b1 KWSys 2016-07-19 (9d1dbd95)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9849d35aa612bc49667a9db7dadc30f87653783
commit e9849d35aa612bc49667a9db7dadc30f87653783
Author: Dāvis Mosāns 
AuthorDate: Sun Jul 17 03:22:10 2016 +0300
Commit: Brad King 
CommitDate: Wed Jul 20 09:09:10 2016 -0400

bootstrap: Add check for ext/stdio_filebuf.h needed by KWSys

diff --git a/bootstrap b/bootstrap
index ad0c8ec..20b64a1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -511,6 +511,7 @@ cmake_kwsys_config_replace_string ()
 s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g;
 s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g;
 s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g;
+
s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g;
}" >> "${OUTFILE}${_tmp}"
 if [ -f "${OUTFILE}${_tmp}" ]; then
   if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null 
; then
@@ -1182,6 +1183,7 @@ KWSYS_BUILD_SHARED=0
 KWSYS_LFS_AVAILABLE=0
 KWSYS_LFS_REQUESTED=0
 KWSYS_STL_HAS_WSTRING=0
+KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H=0
 KWSYS_CXX_HAS_SETENV=0
 KWSYS_CXX_HAS_UNSETENV=0
 KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=0
@@ -1224,6 +1226,15 @@ else
   echo "${cmake_cxx_compiler} does not have stl wstring"
 fi
 
+if cmake_try_run "${cmake_cxx_compiler}" \
+  "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H" \
+  "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> 
cmake_bootstrap.log 2>&1; then
+  KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H=1
+  echo "${cmake_cxx_compiler} has "
+else
+  echo "${cmake_cxx_compiler} does not have "
+fi
+
 # Just to be safe, let us store compiler and flags to the header file
 
 cmake_bootstrap_version='$Revision$'

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51d9e8ae3ecd1f188fe236a25b810597edf30af7
commit 51d9e8ae3ecd1f188fe236a25b810597edf30af7
Merge: df14a98 9ef2b2b
Author: Brad King 
AuthorDate: Wed Jul 20 09:05:17 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 09:05:17 2016 -0400

Merge branch 'upstream-KWSys' into update-kwsys

* upstream-KWSys:
  KWSys 2016-07-19 (9d1dbd95)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ef2b2b164a92081bf3466af9ac0d0c28acae79d
commit 9ef2b2b164a92081bf3466af9ac0d0c28acae79d
Author: KWSys Upstream 
AuthorDate: Tue Jul 19 08:20:26 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 09:05:17 2016 -0400

KWSys 2016-07-19 (9d1dbd95)

Code extracted from:

http://public.kitware.com/KWSys.git

at commit 9d1dbd95835638e4c0fcf74dc8020cd4cd3426c1 (master).

Upstream Shortlog
-

Dāvis Mosāns (2):
  d2cdfc6d FStream: Use common base for basic_ifstream and 
basic_ofstream
  9d1dbd95 FStream: Add MinGW support

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39b03b3..87f6048 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -632,6 +632,11 @@ IF(KWSYS_USE_SystemInformation)
   ENDIF()
 ENDIF()
 
+IF(KWSYS_USE_FStream)
+  KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
+"Checking whether  is available" DIRECT)
+ENDIF()
+
 #-
 # Choose a directory for the generated headers.
 IF(NOT KWSYS_HEADER_ROOT)
diff --git a/Configure.hxx.in b/Configure.hxx.in
index ff8e49d..4ce680d 100644
--- a/Configure.hxx.in
+++ b/Configure.hxx.in
@@ -17,6 +17,8 @@
 
 /* Whether wstring is available.  */
 #define @KWSYS_NAMESPACE@_STL_HAS_WSTRING 

[Cmake-commits] CMake branch, next, updated. v3.6.0-917-gb761ed2

2016-07-20 Thread Brad King
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  b761ed2fa8a2c61607178ea720bfa18f8f04cb34 (commit)
   via  df14a98e9c4af316cd5e75d6af8cc7b75da2db8f (commit)
   via  6a98785d8f76d78447716fa90f93a36060288b8f (commit)
   via  88ee36f93f2491a0e1220fd6bdc5018b85c10f24 (commit)
  from  b5d5b8736e53719adfa739796c1110743456682a (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=b761ed2fa8a2c61607178ea720bfa18f8f04cb34
commit b761ed2fa8a2c61607178ea720bfa18f8f04cb34
Merge: b5d5b87 df14a98
Author: Brad King 
AuthorDate: Wed Jul 20 09:04:04 2016 -0400
Commit: Brad King 
CommitDate: Wed Jul 20 09:04:04 2016 -0400

Merge branch 'master' into next


---

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
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.6.0-451-gdf14a98

2016-07-20 Thread Brad King
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  df14a98e9c4af316cd5e75d6af8cc7b75da2db8f (commit)
   via  788bb146643030ebed27db297af83fe15b1f5447 (commit)
   via  eb7b5087f79527242a25c449c6ae837dcb4768ff (commit)
  from  6a98785d8f76d78447716fa90f93a36060288b8f (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=df14a98e9c4af316cd5e75d6af8cc7b75da2db8f
commit df14a98e9c4af316cd5e75d6af8cc7b75da2db8f
Merge: 6a98785 788bb14
Author: Brad King 
AuthorDate: Wed Jul 20 09:03:42 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 09:03:42 2016 -0400

Merge topic 'update-kwsys'

788bb146 Merge branch 'upstream-KWSys' into update-kwsys
eb7b5087 KWSys 2016-07-18 (19732229)


---

Summary of changes:
 Source/kwsys/SystemTools.cxx |   38 ++
 Source/kwsys/testSystemTools.cxx |9 +
 2 files changed, 19 insertions(+), 28 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, master, updated. v3.6.0-448-g6a98785

2016-07-20 Thread Brad King
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  6a98785d8f76d78447716fa90f93a36060288b8f (commit)
   via  57534990d812c49bb2f71f5d36b19fa5e2c005a0 (commit)
  from  88ee36f93f2491a0e1220fd6bdc5018b85c10f24 (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=6a98785d8f76d78447716fa90f93a36060288b8f
commit 6a98785d8f76d78447716fa90f93a36060288b8f
Merge: 88ee36f 5753499
Author: Brad King 
AuthorDate: Wed Jul 20 09:03:22 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 09:03:22 2016 -0400

Merge topic 'compat-CPACK_INSTALL_CMAKE_PROJECTS-subdirectory'

57534990 CPack: Add compatibility for incorrect 
CPACK_INSTALL_CMAKE_PROJECTS value

diff --cc Source/CPack/cmCPackGenerator.cxx
index 76609e1,f46d145..58a2243
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@@ -624,9 -623,10 +624,10 @@@ int cmCPackGenerator::InstallProjectVia
  cm.AddCMakePaths();
  cm.SetProgressCallback(cmCPackGeneratorProgress, this);
  cmGlobalGenerator gg();
 -cmsys::auto_ptr mf(
 +CM_AUTO_PTR mf(
new cmMakefile(, cm.GetCurrentSnapshot()));
- if (!installSubDirectory.empty() && installSubDirectory != "/") {
+ if (!installSubDirectory.empty() && installSubDirectory != "/" &&
+ installSubDirectory != ".") {
tempInstallDirectory += installSubDirectory;
  }
  if (componentInstall) {

---

Summary of changes:
 Source/CPack/cmCPackGenerator.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


[CMake] Using clang-tidy with cmake 3.6.0

2016-07-20 Thread Theodoros Theodoridis

Hello everyone,

I am trying to use the new _CLANG_TIDY property but I can't figure
out the proper syntax. How can I specify the checks I want?

I tried setting the checks in set_target_properties(target PROPERTIES
CXX_CLANG_TIDY "checks to be performed") but cmake would complain with
"wrong number of arguments".

I would appreciate any help.

Thanks,
Theodor

--

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] Security Report for CMake

2016-07-20 Thread Brad King
On 07/20/2016 02:31 AM, Justin Clift wrote:
> Amir pointed out there may be other locations with the same
> unquoted path problem in the template.

Thanks.  I'm not very familiar with NSIS or the syntax in the
template file so we'll be dependent on others to find/fix any
remaining problems.

Meanwhile I've revised the commit message to update the credits:

 NSIS: Quote uninstaller path when executing it in a shell
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=057f21ae

I've queued this for merge to 'release' for 3.6.1.

-Brad

-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[Cmake-commits] CMake branch, next, updated. v3.6.0-913-gb5d5b87

2016-07-20 Thread Brad King
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  b5d5b8736e53719adfa739796c1110743456682a (commit)
   via  057f21aef2824abfb92c85f932c937e28feec817 (commit)
  from  d0724013c1c10641afa9e22b95c1057819d1dedb (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=b5d5b8736e53719adfa739796c1110743456682a
commit b5d5b8736e53719adfa739796c1110743456682a
Merge: d072401 057f21a
Author: Brad King 
AuthorDate: Wed Jul 20 08:49:51 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Jul 20 08:49:51 2016 -0400

Merge topic 'nsis-protect-uninst-exec' into next

057f21ae NSIS: Quote uninstaller path when executing it in a shell


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=057f21aef2824abfb92c85f932c937e28feec817
commit 057f21aef2824abfb92c85f932c937e28feec817
Author: Justin Clift 
AuthorDate: Fri Jul 15 14:18:37 2016 +0100
Commit: Brad King 
CommitDate: Wed Jul 20 08:46:50 2016 -0400

NSIS: Quote uninstaller path when executing it in a shell

Protect our `$0` reference in the shell as `"$0"`.  Otherwise it works
with a space in the path only due to an insecure Windows feature.

Reported-by: Amir Szekely 
Reported-by: Ug_0 Security

diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 1ef3d28..92a3142 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -920,7 +920,7 @@ uninst:
   ClearErrors
   StrLen $2 "\Uninstall.exe"
   StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path
-  ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file
+  ExecWait '"$0" _?=$3' ;Do not copy the uninstaller to a temp file
 
   IfErrors uninst_failed inst
 uninst_failed:

---

Summary of changes:


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


[CMake] object-libraries and compile-dependencies to other target

2016-07-20 Thread Patrick Boettcher
Hi list,

I'm using an object-library to generate a list of .o-files instead of
archives which I use to link into several executable.

Even though it is only an object-library it has compile-dependencies to
other targets - this includes include-paths, compile-definitions and
compile-features. 

I can't (or I don't know how) use target_link_libraries() with my
object-library. 

What can I do to make it work? I'm exploring generator-expressions, but
this seems redundant as I need to list all dependencies again.

best regards,
--
Patrick.

-- 

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] Improved WIX support

2016-07-20 Thread Stuermer, Michael SP/HZA-ZSEP
> -Original Message-
> From: Nils Gladitz [mailto:nilsglad...@gmail.com]
> Sent: Wednesday, July 20, 2016 12:03 PM
> To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> Subject: Re: [cmake-developers] Improved WIX support
> 
> On 19.07.2016 17:43, Stuermer, Michael SP/HZA-ZSEP wrote:
> > Hello there,
> >
> > in short:
> >
> > I fixed some minor issues with WIX toolset support and added the
> possibility to integrate service installation/uninstallation with generated 
> msi
> packages. Please review and comment what is missing for integration in
> upstream.
> >
> > a bit longer:
> >
> > When creating a component-based installer, the root component (or
> feature, as it is called in WIX context) cannot be named and described. This
> can now be done using CPACK_WIX_ROOT_COMPONENT_DISPLAY_NAME
> and CPACK_WIX_ROOT_COMPONENT_DESCRIPTION.
> >
> > The install folder can only be set to a subfolder of ProgramFiles or
> ProgramFiles64. With the option CPACK_WIX_SKIP_PROGRAM_FOLDER it is
> now possible to set default installation paths on arbitrary locations such as
> "C:\myprogram". In order for this to work, the Guids of the WIX-
> Components must be explicitly set using
> CPACK_WIX_GENERATE_COMPONENT_GUIDS. Per default the Guids are
> auto generated using the value "*".
> >
> > Disabling components by default using the
> CPACK_COMPONENT__DISABLED is now working.
> >
> > With the install file properties CPACK_WIX_KEYPATH and
> CPACK_WIX_PROPERTY_ it is now possible to add custom tags
> (such as service handling) to the installer. If the custom tag depends on
> several files within the directory, bundling of several files in WIX-
> Components is needed. This can be done using
> CPACK_WIX_BUNDLE_COMPONENTS.
> >
> > All new functionalities are documented and some small example snippets
> are added to the documentation.
> >
> > I hope these changes make sense to you, if the documentation is not
> > accurate enough or the naming of cmake properties/variables should be
> > changed please let me know
> 
> Would you mind dividing these changes into feature sized patches that I can
> review, test and integrate individually?
> 

I hoped I could avoid this :-). Of course I can split it up.

Another thing: I just found out that I broke the patch-concept of the WIX 
generator and that using a patchfile supports adding service installation and 
handling. So I will remove the unnecessary features I added before submitting 
the splitted patches. Will take a little time.

> Thanks!
> Nils

Best Regards

Michael
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Improved WIX support

2016-07-20 Thread Nils Gladitz

On 19.07.2016 17:43, Stuermer, Michael SP/HZA-ZSEP wrote:

Hello there,

in short:

I fixed some minor issues with WIX toolset support and added the possibility to 
integrate service installation/uninstallation with generated msi packages. 
Please review and comment what is missing for integration in upstream.

a bit longer:

When creating a component-based installer, the root component (or feature, as 
it is called in WIX context) cannot be named and described. This can now be 
done using CPACK_WIX_ROOT_COMPONENT_DISPLAY_NAME and 
CPACK_WIX_ROOT_COMPONENT_DESCRIPTION.

The install folder can only be set to a subfolder of ProgramFiles or ProgramFiles64. With the 
option CPACK_WIX_SKIP_PROGRAM_FOLDER it is now possible to set default installation paths on 
arbitrary locations such as "C:\myprogram". In order for this to work, the Guids of the 
WIX-Components must be explicitly set using CPACK_WIX_GENERATE_COMPONENT_GUIDS. Per default the 
Guids are auto generated using the value "*".

Disabling components by default using the 
CPACK_COMPONENT__DISABLED is now working.

With the install file properties CPACK_WIX_KEYPATH and 
CPACK_WIX_PROPERTY_ it is now possible to add custom tags (such as 
service handling) to the installer. If the custom tag depends on several files within 
the directory, bundling of several files in WIX-Components is needed. This can be 
done using CPACK_WIX_BUNDLE_COMPONENTS.

All new functionalities are documented and some small example snippets are 
added to the documentation.

I hope these changes make sense to you, if the documentation is not accurate 
enough or the naming of cmake properties/variables should be changed please let 
me know


Would you mind dividing these changes into feature sized patches that I 
can review, test and integrate individually?


Thanks!
Nils
--

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Security Report for CMake

2016-07-20 Thread Justin Clift
On 19 Jul 2016, at 21:29, Brad King  wrote:
> On 07/19/2016 01:46 PM, Cyril VALLICARI wrote:
>> Here a Patch that correct the vulnerability 
> 
> Thanks, applied:
> 
> NSIS: Quote uninstaller path when executing it in a shell
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01e1f694
> 
> -Brad

Oops, it kind of looks like Cyril forgot to mention there could
be further problems in the same template file.  The initial line
was pointed out by Amir Szekely (NSIS project) as below, while we
were trying to figure out where the unquoted path problem in
sqlitebrowser's package was coming from. ;)

Amir pointed out there may be other locations with the same
unquoted path problem in the template.

In my testing for a solution for sqlitebrowser's package, the
one I fixed was definitely an issue, easily replicated.

I'm not sure where the unquoted registry string would be used from.
It didn't seem to be used as such from Windows Control Panel ->
Add/Remove Programs.  So, I ignored it. ;)

I don't know enough about CPack to know what other bits I may have
missed though, nor if that unquoted string in the registry could be
a problem in some other way.

Thoughts? :)

Regards and best wishes,

Justin Clift


Begin forwarded message:
> From: Amir Szekely 
> Subject: Re: Security report for NSIS
> Date: 15 July 2016 01:33:12 BST
> To: Cyril VALLICARI , jus...@postgresql.org
> 
> This seems to be a bug in CPack:
> 
> https://github.com/Kitware/CMake/blob/master/Modules/NSIS.template.in#L916
> 
> That's the line where it executes the uninstaller without quotes. There may 
> be more than one place.
> 
> They are also writing an unquoted string to to the registry:
> 
> https://github.com/Kitware/CMake/blob/master/Modules/NSIS.template.in#L655
> 
> For a quick fix, you can turn off CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL.
[snip]

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

-- 

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