Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
7c961b1882d40b4f0f5fd8e34be3d7ae228322f5
[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 if(APPLE)
5   SET(BUILDNAME "APPLE" CACHE TYPE INTERNAL FORCE)
6 else()
7   SET(BUILDNAME "UNIX" CACHE TYPE INTERNAL FORCE)
8   if(WIN32)
9     SET(BUILDNAME "WINDOWS" CACHE TYPE INTERNAL FORCE)
10   endif()
11 endif()
12
13 if(enable_memcheck)
14   set(CTEST_TIMEOUT "300") #TIMEOUT FOR EACH TEST
15 endif()
16
17 if(enable_compile_warnings AND enable_compile_optimizations)
18   SET(BUILDNAME "FULL_FLAGS" CACHE TYPE INTERNAL FORCE)
19 endif()
20
21 if(HAVE_GTNETS)
22   SET(BUILDNAME "GTNETS" CACHE TYPE INTERNAL FORCE)
23 endif()
24
25 if(HAVE_MC)
26   SET(BUILDNAME "MODEL-CHECKING" CACHE TYPE INTERNAL FORCE)
27 endif()
28
29 if(enable_memcheck)
30   SET(BUILDNAME "MEMCHECK" CACHE TYPE INTERNAL FORCE)
31 endif()
32
33 set(osname ${CMAKE_SYSTEM_NAME})
34 set(cpu ${CMAKE_SYSTEM_PROCESSOR})
35 set(DISTRIB2 ${CMAKE_SYSTEM_VERSION})
36
37 SET(SITE "${osname}_${DISTRIB2}_${cpu}")
38 SET(CTEST_SITE "${osname}_${DISTRIB2}_${cpu}")
39 SET(CTEST_PROJECT_NAME "${PROJECT_NAME}")
40 SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "3000000")
41 SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "3000000")
42
43 set(PIPOL_IMAGE $ENV{PIPOL_IMAGE})
44 if(NOT ${PIPOL_IMAGE} MATCHES "\n")
45   set(SITE ${PIPOL_IMAGE})
46 endif()
47
48 set(PATTERN_CTEST_IGNORED "")
49 if(enable_coverage)
50     set(PATTERN_CTEST_IGNORED 
51       "/tools/"
52       "/buildtools/"
53       "/include/"
54       "/testsuite/"
55       "/teshsuite/"
56       "/src/bindings/"
57     )
58     if(NOT release)
59        set(PATTERN_CTEST_IGNORED 
60         ${PATTERN_CTEST_IGNORED}
61         "/examples/"
62         )
63     endif()
64 endif()
65
66 CONFIGURE_FILE(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake @ONLY)