From 83d7feb63c0d38387bfb7814ccfdaa70bc1b77cd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 20 Oct 2015 17:13:26 -0500 Subject: [svn-r28154] Correct define vs variable usage --- config/cmake/HDF518_Examples.cmake.in | 20 ++++++++++++++------ config/cmake/HDF5_Examples.cmake.in | 14 +++++++++++--- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 275730a..0e3b26d 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -2,19 +2,19 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: -# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log +# ctest -S HDF518_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log ############################################################################################################### set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) -#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") # handle input parameters to script. -#INSTALLDIR - HDF5 root folder +#INSTALLDIR - HDF5-1.8 root folder #CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF4Examples -#STATICLIBRARIES - Default is YES -#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) +#STATIC_LIBRARIES - Default is YES +#FORTRAN_LIBRARIES - Default is NO +##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) if(DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 @@ -38,10 +38,13 @@ endif() if(NOT DEFINED STATIC_LIBRARIES) set(STATICLIBRARIES "YES") endif() +if(NOT DEFINED FORTRAN_LIBRARIES) + set(FORTRANLIBRARIES "NO") +endif() #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source") +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source") #endif() ############################################################################################################### @@ -65,6 +68,11 @@ else(WIN32) set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") endif(WIN32) +if(${FORTRANLIBRARIES}) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +else() + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") +endif() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 275730a..a25eef5 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -7,14 +7,14 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) -#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") # handle input parameters to script. #INSTALLDIR - HDF5 root folder #CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo #CTEST_SOURCE_NAME - name of source folder; HDF4Examples -#STATICLIBRARIES - Default is YES -#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) +#STATIC_LIBRARIES - Default is YES +#FORTRAN_LIBRARIES - Default is NO +##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) if(DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 @@ -38,6 +38,9 @@ endif() if(NOT DEFINED STATIC_LIBRARIES) set(STATICLIBRARIES "YES") endif() +if(NOT DEFINED FORTRAN_LIBRARIES) + set(FORTRANLIBRARIES "NO") +endif() #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) @@ -65,6 +68,11 @@ else(WIN32) set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") endif(WIN32) +if(${FORTRANLIBRARIES}) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +else() + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") +endif() set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### -- cgit v0.12