added CTest and CPack to automate testing and package building

added build configuration for vs2008-64 on windows

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@9887 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2015-06-25 04:23:27 +00:00
parent 454c2cfc75
commit e0096c1221
3 changed files with 37 additions and 0 deletions

View File

@ -355,4 +355,12 @@ if (STANDALONE_BUILD EQUAL 1)
add_subdirectory(doc)
add_subdirectory(examples)
add_subdirectory(tests)
# enable dashboard scripting
include (CTest)
# enable distribution creation
set(CPACK_PACKAGE_VERSION "3.2.0")
set(CPACK_PACKAGE_VENDOR "USGS")
include (CPack)
endif()

3
vs2008-64.bat Normal file
View File

@ -0,0 +1,3 @@
rd /s /q _vs2008-64
REM ctest -S vs2008-64.cmake -C Release --debug -VV -O vs2008-64.log
ctest -S vs2008-64.cmake -C Release -V -O vs2008-64.log

26
vs2008-64.cmake Normal file
View File

@ -0,0 +1,26 @@
set(CTEST_BUILD_NAME "VS2008-x64-fortran")
set(CTEST_SITE "IGSKAHHWWSCHARL")
set(CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/_vs2008-64")
set(CTEST_CMAKE_GENERATOR "Visual Studio 9 2008 Win64")
# Build Fortran test (First build option can't have any beginning whitespace)
set(ADD_BUILD_OPTIONS "-DIPHREEQC_FORTRAN_TESTING:BOOL=ON")
# Build Shared Libraries
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
# Build the testing tree
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=ON")
# Enable Fortran module
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DIPHREEQC_ENABLE_MODULE:BOOL=ON")
CTEST_START("Experimental")
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}"
OPTIONS "${ADD_BUILD_OPTIONS}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" TARGET PACKAGE)
###CTEST_SUBMIT()