| 1 |
if(NOT DEFINED source_dir) |
| 2 |
message(FATAL_ERROR "variable 'source_dir' not defined") |
| 3 |
endif() |
| 4 |
|
| 5 |
|
| 6 |
if(NOT EXISTS "${source_dir}/CMakeLists.txt") |
| 7 |
message(FATAL_ERROR "error: No CMakeLists.txt file to patch!") |
| 8 |
endif() |
| 9 |
|
| 10 |
set(text " |
| 11 |
|
| 12 |
# |
| 13 |
# Reference variables typically given as experimental_build_test configure |
| 14 |
# options to avoid CMake warnings about unused variables |
| 15 |
# |
| 16 |
|
| 17 |
message(\"Trilinos_ALLOW_NO_PACKAGES='\${Trilinos_ALLOW_NO_PACKAGES}'\") |
| 18 |
message(\"Trilinos_WARNINGS_AS_ERRORS_FLAGS='\${Trilinos_WARNINGS_AS_ERRORS_FLAGS}'\") |
| 19 |
") |
| 20 |
|
| 21 |
file(APPEND "${source_dir}/CMakeLists.txt" "${text}") |
| 22 |
|
| 23 |
|
| 24 |
if(NOT EXISTS "${source_dir}/CTestConfig.cmake") |
| 25 |
message(FATAL_ERROR "error: No CTestConfig.cmake file to patch!") |
| 26 |
endif() |
| 27 |
|
| 28 |
set(text " |
| 29 |
|
| 30 |
# |
| 31 |
# Use newer than 10.6.1 CTestConfig settings from the Trilinos project. |
| 32 |
# Send the Trilinos dashboards to the new Trilinos CDash server instance. |
| 33 |
# |
| 34 |
set(CTEST_NIGHTLY_START_TIME \"04:00:00 UTC\") # 10 PM MDT or 9 PM MST |
| 35 |
set(CTEST_DROP_SITE \"testing.sandia.gov\") |
| 36 |
") |
| 37 |
|
| 38 |
file(APPEND "${source_dir}/CTestConfig.cmake" "${text}") |