Revision: 55791
          http://sourceforge.net/p/brlcad/code/55791
Author:   starseeker
Date:     2013-06-15 13:09:13 +0000 (Sat, 15 Jun 2013)
Log Message:
-----------
Use the CMake MATH command to generate the integer version number - more 
compact.

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

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2013-06-15 09:54:01 UTC (rev 55790)
+++ brlcad/trunk/CMakeLists.txt 2013-06-15 13:09:13 UTC (rev 55791)
@@ -213,18 +213,9 @@
 string(STRIP ${BRLCAD_PATCH_VERSION} BRLCAD_PATCH_VERSION)
 
 set(BRLCAD_VERSION 
"${BRLCAD_MAJOR_VERSION}.${BRLCAD_MINOR_VERSION}.${BRLCAD_PATCH_VERSION}")
-# the following number should be a single integer MMmmpp (e.g., 72400)
-if(${BRLCAD_MINOR_VERSION} STRLESS "10")
-  set(BRLCAD_MINOR_VERSION_NUM "0${BRLCAD_MINOR_VERSION}")
-else(${BRLCAD_MINOR_VERSION} STRLESS "10")
-  set(BRLCAD_MINOR_VERSION_NUM "${BRLCAD_MINOR_VERSION}")
-endif(${BRLCAD_MINOR_VERSION} STRLESS "10")
-if(${BRLCAD_PATCH_VERSION} STRLESS "10")
-  set(BRLCAD_PATCH_VERSION_NUM "0${BRLCAD_PATCH_VERSION}")
-else(${BRLCAD_PATCH_VERSION} STRLESS "10")
-  set(BRLCAD_PATCH_VERSION_NUM "${BRLCAD_PATCH_VERSION}")
-endif(${BRLCAD_PATCH_VERSION} STRLESS "10")
-set(BRLCAD_VERSION_NUMBER 
"${BRLCAD_MAJOR_VERSION}${BRLCAD_MINOR_VERSION_NUM}${BRLCAD_PATCH_VERSION_NUM}")
+# Create an integer corresponding to the BRL-CAD version to simplify
+# comparisons - format is MMmmpp (e.g., 72400)
+math(EXPR BRLCAD_VERSION_NUMBER "${BRLCAD_MAJOR_VERSION} * 10000 + 
${BRLCAD_MINOR_VERSION} * 100 + ${BRLCAD_PATCH_VERSION}")
 
 #---------------------------------------------------------------------
 # Define relative install locations.  Don't set these if they have already

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


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to