Revision: 4318
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4318&view=rev
Author:   ossman_
Date:     2011-03-03 12:51:38 +0000 (Thu, 03 Mar 2011)

Log Message:
-----------
Make the build id generation work on other targets than Windows.

Modified Paths:
--------------
    trunk/CMakeLists.txt

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt        2011-03-03 12:35:04 UTC (rev 4317)
+++ trunk/CMakeLists.txt        2011-03-03 12:51:38 UTC (rev 4318)
@@ -10,17 +10,23 @@
 # The RC version must always be four comma-separated numbers
 set(RCVERSION 1,0,90,0)
 
-if(MINGW OR CYGWIN)
-  execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
-  string(REGEX REPLACE "\n" "" BUILD ${BUILD})
-elseif(WIN32)
+# Try to encode today's date into the build id. We assume that MSVC
+# means we need to use a native Windows method, otherwise we assume
+# some kind of Unix system. The id will be empty if things fail.
+set(BUILD "")
+if(MSVC)
   execute_process(COMMAND "${CMAKE_SOURCE_DIR}/cmakescripts/getdate.bat"
     OUTPUT_VARIABLE BUILD)
-  string(REGEX REPLACE "\n" "" BUILD ${BUILD})
 else()
-  message(FATAL_ERROR "Platform not supported by this build system.  Use 
autotools instead.")
+  execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
 endif()
 
+if(NOT BUILD)
+  set(BUILD "")
+else()
+  string(REGEX REPLACE "\n" "" BUILD ${BUILD})
+endif()
+
 if(NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE Release)
 endif()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to