Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the version built from buildname so that cdash notices that it's another build...
[simgrid.git] / buildtools / Cmake / CTestConfig.cmake
index b9e6724..45ab81c 100644 (file)
@@ -18,22 +18,27 @@ exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
 endmacro(getuname)
 MARK_AS_ADVANCED(UNAME)
 
+find_program(CAT NAMES cat)
+exec_program("${CAT}" ARGS "version" OUTPUT_VARIABLE VERSION)
+
+
 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
   SET(DISTRIB2 "OSX")
 else(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
 
   #Try to get the distrib
-  find_program(CAT NAMES cat)
   exec_program("${CAT}" ARGS " /etc/issue" OUTPUT_VARIABLE DISTRIB)
   MARK_AS_ADVANCED(CAT)
-  STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB})
 endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+
+STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB})
          
 getuname(osname -s)
 getuname(node -n)
 getuname(osrel  -r)
 getuname(cpu    -m)
        
+#SET (BUILDNAME "${VERSION}-${osname}-${DISTRIB2}-${cpu}")
 SET (BUILDNAME "${osname}-${DISTRIB2}-${cpu}")
 SET (SITE "${node}")
 SET (CTEST_PROJECT_NAME "Simgrid")