Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename CTestCustom.ctest -> CTestConfig.cmake (so that cmake sees it when generating...
[simgrid.git] / buildtools / Cmake / CTestConfig.cmake
1 # Configure CTest. For details, see:
2 # http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
3
4 SET (UPDATE_TYPE "svn")
5 SET (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "3000000")
6 SET (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "3000000")
7
8 #Get the hostname of current machine :
9 find_program(HOSTNAME_CMD NAMES hostname)
10 exec_program(${HOSTNAME_CMD} OUTPUT_VARIABLE HOSTNAME)
11 set(SITE "${HOSTNAME}")
12 MARK_AS_ADVANCED(HOSTNAME_CMD)
13
14 #Get the system information of current machine
15 find_program(UNAME NAMES uname)
16 macro(getuname name flag)
17 exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
18 endmacro(getuname)
19 MARK_AS_ADVANCED(UNAME)
20
21 if(CMAKE_SYSTEM_NAME STREQUAL "darwin")
22   SET(DISTRIB2 "OSX")
23 else(CMAKE_SYSTEM_NAME STREQUAL "darwin")
24
25   #Try to get the distrib
26   find_program(CAT NAMES cat)
27   exec_program("${CAT}" ARGS " /etc/issue" OUTPUT_VARIABLE DISTRIB)
28   MARK_AS_ADVANCED(CAT)
29   STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB})
30 endif(CMAKE_SYSTEM_NAME STREQUAL "darwin")
31          
32 getuname(osname -s)
33 getuname(node -n)
34 getuname(osrel  -r)
35 getuname(cpu    -m)
36         
37 SET (BUILDNAME "${osname}-${DISTRIB2}-${cpu}")
38 SET (SITE "${node}")
39 SET (CTEST_PROJECT_NAME "Simgrid")
40 SET (CTEST_DROP_METHOD "http")
41 SET (CTEST_DROP_SITE "cdash.inria.fr/CDash")
42 SET (CTEST_DROP_LOCATION "/submit.php?project=Simgrid")
43 SET (CTEST_DROP_SITE_CDASH TRUE)