Browse Source

harndening cmake config

Stasik0 9 years ago
parent
commit
9e15be02c1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      CMakeLists.txt

+ 2 - 1
CMakeLists.txt

@@ -9,8 +9,9 @@ if(GIT_FOUND)
     if( NOT ${res_var} EQUAL 0 )
         set( GIT_COMMIT_ID "git commit id unknown")
         message( WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info." )
+    else()
+        string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COM_ID} )
     endif()
-    string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COM_ID} )
 else()
     set( GIT_COMMIT_ID "unknown (git not found!)")
     message( WARNING "Git not found. Build will not contain git revision info." )