summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-11-08 05:34:01 (GMT)
committerMarius Kintel <marius@kintel.net>2013-11-08 05:34:01 (GMT)
commite722d906ceb520b3f89775a0583b0c539f9c9223 (patch)
tree17bd0b562e90070953bc79c706612f85ffa44854 /tests
parent77829d0a3a33f6d62dd5c64bc884a4f758366b7e (diff)
Get rid of leading zeros in date tags, causing them to be interpreted as octal in C++
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c560b4f..0e5981f 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -450,9 +450,11 @@ message(STATUS "OpenSCAD version: ${VERSION}")
string(REGEX MATCHALL "^[0-9]+|[0-9]+|[0-9]+$" MYLIST "${VERSION}")
list(GET MYLIST 0 OPENSCAD_YEAR)
list(GET MYLIST 1 OPENSCAD_MONTH)
+math(EXPR OPENSCAD_MONTH ${OPENSCAD_MONTH}) # get rid of leading zero
list(LENGTH MYLIST VERSIONLEN)
if (${VERSIONLEN} EQUAL 3)
list(GET MYLIST 2 OPENSCAD_DAY)
+ math(EXPR OPENSCAD_DAY ${OPENSCAD_DAY}) # get rid of leading zero
endif()
add_definitions(-DOPENSCAD_VERSION=${VERSION} -DOPENSCAD_YEAR=${OPENSCAD_YEAR} -DOPENSCAD_MONTH=${OPENSCAD_MONTH})
contact: Jan Huwald // Impressum