Re: [cmake-developers] merge session today

2012-09-29 Thread Stephen Kelly
Brad King wrote:

 On 09/28/2012 04:35 PM, Stephen Kelly wrote:
 The generator-expression-target-properties branch merges to master
 cleanly. The export-sets-2 branch was never merged into it.
 
 I don't understand what blocked merging it to master, but I'll leave it
 up to you to handle.
 
 I rewrote/squashed generator-expression-target-properties and
 merged to master.  I replaced export-sets-2 with a rewritten
 version export-sets that does not merge your topic in.

Great, thanks for that.

Steve.



--

Powered by www.kitware.com

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

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

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


Re: [cmake-developers] QMake and Visual Studios...

2012-09-29 Thread Stephen Kelly

This, from a Qt list, is probably of interest to CMake too.

BRM wrote:

 I'm updating compilers on my virtual machines and just installed VS2012,
 namely to test to see what needs to be done to support it for my main
 projects - all Qt based. I have a number of compilers around - from VS6 to
 VS2010, and want to see if VS2012 is useful enough to add support for.
 
 Any how...I have to keep support for targeting WinXP, and I typically do
 that through setting all the various variables (_WINNT, etc.) in a QMake
 PRI script only used in the Windows builds so everything is uniform. This
 works well for VS2008 and VS2010; however, they tried to drop WinXP/Win2k3
 from the support list with VS2012. A work-around is in place to use the
 multi-targetting support to utilize VS2010 from within VS2012 to build
 compatible binaries, but the project file has to be setup properly to do
 so. I typically rely on QMake to generate the project files and don't add
 them to source control - keeps it simple as only one project file is then
 maintained - the QMake one. They're suppose to release an update to VS2012
 later this year to re-add native support; but I was wondering if t
  here was a way to get QMake to insert the proper text into the VS project
  file [1] to enable the multi-targeting support automatically. If not,
  okay I'll just wait.
 
 TIA,
 
 Ben
 
 [1]
 [http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-
targeting.aspx


--

Powered by www.kitware.com

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

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

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


Re: [cmake-developers] patch for cmake that adds a new timestamp command

2012-09-29 Thread Nils Gladitz
I've updated the patch (attached) to include a TIMESTAMP sub-command 
for file as well (I hope indentation is also fixed).


I only implemented the last modification time since creation and last 
access time are not implemented by all filesystems (or disabled for 
performance).


Nils
From fdd3bd749b85ecff1d07e6f735417d8bad1e70c4 Mon Sep 17 00:00:00 2001
From: Nils Gladitz glad...@scivis.de
Date: Sat, 29 Sep 2012 11:31:18 +0200
Subject: [PATCH] timestamp sub-command for string and file

---
 Source/CMakeLists.txt  |2 +
 Source/cmFileCommand.cxx   |   57 
 Source/cmFileCommand.h |   10 ++
 Source/cmStringCommand.cxx |   54 
 Source/cmStringCommand.h   |   30 -
 Source/cmTimestamp.cxx |  135 
 Source/cmTimestamp.h   |   42 ++
 Tests/CMakeTests/File-TIMESTAMP-BadArg1.cmake  |1 +
 Tests/CMakeTests/File-TIMESTAMP-NoFile.cmake   |2 +
 Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake |   24 
 Tests/CMakeTests/File-TIMESTAMP-Works.cmake|2 +
 Tests/CMakeTests/FileTest.cmake.in |   12 ++
 .../String-TIMESTAMP-AllSpecifiers.cmake   |   11 ++
 Tests/CMakeTests/String-TIMESTAMP-BadArg1.cmake|1 +
 Tests/CMakeTests/String-TIMESTAMP-BadArg2.cmake|1 +
 Tests/CMakeTests/String-TIMESTAMP-BadArg3.cmake|1 +
 .../String-TIMESTAMP-CustomFormatLocal.cmake   |2 +
 .../String-TIMESTAMP-CustomFormatUTC.cmake |2 +
 .../String-TIMESTAMP-DefaulFormatUTC.cmake |2 +
 .../String-TIMESTAMP-DefaultFormatLocal.cmake  |2 +
 .../String-TIMESTAMP-DefaultFormatUTC.cmake|2 +
 .../String-TIMESTAMP-IncompleteSpecifier.cmake |2 +
 .../String-TIMESTAMP-UnknownSpecifier.cmake|2 +
 Tests/CMakeTests/StringTest.cmake.in   |   30 +
 24 files changed, 428 insertions(+), 1 deletions(-)
 create mode 100644 Source/cmTimestamp.cxx
 create mode 100644 Source/cmTimestamp.h
 create mode 100644 Tests/CMakeTests/File-TIMESTAMP-BadArg1.cmake
 create mode 100644 Tests/CMakeTests/File-TIMESTAMP-NoFile.cmake
 create mode 100644 Tests/CMakeTests/File-TIMESTAMP-NotBogus.cmake
 create mode 100644 Tests/CMakeTests/File-TIMESTAMP-Works.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-AllSpecifiers.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-BadArg1.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-BadArg2.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-BadArg3.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-CustomFormatLocal.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-CustomFormatUTC.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-DefaulFormatUTC.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-DefaultFormatLocal.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-DefaultFormatUTC.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-IncompleteSpecifier.cmake
 create mode 100644 Tests/CMakeTests/String-TIMESTAMP-UnknownSpecifier.cmake

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 5a3e7d1..00a1a0a 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -259,6 +259,8 @@ set(SRCS
   cmSystemTools.h
   cmTarget.cxx
   cmTarget.h
+  cmTimestamp.h
+  cmTimestamp.cxx
   cmTest.cxx
   cmTest.h
   cmTestGenerator.cxx
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 8de24b3..3b074da 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -17,6 +17,8 @@
 #include cmFileTimeComparison.h
 #include cmCryptoHash.h
 
+#include cmTimestamp.h
+
 #if defined(CMAKE_BUILD_WITH_CMAKE)
 #include cm_curl.h
 #endif
@@ -160,6 +162,10 @@ bool cmFileCommand
 {
 return this-HandleCMakePathCommand(args, true);
 }
+  else if ( subCommand == TIMESTAMP )
+{
+return this-HandleTimestampCommand(args);
+}
 
   std::string e = does not recognize sub-command +subCommand;
   this-SetError(e.c_str());
@@ -3246,3 +3252,54 @@ cmFileCommand::HandleUploadCommand(std::vectorstd::string const args)
   return false;
 #endif
 }
+
+//
+bool cmFileCommand::HandleTimestampCommand(
+  std::vectorstd::string const args)
+{
+  if(args.size()  3)
+{
+this-SetError(sub-command TIMESTAMP requires at least two arguments.);
+return false;
+}
+  else if(args.size()  5)
+{
+this-SetError(sub-command TIMESTAMP takes at most four arguments.);
+return false;
+}
+
+  int argsIndex = 1;
+
+  const std::string filename = args[argsIndex++];
+
+  const std::string outputVariable = args[argsIndex++];
+
+  std::string formatString;
+  if(args.size()  argsIndex  args[argsIndex] != UTC)
+{
+formatString = args[argsIndex++];
+}
+
+