Merge CMake FindMPI changes and CMake documentation from develop
This commit is contained in:
@@ -25,14 +25,11 @@ if(NOT SITE_OS_NAME)
|
||||
message(STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
|
||||
|
||||
set(CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
|
||||
if(USE_AUTOTOOLS)
|
||||
set(CTEST_BUILD_NAME "AT-${CTEST_BUILD_NAME}")
|
||||
endif()
|
||||
if(SITE_BUILDNAME_SUFFIX)
|
||||
set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
|
||||
set(CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
|
||||
endif()
|
||||
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
|
||||
else(NOT SITE_OS_NAME)
|
||||
else()
|
||||
## machine name provided
|
||||
## --------------------------
|
||||
if(CMAKE_HOST_UNIX)
|
||||
@@ -44,7 +41,7 @@ else(NOT SITE_OS_NAME)
|
||||
set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
|
||||
endif()
|
||||
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
|
||||
endif(NOT SITE_OS_NAME)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MAC machines need special option
|
||||
@@ -59,12 +56,12 @@ if(APPLE)
|
||||
if(NOT NO_MAC_FORTRAN)
|
||||
# Shared fortran is not supported, build static
|
||||
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
|
||||
else(NOT NO_MAC_FORTRAN)
|
||||
else()
|
||||
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
|
||||
endif(NOT NO_MAC_FORTRAN)
|
||||
endif()
|
||||
|
||||
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
|
||||
endif(APPLE)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
set(NEED_REPOSITORY_CHECKOUT 0)
|
||||
@@ -73,10 +70,10 @@ if(CTEST_USE_TAR_SOURCE)
|
||||
## Uncompress source if tar file provided
|
||||
## --------------------------
|
||||
if(WIN32)
|
||||
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_USE_TAR_SOURCE}.zip]")
|
||||
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
|
||||
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
|
||||
else()
|
||||
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
|
||||
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
|
||||
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
|
||||
endif()
|
||||
|
||||
@@ -88,7 +85,7 @@ if(CTEST_USE_TAR_SOURCE)
|
||||
|
||||
file(RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
|
||||
set(LOCAL_SKIP_UPDATE "TRUE")
|
||||
else(CTEST_USE_TAR_SOURCE)
|
||||
else()
|
||||
if(LOCAL_UPDATE)
|
||||
if(CTEST_USE_GIT_SOURCE)
|
||||
find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
|
||||
@@ -109,7 +106,7 @@ else(CTEST_USE_TAR_SOURCE)
|
||||
set(CTEST_GIT_options "pull")
|
||||
endif()
|
||||
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
|
||||
else(CTEST_USE_GIT_SOURCE)
|
||||
else()
|
||||
## --------------------------
|
||||
## use subversion to get source
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -140,9 +137,9 @@ else(CTEST_USE_TAR_SOURCE)
|
||||
set(CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
endif(CTEST_USE_GIT_SOURCE)
|
||||
endif(LOCAL_UPDATE)
|
||||
endif(CTEST_USE_TAR_SOURCE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
## Clear the build directory
|
||||
@@ -183,7 +180,7 @@ foreach(req
|
||||
if(NOT DEFINED ${req})
|
||||
message(FATAL_ERROR "The containing script must set ${req}")
|
||||
endif()
|
||||
endforeach(req)
|
||||
endforeach()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Initialize the CTEST commands
|
||||
@@ -201,7 +198,7 @@ else()
|
||||
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
## -- set output to english
|
||||
set($ENV{LC_MESSAGES} "en_EN")
|
||||
|
||||
Reference in New Issue
Block a user