GIT: Fix for output of git rev-list to the input of wc -l
authoragrigora <alina.grigoras@cern.ch>
Wed, 7 Jan 2015 16:35:14 +0000 (17:35 +0100)
committeragrigora <alina.grigoras@cern.ch>
Wed, 7 Jan 2015 16:36:46 +0000 (17:36 +0100)
execute_process() Runs the given sequence of one or more
commands with the standard output of each process piped to
the standard input of the next.

cmake/CheckGitVersion.cmake

index bbd44ea..814d81c 100644 (file)
@@ -58,7 +58,8 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/.git/)
                             OUTPUT_VARIABLE ALIROOT_SERIAL_ORIGINAL)
         else()
             # generate the short version of the revision hash using -wc -l
-            execute_process(COMMAND git rev-list ${GIT_SHA1} | wc -l
+            execute_process(COMMAND git rev-list ${GIT_SHA1}
+                            COMMAND wc -l
                             WORKING_DIRECTORY ${AliRoot_SOURCE_DIR}
                             OUTPUT_STRIP_TRAILING_WHITESPACE
                             RESULT_VARIABLE revcount