Commit 16820cf7 authored by bonnell's avatar bonnell
Browse files

Add ability to specify config-site file from cmake command line via -D...

Add ability to specify config-site file from cmake command line via -D VISIT_CONFIG_SITE="/path/to/config-site/file"


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12221 18c085ea-50e0-402c-830e-de6fd14e8384
parent eb78ad63
......@@ -153,6 +153,11 @@
# Allow host-specific config-site files for Windows build. If there is no
# host-specific file, then windows.cmake is still used.
#
# Kathleen Bonnell, Fri Aug 13 10:50:15 MST 2010
# Allow config-site file to be specified on command-line. Overrides
# host-specific (all platforms) or windows.cmake (on windows).
# usage: -D VISIT_CONFIG_SITE="/path/to/config-site/file"
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
......@@ -204,8 +209,13 @@ ENDFUNCTION(VISIT_OPTION_DEFAULT var)
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/SetupITAPS.cmake)
IF (NOT WIN32)
MESSAGE(STATUS "Trying to include config-site/${HOSTNAME}.cmake")
INCLUDE(config-site/${HOSTNAME}.cmake OPTIONAL)
IF (VISIT_CONFIG_SITE)
MESSAGE(STATUS "Trying to include ${VISIT_CONFIG_SITE}")
INCLUDE(${VISIT_CONFIG_SITE} OPTIONAL)
ELSE(VISIT_CONFIG_SITE)
MESSAGE(STATUS "Trying to include config-site/${HOSTNAME}.cmake")
INCLUDE(config-site/${HOSTNAME}.cmake OPTIONAL)
ENDIF(VISIT_CONFIG_SITE)
ENDIF (NOT WIN32)
......@@ -243,13 +253,16 @@ ENDIF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
# the windows cmake file.
#-----------------------------------------------------------------------------
IF (WIN32)
IF (EXISTS ${VISIT_SOURCE_DIR}/config-site/${HOSTNAME}.cmake)
IF (VISIT_CONFIG_SITE)
MESSAGE(STATUS "Trying to include ${VISIT_CONFIG_SITE}")
INCLUDE(${VISIT_CONFIG_SITE})
ELSEIF (EXISTS ${VISIT_SOURCE_DIR}/config-site/${HOSTNAME}.cmake)
MESSAGE(STATUS "Trying to include config-site/${HOSTNAME}.cmake")
INCLUDE(config-site/${HOSTNAME}.cmake)
ELSE (EXISTS ${VISIT_SOURCE_DIR}/config-site/${HOSTNAME}.cmake)
ELSE (VISIT_CONFIG_SITE)
MESSAGE(STATUS "Trying to include config-site/windows.cmake")
INCLUDE(config-site/windows.cmake)
ENDIF (EXISTS ${VISIT_SOURCE_DIR}/config-site/${HOSTNAME}.cmake)
ENDIF (VISIT_CONFIG_SITE)
SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "VisIt builds with rpath set." FORCE)
SET(VISIT_WIN_ICON_RESOURCE ${VISIT_WINDOWS_DIR}/resources/visitresources.rc)
ENDIF (WIN32)
......
# this section should go in its own "prepare windows type cmake file"
IF (MSVC_VERSION)
SET(ERRMSG "You have chosen a compiler version not currently supported. You will need to build all dependent 3rd party libraries with this compiler, and provide the correct locations for them.")
IF (NOT MSVC_VERSION LESS 1500)
MESSAGE(SEND_ERROR "${ERRMSG}")
IF (NOT MSVC_VERSION LESS 1600)
MESSAGE(WARNING "${ERRMSG}")
ELSEIF (NOT MSVC_VERSION LESS 1500)
SET(VISIT_MSVC_VERSION "MSVC90")
ELSEIF (NOT MSVC_VERSION LESS 1400)
SET(VISIT_MSVC_VERSION "MSVC80")
ELSEIF (NOT MSVC_VERSION LESS 1310)
SET(VISIT_MSVC_VERSION "MSVC71")
ELSE (NOT MSVC_VERSION LESS 1500)
ELSE (NOT MSVC_VERSION LESS 1600)
MESSAGE(SEND_ERROR "${ERRMSG}")
ENDIF (NOT MSVC_VERSION LESS 1500)
ENDIF (NOT MSVC_VERSION LESS 1600)
ELSE (MSVC_VERSION)
# For some reason, cmake doesnt' set MSVC_VERSION when .Net2003 compiler
# is chosen. Check a different flag.
......@@ -20,13 +23,26 @@ ELSE (MSVC_VERSION)
ENDIF (MSVC71)
ENDIF(MSVC_VERSION)
# this can be left in generic_windows.cmake, but allow user to
# have their own config-site file
IF (CMAKE_CL_64)
SET(VISIT_MSVC_VERSION "${VISIT_MSVC_VERSION}-x64")
ENDIF (CMAKE_CL_64)
SET(VISIT_WINDOWS_DIR ${VISIT_SOURCE_DIR}/../windowsbuild)
SET(VISITHOME ${VISIT_WINDOWS_DIR}/ThirdParty)
VISIT_OPTION_DEFAULT(VISIT_MESA_DIR ${VISITHOME}/Mesa)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-5.0.0e/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
#We actually want GTE 1500
IF(MSVC_VERSION GREATER 1499 OR CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-5.0.1a/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
ELSE(MSVC_VERSION GREATER 1499 OR CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-5.0.0e/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
ENDIF(MSVC_VERSION GREATER 1499 OR CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/Qt/lib/${VISIT_MSVC_VERSION})
VISIT_OPTION_DEFAULT(QT_DIR ${VISITHOME}/Qt)
SET(QT_QMAKE_EXECUTABLE ${VISIT_QT_BIN}/qmake.exe)
......@@ -36,7 +52,9 @@ VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/Python26/${VISIT_MSVC_VERSION
VISIT_OPTION_DEFAULT(VISIT_BOXLIB2D_DIR ${VISITHOME}/boxlib)
VISIT_OPTION_DEFAULT(VISIT_BOXLIB3D_DIR ${VISITHOME}/boxlib)
VISIT_OPTION_DEFAULT(VISIT_CCMIO_DIR ${VISITHOME}/ccmio)
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio)
IF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio)
ENDIF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns)
VISIT_OPTION_DEFAULT(VISIT_EXODUSII_DIR ${VISITHOME}/exodus)
VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal)
......@@ -48,7 +66,19 @@ VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part)
VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/Mili)
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf)
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo)
IF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo)
ELSE (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo_x64)
ENDIF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
##
## Xdmf
##
IF (NOT MSVC_VERSION LESS 1400)
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/${VISIT_MSVC_VERSION})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
ENDIF (NOT MSVC_VERSION LESS 1400)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment