2010-10-15 21:24:50 +00:00
|
|
|
# /*-------------------------------------------------------------------------*\
|
2010-10-07 03:00:07 +00:00
|
|
|
# ========= |
|
2013-12-11 16:09:41 +00:00
|
|
|
# \\ / F ield | foam-extend: Open Source CFD
|
2016-06-07 15:28:09 +00:00
|
|
|
# \\ / O peration | Version: 4.0
|
2015-06-18 03:00:45 +00:00
|
|
|
# \\ / A nd | Web: http://www.foam-extend.org
|
|
|
|
# \\/ M anipulation | For copyright notice see file Copyright
|
2010-10-15 21:24:50 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
2010-10-07 03:00:07 +00:00
|
|
|
# License
|
2013-12-11 16:09:41 +00:00
|
|
|
# This file is part of foam-extend.
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
2013-12-11 16:09:41 +00:00
|
|
|
# foam-extend is free software: you can redistribute it and/or modify it
|
2010-10-07 03:00:07 +00:00
|
|
|
# under the terms of the GNU General Public License as published by the
|
2013-12-11 16:09:41 +00:00
|
|
|
# Free Software Foundation, either version 3 of the License, or (at your
|
2010-10-07 03:00:07 +00:00
|
|
|
# option) any later version.
|
|
|
|
#
|
2013-12-11 16:09:41 +00:00
|
|
|
# foam-extend is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# General Public License for more details.
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2013-12-11 16:09:41 +00:00
|
|
|
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# Description
|
2010-10-15 21:24:50 +00:00
|
|
|
# CMakeLists.txt file for implementing a test harness for the compilation
|
2016-06-07 15:28:09 +00:00
|
|
|
# and test of foam-extend-4.0 using Kitware CTest/CMake/CDash
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
2010-10-15 21:24:50 +00:00
|
|
|
# The results will be submitted to the CDash server identified by the file
|
|
|
|
# CTestConfig.cmake
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# Author
|
2010-10-15 21:24:50 +00:00
|
|
|
# Martin Beaudoin, Hydro-Quebec, 2010. All rights reserved
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
#
|
2010-10-15 21:24:50 +00:00
|
|
|
# \*-------------------------------------------------------------------------*/
|
2010-10-07 03:00:07 +00:00
|
|
|
|
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
|
2016-05-25 13:31:52 +00:00
|
|
|
PROJECT(foam-extend-4.0)
|
2010-10-07 03:00:07 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2015-09-16 00:47:54 +00:00
|
|
|
# Utility functions
|
|
|
|
#
|
|
|
|
# GetHostName(var)
|
|
|
|
#
|
|
|
|
# Set the variable named ${var} to the host hostname
|
|
|
|
#
|
|
|
|
function(GetHostName var)
|
|
|
|
set( thisHostName "unknown")
|
|
|
|
|
|
|
|
if(CMAKE_HOST_WIN32)
|
|
|
|
execute_process(
|
|
|
|
COMMAND hostname
|
|
|
|
OUTPUT_VARIABLE thisHostname
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
execute_process(
|
|
|
|
COMMAND hostname -f
|
|
|
|
OUTPUT_VARIABLE thisHostname
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
set(${var} ${thisHostname} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
#
|
|
|
|
# GetGitStatus(status ecode)
|
|
|
|
#
|
|
|
|
# Get the git status for the local git repository of the source code
|
|
|
|
# The variable named ${status} will get the git status
|
|
|
|
# The variable named ${ecode} will get the command error code
|
|
|
|
#
|
|
|
|
function(GetGitStatus _status _ecode)
|
|
|
|
set( git_status "unknown")
|
|
|
|
set( git_ecode "1")
|
|
|
|
|
|
|
|
execute_process(
|
|
|
|
COMMAND git status
|
|
|
|
WORKING_DIRECTORY ${FOAM_ROOT}
|
|
|
|
OUTPUT_VARIABLE git_status
|
|
|
|
RESULT_VARIABLE git_ecode
|
|
|
|
ERROR_QUIET
|
|
|
|
)
|
|
|
|
set(${_status} ${git_status} PARENT_SCOPE)
|
|
|
|
set(${_ecode} ${git_ecode} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
#
|
|
|
|
# GetGitBranchName(var)
|
|
|
|
#
|
|
|
|
# Set the variable named ${var} to the git branch name of the source code
|
|
|
|
#
|
|
|
|
function(GetGitBranchName var)
|
|
|
|
set( retValue "unknown")
|
|
|
|
|
|
|
|
execute_process(
|
|
|
|
COMMAND git branch --no-color
|
|
|
|
WORKING_DIRECTORY ${FOAM_ROOT}
|
|
|
|
OUTPUT_VARIABLE listOfGitBranches
|
|
|
|
)
|
|
|
|
# Create list of strings
|
|
|
|
string(REPLACE "\n" ";" listOfGitBranches ${listOfGitBranches})
|
|
|
|
|
|
|
|
# Iterate over list, find the string beginning with "* "
|
|
|
|
foreach(branch ${listOfGitBranches})
|
|
|
|
string(REGEX MATCH "\\* .*$" matchString ${branch})
|
|
|
|
string(LENGTH "${matchString}" lengthMatchString)
|
|
|
|
if(lengthMatchString GREATER 0)
|
|
|
|
# We have match. Cleanup and set retValue
|
|
|
|
string(REPLACE "* " "" retValue ${matchString})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
set(${var} ${retValue} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
#
|
|
|
|
# GetGitRevNumber(var)
|
|
|
|
#
|
|
|
|
# Set the variable named ${var} to the git revision number of the source code
|
|
|
|
#
|
|
|
|
function(GetGitRevNumber var)
|
|
|
|
set( retValue "unknown")
|
|
|
|
|
|
|
|
execute_process(
|
|
|
|
COMMAND git rev-parse --short=12 HEAD
|
|
|
|
WORKING_DIRECTORY ${FOAM_ROOT}
|
|
|
|
OUTPUT_VARIABLE git_rev_number
|
|
|
|
)
|
|
|
|
|
|
|
|
# Minimal check that we do have a valid string
|
|
|
|
string(LENGTH "${git_rev_number}" lengthString)
|
|
|
|
if(lengthString GREATER 0)
|
|
|
|
set(retValue ${git_rev_number})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(${var} ${retValue} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
# CleanUpStringForCDash(var)
|
|
|
|
#
|
|
|
|
# Cleanup the variable named ${value} for characters not supported
|
|
|
|
# for CDash identifiers. Return the modified value in retVar
|
|
|
|
#
|
|
|
|
function(CleanUpStringForCDash value retVar)
|
|
|
|
string(REPLACE "/" "_" value "${value}")
|
|
|
|
string(REPLACE " " "_" value ${value})
|
|
|
|
set(${retVar} ${value} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
#
|
2010-10-07 03:00:07 +00:00
|
|
|
# Initialization of CTest specific variables
|
2015-08-26 02:57:42 +00:00
|
|
|
#
|
|
|
|
## Run ctest in parallel if environment variable WM_NCOMPPROCS is set
|
|
|
|
IF (NOT $ENV{WM_NCOMPPROCS} STREQUAL "")
|
|
|
|
# Will run ctest in parallel over $WM_NCOMPPROCS processors
|
|
|
|
set(CMAKE_CTEST_COMMAND ${CMAKE_CTEST_COMMAND} --parallel $ENV{WM_NCOMPPROCS})
|
|
|
|
MESSAGE("Running tests in parallel using $ENV{WM_NCOMPPROCS} processors")
|
|
|
|
ENDIF ()
|
2010-10-07 03:00:07 +00:00
|
|
|
|
|
|
|
# Initialize the site name
|
|
|
|
|
|
|
|
IF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
|
|
|
|
# We can override the site name with the environment variable
|
|
|
|
# $CDASH_SUBMIT_LOCAL_HOST_ID
|
|
|
|
SET(
|
|
|
|
SITENAME $ENV{CDASH_SUBMIT_LOCAL_HOST_ID}
|
2013-07-18 01:43:15 +00:00
|
|
|
CACHE STRING "Name of the local site"
|
2010-10-07 03:00:07 +00:00
|
|
|
)
|
2015-09-16 00:47:54 +00:00
|
|
|
ELSE ()
|
2010-10-07 03:00:07 +00:00
|
|
|
# Grab the hostname FQN; will be used for the sitename
|
2015-09-16 00:47:54 +00:00
|
|
|
GetHostName(SITENAME)
|
|
|
|
|
|
|
|
ENDIF()
|
2010-10-07 03:00:07 +00:00
|
|
|
|
|
|
|
MESSAGE("Initializing the name of this local site to: ${SITENAME}")
|
|
|
|
|
|
|
|
SET(
|
|
|
|
SITE ${SITENAME}
|
|
|
|
CACHE STRING "Name of the local site"
|
|
|
|
)
|
|
|
|
|
2013-12-16 14:35:43 +00:00
|
|
|
#Grab the FOAM installation directory.
|
2010-10-07 03:00:07 +00:00
|
|
|
SET(
|
2015-08-15 18:23:15 +00:00
|
|
|
FOAM_ROOT $ENV{WM_PROJECT_DIR}
|
2013-12-16 14:35:43 +00:00
|
|
|
CACHE INTERNAL "FOAM root directory."
|
2010-10-07 03:00:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Construct the build name.
|
|
|
|
# No need to add $WM_PROJECT_VERSION to the name of the build,
|
|
|
|
# the test harness name should have taken care of that.
|
|
|
|
SET(
|
|
|
|
BUILDNAME $ENV{WM_OPTIONS}
|
|
|
|
CACHE STRING "Build ID"
|
|
|
|
)
|
|
|
|
|
2015-08-18 13:51:41 +00:00
|
|
|
# We allow overriding the git branch and revision information with some
|
2015-08-15 18:23:15 +00:00
|
|
|
# user-supplied information using the CDASH_SCM_INFO environment variable.
|
|
|
|
#
|
2015-08-18 13:51:41 +00:00
|
|
|
# Mercurial or other SCM users should be using this environment variable
|
2015-08-15 18:23:15 +00:00
|
|
|
# in order to provide branch and revision information for the buildname.
|
|
|
|
#
|
|
|
|
# Git users should use this environment variable in order to provide
|
|
|
|
# additionnal information instead of just the branch and revision number.
|
|
|
|
#
|
|
|
|
# Otherwise, the buildname will be appended with the following information:
|
|
|
|
# -git-branch=the_git_branch_name-git-rev=the_git_revision_number
|
|
|
|
SET(
|
|
|
|
BUILDNAME_SCM_INFO $ENV{CDASH_SCM_INFO}
|
|
|
|
CACHE STRING "SCM info for CDash buildname"
|
|
|
|
)
|
|
|
|
|
2010-10-07 03:00:07 +00:00
|
|
|
# Find out the version of the compiler being used.
|
2013-07-18 01:02:34 +00:00
|
|
|
# Add this information to the buildname
|
2010-10-15 21:24:50 +00:00
|
|
|
# This is for gcc or icc because they both support the -dumpversion option
|
|
|
|
EXEC_PROGRAM($ENV{WM_CC}
|
|
|
|
ARGS -dumpversion
|
|
|
|
OUTPUT_VARIABLE COMPILER_VERSION
|
|
|
|
)
|
2013-07-18 01:02:34 +00:00
|
|
|
SET(BUILDNAME "${BUILDNAME}-$ENV{WM_CC}${COMPILER_VERSION}")
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
|
|
|
# We will support more compilers eventually.
|
2013-07-18 01:02:34 +00:00
|
|
|
#
|
2010-10-07 03:00:07 +00:00
|
|
|
|
2012-05-11 15:47:43 +00:00
|
|
|
# Timeout for running every single test: 4 hours: 4 x 3600 seconds
|
2010-10-07 03:00:07 +00:00
|
|
|
#SET(
|
|
|
|
# DART_TESTING_TIMEOUT 14400
|
|
|
|
# CACHE STRING "Maximum time allowed (4 hours) before CTest will kill the test."
|
|
|
|
#)
|
2013-12-11 10:51:34 +00:00
|
|
|
# Timeout for running all this: 20 minutes : 1200 seconds (for debug)
|
2010-10-07 03:00:07 +00:00
|
|
|
SET(
|
2013-12-11 10:51:34 +00:00
|
|
|
DART_TESTING_TIMEOUT 1200
|
|
|
|
CACHE STRING "Maximum time allowed (20 minutes) before CTest will kill the test."
|
2010-10-07 03:00:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(
|
|
|
|
CMAKE_VERBOSE_MAKEFILE TRUE
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Update section
|
|
|
|
#-----------------------------------------------------------------------------
|
2010-10-09 18:58:08 +00:00
|
|
|
set (UPDATE_TYPE git)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Using GIT as SCM
|
|
|
|
#
|
|
|
|
find_package(Git)
|
2010-10-15 21:24:50 +00:00
|
|
|
|
2015-08-15 18:23:15 +00:00
|
|
|
if(NOT BUILDNAME_SCM_INFO STREQUAL "")
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-${BUILDNAME_SCM_INFO}")
|
2015-05-28 16:13:15 +00:00
|
|
|
|
2015-08-15 18:23:15 +00:00
|
|
|
elseif(GIT_FOUND)
|
|
|
|
message("The git command was found: ${GIT_EXECUTABLE}")
|
2015-08-18 13:51:41 +00:00
|
|
|
|
2015-08-15 18:23:15 +00:00
|
|
|
# Check if the source code is under a valid git repository
|
2015-09-16 00:47:54 +00:00
|
|
|
GetGitStatus(GIT_STATUS GIT_ECODE)
|
2015-08-15 18:23:15 +00:00
|
|
|
|
|
|
|
if(NOT GIT_ECODE)
|
2015-09-16 00:47:54 +00:00
|
|
|
# We have a valid git repository.
|
|
|
|
# Grab the branch and revision info. Add to the build name
|
|
|
|
GetGitBranchName(GIT_BRANCH_NAME)
|
2015-08-15 18:23:15 +00:00
|
|
|
message("Git branch: ${GIT_BRANCH_NAME}")
|
|
|
|
|
2015-09-16 00:47:54 +00:00
|
|
|
GetGitRevNumber(GIT_REV_NUMBER)
|
2015-08-15 18:23:15 +00:00
|
|
|
message("Git revision: ${GIT_REV_NUMBER}")
|
|
|
|
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}")
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-git-rev=${GIT_REV_NUMBER}")
|
2015-08-18 13:51:41 +00:00
|
|
|
else()
|
|
|
|
execute_process(
|
|
|
|
COMMAND hg id
|
|
|
|
WORKING_DIRECTORY ${FOAM_ROOT}
|
|
|
|
OUTPUT_VARIABLE HG_STATUS
|
|
|
|
RESULT_VARIABLE HG_ECODE
|
|
|
|
ERROR_QUIET
|
|
|
|
)
|
|
|
|
if(NOT HG_ECODE)
|
|
|
|
# We have a valid git repository. Grab the branch and revision info.
|
|
|
|
# Add to the build name
|
|
|
|
message("No git-branch. Mercurial?")
|
|
|
|
EXEC_PROGRAM(hg
|
|
|
|
ARGS id --bookmarks
|
|
|
|
OUTPUT_VARIABLE GIT_BRANCH_NAME
|
|
|
|
)
|
|
|
|
EXEC_PROGRAM(hg
|
|
|
|
ARGS id --id
|
|
|
|
OUTPUT_VARIABLE GIT_REV_NUMBER
|
|
|
|
)
|
|
|
|
EXEC_PROGRAM(hg
|
|
|
|
ARGS log --template='git_{gitnode|short}' -l 1
|
|
|
|
OUTPUT_VARIABLE GIT_REAL_REV_NUMBER
|
|
|
|
)
|
|
|
|
string(REPLACE " " "_" GIT_BRANCH_NAME ${GIT_BRANCH_NAME})
|
|
|
|
string(REPLACE "+" ":modified" GIT_REV_NUMBER ${GIT_REV_NUMBER})
|
|
|
|
SET(GIT_REV_NUMBER "${GIT_REV_NUMBER}_${GIT_REAL_REV_NUMBER}")
|
|
|
|
message("Git branch (mercurial): ${GIT_BRANCH_NAME} Revision: ${GIT_REV_NUMBER}")
|
|
|
|
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-hg-branch=${GIT_BRANCH_NAME}")
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-hg-rev=${GIT_REV_NUMBER}")
|
|
|
|
else()
|
|
|
|
# Not a git or mercurial repository: no branch nor revision information available
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-git-branch=unknown")
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-git-rev=unknown")
|
|
|
|
endif()
|
|
|
|
endif()
|
2015-08-15 18:23:15 +00:00
|
|
|
else()
|
|
|
|
# Git is not available: no branch nor revision information supplied
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-git-branch=unknown")
|
|
|
|
SET(BUILDNAME "${BUILDNAME}-git-rev=unknown")
|
2010-10-09 18:58:08 +00:00
|
|
|
endif()
|
2010-10-07 03:00:07 +00:00
|
|
|
|
2010-10-15 21:24:50 +00:00
|
|
|
# Some last minute cleanup
|
2015-08-15 18:23:15 +00:00
|
|
|
# Seems like no '/' or ' 'are allowed in the BUILDNAME or in the SITE name
|
2015-09-16 00:47:54 +00:00
|
|
|
CleanUpStringForCDash(${BUILDNAME} BUILDNAME)
|
|
|
|
CleanUpStringForCDash(${SITE} SITE)
|
2010-10-15 21:24:50 +00:00
|
|
|
|
2015-08-18 13:51:41 +00:00
|
|
|
message("Build name: ${BUILDNAME}")
|
2015-09-16 00:47:54 +00:00
|
|
|
message("Site name: ${SITE}")
|
2015-08-18 13:51:41 +00:00
|
|
|
|
2015-09-16 00:47:54 +00:00
|
|
|
#
|
2010-10-07 03:00:07 +00:00
|
|
|
# Build section
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2013-12-16 14:35:43 +00:00
|
|
|
# Compile FOAM, libs and apps
|
|
|
|
add_custom_target (foam-extend-$ENV{WM_PROJECT_VERSION} ALL
|
2015-08-15 18:23:15 +00:00
|
|
|
${FOAM_ROOT}/Allwmake
|
2010-10-07 03:00:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set_property(
|
2013-12-16 14:35:43 +00:00
|
|
|
TARGET foam-extend-$ENV{WM_PROJECT_VERSION}
|
|
|
|
PROPERTY LABELS foam-extend-$ENV{WM_PROJECT_VERSION}
|
2010-10-07 03:00:07 +00:00
|
|
|
)
|
|
|
|
|
2013-12-16 14:35:43 +00:00
|
|
|
# Compile the FOAM unit tests located under applications/test
|
2010-10-07 03:00:07 +00:00
|
|
|
# This part will not be compiled and run by default.
|
|
|
|
# This would be a good candidate for a sub-project
|
2013-12-16 14:35:43 +00:00
|
|
|
add_custom_target (foam-extend-$ENV{WM_PROJECT_VERSION}_unitTests
|
2015-08-15 18:23:15 +00:00
|
|
|
wmake all ${FOAM_ROOT}/applications/test
|
2010-10-07 03:00:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Test section
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#Enable testing and dashboard
|
|
|
|
ENABLE_TESTING()
|
|
|
|
INCLUDE(CTest)
|
|
|
|
|
2010-10-09 18:58:08 +00:00
|
|
|
SET (CTEST_UPDATE_COMMAND ${GIT_EXECUTABLE})
|
2010-10-07 03:00:07 +00:00
|
|
|
|
|
|
|
SET(
|
|
|
|
CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000
|
|
|
|
CACHE INTERNAL "Max number of errors"
|
|
|
|
)
|
|
|
|
SET(
|
|
|
|
CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000
|
|
|
|
CACHE INTERNAL "Max number of warnings"
|
|
|
|
)
|
|
|
|
|
|
|
|
IF(BUILD_TESTING)
|
|
|
|
|
|
|
|
# Modify this variable if you want the full length test case simulations
|
|
|
|
# Beware, this might take a long time to execute.
|
2013-07-18 01:02:34 +00:00
|
|
|
# Otherwise, the default behaviour is to run each tutorial for 1 "timestep"
|
2010-10-07 03:00:07 +00:00
|
|
|
#SET(RUN_FROM_ONE_TIMESTEP 0)
|
|
|
|
SET(RUN_FROM_ONE_TIMESTEP 1)
|
|
|
|
|
|
|
|
IF(RUN_FROM_ONE_TIMESTEP)
|
|
|
|
SET(testIdSuffix "_oneTimeStep")
|
|
|
|
ENDIF(RUN_FROM_ONE_TIMESTEP)
|
|
|
|
|
2013-12-16 14:35:43 +00:00
|
|
|
# FOAM will run against this test suite:
|
2010-10-07 03:00:07 +00:00
|
|
|
|
2013-12-16 14:35:43 +00:00
|
|
|
# Add the suite of FOAM tutorials
|
2010-10-07 03:00:07 +00:00
|
|
|
#
|
2013-12-16 14:35:43 +00:00
|
|
|
INCLUDE($ENV{FOAM_TEST_HARNESS_DIR}/CMakeFiles/FOAM_Tutorials.cmake)
|
2010-10-07 03:00:07 +00:00
|
|
|
|
|
|
|
IF(RUN_FROM_ONE_TIMESTEP)
|
|
|
|
# Modify the cases controlDict file in order to run for only one time step
|
|
|
|
MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}")
|
2015-09-16 13:27:34 +00:00
|
|
|
if(CMAKE_HOST_WIN32)
|
|
|
|
# Need to supply a bash shell to run the script under Windows
|
|
|
|
EXECUTE_PROCESS(
|
|
|
|
COMMAND bash -c "$ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}"
|
|
|
|
WORKING_DIRECTORY .
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
EXECUTE_PROCESS(
|
2010-10-07 03:00:07 +00:00
|
|
|
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}
|
|
|
|
WORKING_DIRECTORY .
|
|
|
|
)
|
2015-09-16 13:27:34 +00:00
|
|
|
endif()
|
2010-10-07 03:00:07 +00:00
|
|
|
ENDIF(RUN_FROM_ONE_TIMESTEP)
|
|
|
|
|
|
|
|
ENDIF(BUILD_TESTING)
|
|
|
|
|
|
|
|
# That's it.
|
|
|
|
#
|