cmake_minimum_required(VERSION 2.8)
project(CDash NONE)
include(CTest)
# set some cache variables that can be used
# to configure the testing install
set(CDASH_SERVER localhost CACHE STRING "CDash testing server")
set(CDASH_DIR_NAME CDashTesting CACHE STRING "Directory name for CDash")

# turn the CDash into one that can be tested
file(WRITE "${CDash_SOURCE_DIR}/testing/config.test.local.php"
"<?php
$configure = array(
  'urlwebsite'       => 'http://${CDASH_SERVER}/CDashTesting',
  'outputdirectory'  => 'C:/tmp',  // or /tmp or ~/tmp on a Linux/Mac server
  'type'             => 'Nightly',
  'site'             => 'computername.companyname',
  'buildname'        => 'SVN-Win32-xampp',
  'cdash'            => 'http://www.cdash.org/CDash',
  'svnroot'          => '${CDASH_SOURCE_DIR}'
  );
?>
")

file(WRITE "${CDash_SOURCE_DIR}/cdash/config.local.php"
  "<?php
$CDASH_DB_NAME = 'cdash4simpletest';
$CDASH_TESTING_MODE = true;
?>
")
set(CDASH_COVERAGE_DIR "${CDash_BINARY_DIR}/xdebugCoverage")
make_directory("${CDASH_COVERAGE_DIR}")
configure_file(${CDash_SOURCE_DIR}/append_coverage.php.in 
  ${CDash_BINARY_DIR}/append_coverage.php)

                                                          
# add the testing directory
add_subdirectory(testing)

Add a cmake file for ctest testing
Add a cmake file for ctest testing
