Commit 56e573e7 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Mods to get compilation on Windows

parent 3c16ceff
......@@ -20,6 +20,7 @@ SET(OPENMM_AMOEBA_SOURCE_SUBDIRS . )
# Collect up information about the version of the OpenMM library we're building
# and make it available to the code so it can be built into the binaries.
SET(OPENMM_AMOEBA_LIBRARY_NAME OpenMMAmoeba)
SET(OPENMM_SERIALIZATION_LIBRARY_NAME OpenMMSerialization)
SET(OPENMM_AMOEBA_SERIALIZATION_LIBRARY_NAME OpenMMAmoebaSerialization)
......@@ -78,7 +79,7 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src )
# Create the library
ADD_LIBRARY(${OPENMM_AMOEBA_SERIALIZATION_LIBRARY_NAME} SHARED ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
TARGET_LINK_LIBRARIES(${OPENMM_AMOEBA_SERIALIZATION_LIBRARY_NAME} ${SHARED_TARGET})
TARGET_LINK_LIBRARIES(${OPENMM_AMOEBA_SERIALIZATION_LIBRARY_NAME} ${OPENMM_AMOEBA_LIBRARY_NAME} ${OPENMM_SERIALIZATION_LIBRARY_NAME} ${SHARED_TARGET})
SET_TARGET_PROPERTIES(${OPENMM_AMOEBA_SERIALIZATION_LIBRARY_NAME} PROPERTIES COMPILE_FLAGS "-DOPENMM_BUILDING_SHARED_LIBRARY -DTIXML_USE_STL -DIEEE_8087")
INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /lib ${OPENMM_AMOEBA_SERIALIZATION_LIBRARY_NAME})
INSTALL_FILES(/include/openmm/serialization FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/openmm/serialization/SerializationNode.h)
......
......@@ -63,7 +63,7 @@ static void addCovalentMap( SerializationNode& particleExclusions, int particleI
}
}
int loadCovalentMap( const SerializationNode& map, std::vector< int >& covalentMap ){
void loadCovalentMap( const SerializationNode& map, std::vector< int >& covalentMap ){
for (unsigned int ii = 0; ii < map.getChildren().size(); ii++) {
covalentMap.push_back( map.getChildren()[ii].getIntProperty( "v" ) );
}
......
......@@ -100,8 +100,8 @@ extern "C" void registerAmoebaSerializationProxies() {
HMODULE handle = LoadLibrary(file.c_str());
SetErrorMode(oldErrorMode); // Restore previous error mode.
if (handle == NULL) {
string message;
stringstream(message) << "Error loading library " << file << ": " << GetLastError();
std::string message;
std::stringstream(message) << "Error loading library " << file << ": " << GetLastError();
throw OpenMMException(message);
}
#else
......
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