Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Oops, this shouldn't have make it to the repository.
[simgrid.git] / buildtools / Cmake / CMakeLists.txt
index 05d3e55..f6d54cf 100644 (file)
@@ -9,30 +9,32 @@ OPTION( SIMGRID_WITH_PTHREAD "Use pthread as context support." OFF )
 
 OPTION( SIMGRID_USE_GTNETS "Build SimGrid with GTNets support." OFF )
 
+### Display the version
+find_program(CAT NAMES cat)
+exec_program("${CAT}" ARGS "version" OUTPUT_VARIABLE VERSION)
+message("svn version: " ${VERSION})
+
+
 ### Check 32bits or 64bits
 INCLUDE (CheckTypeSize)
-CHECK_TYPE_SIZE("int" SIZEOF_INT)
-
-IF(SIZEOF_INT EQUAL 4)
+CHECK_TYPE_SIZE("long" SIZEOF_LONG)
+IF(SIZEOF_LONG EQUAL 4)
   SET(ARCH_32_BITS 1)
-ELSE(SIZEOF_INT EQUAL 4)
-  SET(ARCH_64_BITS 1)
-ENDIF(SIZEOF_INT EQUAL 4)
+ELSE(SIZEOF_LONG EQUAL 4)
+  SET(ARCH_32_BITS 0)
+ENDIF(SIZEOF_LONG EQUAL 4)
 
 
 ### Enable tests
+INCLUDE(CTestConfig.cmake)
 ENABLE_TESTING()
 INCLUDE(CTest)
 INCLUDE(Dart)
-
-# Configure Ctest
-SET (UPDATE_TYPE "svn")
-SET (CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 100000)
-SET (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 100000)
-
-INCLUDE(CTestConfig.txt)
 INCLUDE(CTestList.txt)
 
+# Install the CTest configuration in the build dir
+configure_file(CTestConfig.cmake ${CMAKE_BINARY_DIR}/CTestCustom.ctest COPYONLY)
+
 #SET (CMAKE_COMPILER_IS_GNUCXX 1)
 #SET (CMAKE_COMPILER_IS_GNUCC 1)