Commit 5d836726 authored by bonnell's avatar bonnell
Browse files

Enable 64 bit builds on windows using VC9, add definitions to windows build...

Enable 64 bit builds on windows using VC9, add definitions to windows build for netcdf, cgns and exodus readers that allow proper imports of symbols from their respective libraries

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11479 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6c35130b
......@@ -312,7 +312,6 @@ VISIT_3RDPARTY_VAR(VISIT_SILO_DIR "Path containing the Silo library's inclu
VISIT_3RDPARTY_DEP(VISIT_SILO_LIBDEP "Silo library dependencies" SILO_LIBDEP)
VISIT_3RDPARTY_VAR(VISIT_VISUS_DIR "Path containing the ViSUS library's include and lib" VISUS_DIR)
VISIT_3RDPARTY_VAR(VISIT_XDMF_DIR "Path containing the Xdmf library's include and lib" XDMF_DIR)
#-----------------------------------------------------------------------------
# Read the version
#-----------------------------------------------------------------------------
......@@ -542,7 +541,6 @@ INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
#INCLUDE(${CMAKE_ROOT}/Modules/CheckPrototypeExists.cmake)
IF(VISIT_PYTHON_SCRIPTING)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindVisItPython.cmake)
......@@ -1084,11 +1082,12 @@ ENDIF(UNIX AND NOT APPLE)
# Windows-specific settings
IF (WIN32)
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
IF ("${VISIT_MSVC_VERSION}" STREQUAL "MSVC80")
# we want GTE 1400
IF (MSVC_VERSION GREATER 1399)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
ADD_DEFINITIONS(-D_SCL_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF ("${VISIT_MSVC_VERSION}" STREQUAL "MSVC80")
ENDIF (MSVC_VERSION GREATER 1399)
# cmake automatically uses _DEBUG and MDd for Debug flags, but our
# third-party libs are NOT debug versions, so we won't be able to
......
# 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)
IF (NOT MSVC_VERSION LESS 1600)
MESSAGE(SEND_ERROR "${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)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-5.0.1a/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
ELSE(MSVC_VERSION GREATER 1499)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-5.0.0e/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
ENDIF(MSVC_VERSION GREATER 1499)
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,11 +52,15 @@ 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)
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4)
IF (NOT CMAKE_CL_64 AND(NOT ${VISIT_MSVC_VERSION} STREQUAL "MSVC90"))
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4)
ENDIF (NOT CMAKE_CL_64 AND(NOT ${VISIT_MSVC_VERSION} STREQUAL "MSVC90"))
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5)
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/lib/${VISIT_MSVC_VERSION} szlibdll)
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part)
......@@ -48,6 +68,11 @@ 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})
......@@ -48,6 +48,9 @@ ${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
)
IF(WIN32)
ADD_DEFINITIONS(-D_CGNSDLL)
ENDIF(WIN32)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${CGNS_LIBRARY_DIR} )
......
......@@ -50,6 +50,9 @@ ${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
)
IF(WIN32)
ADD_DEFINITIONS(-DEXODUSII_BUILD_SHARED_LIBRARIES)
ENDIF(WIN32)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${EXODUSII_LIBRARY_DIR} )
......
......@@ -76,6 +76,10 @@ ${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
)
IF(WIN32)
ADD_DEFINITIONS(-DDLL_NETCDF)
ENDIF(WIN32)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${NETCDF_LIBRARY_DIR} )
......
......@@ -48,6 +48,9 @@ ${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
)
IF(WIN32)
ADD_DEFINITIONS(-DDLL_NETCDF)
ENDIF(WIN32)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${NETCDF_LIBRARY_DIR} )
......
......@@ -413,7 +413,7 @@ avtS3DFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
scalar->hasDataExtents = false;
scalar->treatAsASCII = false;
NcAtt *units = v->get_att("units");
NcAtt *units = v->get_att(NcToken("units"));
if (units)
{
long nv = units->num_vals();
......@@ -769,7 +769,7 @@ avtS3DFileFormat::GetVar(int timeState, int domain, const char *varname)
}
// Get the scaling factor.
NcAtt *scaling = v->get_att("scale_factor");
NcAtt *scaling = v->get_att(NcToken("scale_factor"));
float scaling_factor = 1;
if (scaling)
{
......
......@@ -85,6 +85,10 @@
// the database plugins to also treat all flags in CXXFLAGS that start
// with "-I" as include paths.
//
// Kathleen Bonnell, Fri May 21 14:15:23 MST 2010
// Add DLL_NETCDF, _CGNSDLL EXODUSII_BUILD_SHARED_ZIBS defines for
// windows projects linking with NETCDF, CGNS or EXODUSII.
//
// ****************************************************************************
class CMakeGeneratorPlugin : public Plugin
......@@ -724,6 +728,12 @@ class CMakeGeneratorPlugin : public Plugin
needWindowsDefines = true;
else if(libs[i].contains("FITS"))
needWindowsDefines = true;
else if(libs[i].contains("NETCDF"))
needWindowsDefines = true;
else if(libs[i].contains("CGNS"))
needWindowsDefines = true;
else if(libs[i].contains("EXODUSII"))
needWindowsDefines = true;
}
if (needWindowsDefines)
{
......@@ -740,6 +750,12 @@ class CMakeGeneratorPlugin : public Plugin
out << " ADD_DEFINITIONS(-DMFHDFLIB_ -D_HDFLIB_)" << endl;
else if(libs[i].contains("FITS"))
out << " ADD_DEFINITIONS(-D_HDF5USEDLL_)" << endl;
else if(libs[i].contains("NETCDF"))
out << " ADD_DEFINITIONS(-DDLL_NETCDF)" << endl;
else if(libs[i].contains("CGNS"))
out << " ADD_DEFINITIONS(-D_CGNSDLL)" << endl;
else if(libs[i].contains("EXODUSII"))
out << " ADD_DEFINITIONS(-DEXODUSII_BUILD_SHARED_ZIBS)" << endl;
}
out << "ENDIF(WIN32)" << endl;
}
......
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