Commit 5d359189 authored by Brian Panneton's avatar Brian Panneton

Added Windows Support for Utils

parent 863de4fe
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
SET(CTEST_NIGHTLY_START_TIME "00:00:00 EDT")
SET(CTEST_PROJECT_NAME "Xdmf")
set(CTEST_PROJECT_NAME "Xdmf")
set(CTEST_NIGHTLY_START_TIME "21:00:00 EST")
SET(CTEST_DROP_METHOD "https")
SET(CTEST_DROP_SITE "hsai-web-origin.arl.army.mil")
SET(CTEST_DROP_LOCATION "/hsai/CDash/submit.php?project=Xdmf2")
set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "hsai-web-origin.arl.army.mil")
set(CTEST_DROP_LOCATION "/hsai/CDash/submit.php?project=Xdmf")
set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_CURL_OPTIONS "CURLOPT_SSL_VERIFYPEER_OFF;CURLOPT_SSL_VERIFYHOST_OFF")
SET(CTEST_DROP_SITE_CDASH True)
SET(CTEST_CURL_OPTIONS "CURLOPT_SSL_VERIFYPEER_OFF;CURLOPT_SSL_VERIFYHOST_OFF")
......@@ -35,10 +35,31 @@ endif(XDMF_BUILD_PARTITIONER)
add_library(XdmfUtils ${XdmfUtilsSources})
target_link_libraries(XdmfUtils ${XdmfUtilsLinkLibraries})
if(WIN32)
set_target_properties(${executable} PROPERTIES
DEFINE_SYMBOL XdmfUtils_EXPORTS
PREFIX ../
IMPORT_PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
endif(WIN32)
foreach(executable ${XdmfUtilsExecutables})
add_executable(${executable} ${executable})
set_target_properties(${executable} PROPERTIES COMPILE_FLAGS -DBUILD_EXE)
target_link_libraries(${executable} XdmfUtils)
if(WIN32)
set_target_properties(${executable} PROPERTIES
DEFINE_SYMBOL XdmfUtils_EXPORTS
PREFIX ../
IMPORT_PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
endif(WIN32)
endforeach(executable ${XdmfUtilsExecutables})
if(BUILD_TESTING)
......
......@@ -29,13 +29,14 @@ class XdmfItem;
// Includes
#include <string>
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
* @brief Compare differences between data stored in two Xdmf
* structures.
*/
class XdmfDiff {
class XDMFUTILS_EXPORT XdmfDiff {
public:
......@@ -92,3 +93,4 @@ private:
};
#endif /* XDMFDIFF_HPP_ */
......@@ -30,13 +30,14 @@ class XdmfUnstructuredGrid;
// Includes
#include <string>
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
* @brief Reads an ExodusII file from disk into an Xdmf structure in
* memory.
*/
class XdmfExodusReader {
class XDMFUTILS_EXPORT XdmfExodusReader {
public:
......
......@@ -29,13 +29,14 @@ class XdmfUnstructuredGrid;
// Includes
#include <string>
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
* @brief Writes an Xdmf structure in memory to an ExodusII file on
* disk.
*/
class XdmfExodusWriter {
class XDMFUTILS_EXPORT XdmfExodusWriter {
public:
......
......@@ -32,6 +32,7 @@ class XdmfUnstructuredGrid;
// Includes
#include <set>
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
......@@ -40,7 +41,7 @@ class XdmfUnstructuredGrid;
*
* XdmfPartitioner uses the metis library to partition XdmfGrids.
*/
class XdmfPartitioner {
class XDMFUTILS_EXPORT XdmfPartitioner {
public:
......
......@@ -103,7 +103,7 @@ namespace {
const shared_ptr<XdmfTopology> & newConnectivity,
const shared_ptr<XdmfGeometry> & newPoints) const
{
std::map<std::vector<double>, unsigned int>::const_iterator iter =
std::map<std::vector<double>, unsigned int, PointComparison>::const_iterator iter =
coordToIdMap.find(newPoint);
if(iter == coordToIdMap.end()) {
// Not inserted before
......
......@@ -30,6 +30,7 @@ class XdmfTopologyType;
class XdmfUnstructuredGrid;
// Includes
#include "XdmfUtils.hpp"
#include "XdmfSharedPtr.hpp"
/**
......@@ -53,7 +54,7 @@ class XdmfUnstructuredGrid;
* Hexahedron_64 to Hexahedron
* Hexahedron_125 to Hexahedron
*/
class XdmfTopologyConverter {
class XDMFUTILS_EXPORT XdmfTopologyConverter {
public:
......
/*****************************************************************************/
/* XDMF */
/* eXtensible Data Model and Format */
/* */
/* Id : Xdmf.hpp */
/* */
/* Author: */
/* Kenneth Leiter */
/* kenneth.leiter@arl.army.mil */
/* US Army Research Laboratory */
/* Aberdeen Proving Ground, MD */
/* */
/* Copyright @ 2011 US Army Research Laboratory */
/* All Rights Reserved */
/* See Copyright.txt for details */
/* */
/* This software is distributed WITHOUT ANY WARRANTY; without */
/* even the implied warranty of MERCHANTABILITY or FITNESS */
/* FOR A PARTICULAR PURPOSE. See the above copyright notice */
/* for more information. */
/* */
/*****************************************************************************/
#ifndef _XDMFUTILS_HPP
#define _XDMFUTILS_HPP
/* Keep all our Win32 Conversions here */
#ifdef _WIN32
/* Used to export/import from the dlls */
#undef XDMFCORE_EXPORT
#define XDMFCORE_EXPORT __declspec(dllimport)
#undef XDMFCORE_TEMPLATE
#define XDMFCORE_TEMPLATE extern
#undef XDMF_EXPORT
#define XDMF_EXPORT __declspec(dllimport)
#undef XDMF_TEMPLATE
#define XDMF_TEMPLATE extern
#ifdef XdmfUtils_EXPORTS
#define XDMFUTILS_EXPORT __declspec(dllexport)
#define XDMFUTILS_TEMPLATE
#else /* XdmfUtils_EXPORTS */
#define XDMFUTILS_EXPORT __declspec(dllimport)
#define XDMFUTILS_TEMPLATE extern
#endif /* XdmfUtils_EXPORTS */
/* Compiler Warnings */
#ifndef XDMF_DEBUG
#pragma warning( disable : 4231 ) /* nonstandard extension used : 'extern' before template explicit instantiation */
#pragma warning( disable : 4251 ) /* needs to have dll-interface to be used by clients (Most of these guys are in private */
#pragma warning( disable : 4275 ) /* non dll-interface class 'std::_Container_base_aux' used as base for dll-interface class */
#pragma warning( disable : 4373 ) /* virtual function overrides, parameters only differed by const/volatile qualifiers */
#pragma warning( disable : 4748 ) /* /GS can not protect parameters and local variables from local buffer overrun (turned off op)*/
#endif /* XDMF_DEBUG */
/* Compiler Optimizations will result in an 'internal compiler error', so turn them off */
#pragma optimize("g", off)
#else /* _WIN32 */
/* We don't need to export/import since there are no dlls */
#define XDMFCORE_EXPORT
#define XDMF_EXPORT
#define XDMFUTILS_EXPORT
#define XDMFCORE_TEMPLATE
#define XDMF_TEMPLATE
#define XDMFUTILS_TEMPLATE
#endif /* _WIN32 */
#endif /* _XDMFUTILS_HPP */
......@@ -50,6 +50,7 @@ swig -v -c++ -python -o XdmfUtilsPython.cpp XdmfUtils.i
#include <XdmfUnstructuredGrid.hpp>
// XdmfUtils Includes
#include <XdmfUtils.hpp>
#include <XdmfDiff.hpp>
#include <XdmfExodusReader.hpp>
#include <XdmfExodusWriter.hpp>
......@@ -78,6 +79,7 @@ swig -v -c++ -python -o XdmfUtilsPython.cpp XdmfUtils.i
#endif
%shared_ptr(XdmfTopologyConverter)
%include XdmfUtils.hpp
%include XdmfDiff.hpp
#ifdef XDMF_BUILD_EXODUS_IO
%include XdmfExodusReader.hpp
......
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