Commit a55a84c7 authored by peastman's avatar peastman
Browse files

Fixed compilation errors on Windows

parent d85f7998
#ifndef OPENMM_OSRNGSEED_H_ #ifndef OPENMM_OSRNGSEED_H_
#define OPENMM_OSRNGSEED_H_ #define OPENMM_OSRNGSEED_H_
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. * * USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#include "windowsExport.h"
/** /**
* Return an integer int for use as a seed for a random number generator. * Return an integer int for use as a seed for a random number generator.
...@@ -42,6 +42,6 @@ ...@@ -42,6 +42,6 @@
* this uses CryptGenRandom from the CryptoAPI to get a single int. On other * this uses CryptGenRandom from the CryptoAPI to get a single int. On other
* platforms (*nix, apple), we read from /dev/urandom * platforms (*nix, apple), we read from /dev/urandom
*/ */
int osrngseed(void); int OPENMM_EXPORT osrngseed(void);
#endif /* OPENMM_OSRNGSEED_H_ */ #endif /* OPENMM_OSRNGSEED_H_ */
\ No newline at end of file
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#ifdef WIN32 #ifdef WIN32
#define NOMINMAX #define NOMINMAX
#include <windows.h> #include <windows.h>
#include <intrin.h>
#else #else
#ifdef __ANDROID__ #ifdef __ANDROID__
#include <cpu-features.h> #include <cpu-features.h>
...@@ -89,7 +90,7 @@ static int getNumProcessors() { ...@@ -89,7 +90,7 @@ static int getNumProcessors() {
/** /**
* Get a description of the CPU's capabilities. * Get a description of the CPU's capabilities.
*/ */
#ifdef _WIN32 #ifdef WIN32
#define cpuid __cpuid #define cpuid __cpuid
#else #else
#if !defined(__ANDROID__) && !defined(__PNACL__) #if !defined(__ANDROID__) && !defined(__PNACL__)
......
...@@ -202,18 +202,17 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM, ...@@ -202,18 +202,17 @@ def buildKeywordDictionary(major_version_num=MAJOR_VERSION_NUM,
library_dirs=[openmm_lib_path] library_dirs=[openmm_lib_path]
include_dirs=openmm_include_path.split(';') include_dirs=openmm_include_path.split(';')
setupKeywords["ext_modules"] = [ extensionArgs = {"name": "simtk.openmm._openmm",
Extension(name = "simtk.openmm._openmm", "sources": ["src/swig_doxygen/OpenMMSwig.cxx"],
sources = ["src/swig_doxygen/OpenMMSwig.cxx"], "include_dirs": include_dirs,
include_dirs = include_dirs, "define_macros": define_macros,
define_macros = define_macros, "library_dirs": library_dirs,
library_dirs = library_dirs, "libraries": libraries,
runtime_library_dirs = library_dirs, "extra_compile_args": extra_compile_args,
libraries = libraries, "extra_link_args": extra_link_args}
extra_compile_args=extra_compile_args, if platform.system() != "Windows":
extra_link_args=extra_link_args, extensionArgs["runtime_library_dirs"] = library_dirs
) setupKeywords["ext_modules"] = [Extension(**extensionArgs)]
]
outputString = '' outputString = ''
firstTab = 40 firstTab = 40
......
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