aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-04 17:32:20 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-04 17:32:20 +0000
commit0e5c6405632e03f80b3e2ff0e6f7c8371c98b023 (patch)
treeab194d73c704329617e1810e7e55b0ed1bb0b61b /CMakeLists.txt
parentbe64619ab69b26dc58371cd057cc68b9238faa12 (diff)
* fix a unused variable warning
* if svnversion returns prose such as "exported" then discard that
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cec2d276..ee3fc99ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,10 @@ set(EIGEN_VERSION_NUMBER "2.0-beta4")
#if the svnversion program is absent, this will leave the SVN_REVISION string empty,
#but won't stop CMake.
execute_process(COMMAND svnversion -n ${CMAKE_SOURCE_DIR}
- OUTPUT_VARIABLE EIGEN_SVN_REVISION)
+ OUTPUT_VARIABLE EIGEN_SVNVERSION_OUTPUT)
+
+#we only want EIGEN_SVN_REVISION if it is an actual revision number, not a string like "exported"
+string(REGEX MATCH "^[0-9]+.*" EIGEN_SVN_REVISION "${EIGEN_SVNVERSION_OUTPUT}")
if(EIGEN_SVN_REVISION)
set(EIGEN_VERSION "${EIGEN_VERSION_NUMBER} (SVN revision ${EIGEN_SVN_REVISION})")