Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
4dc66160
Commit
4dc66160
authored
Feb 03, 2017
by
peastman
Browse files
Fix compilation errors in static builds on Windows
parent
9567ddb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
CMakeLists.txt
CMakeLists.txt
+4
-4
No files found.
CMakeLists.txt
View file @
4dc66160
...
...
@@ -69,6 +69,9 @@ IF(WIN32)
ADD_DEFINITIONS
(
-DWIN32
)
ENDIF
(
WIN32
)
# What type of libraries to build
SET
(
OPENMM_BUILD_SHARED_LIB ON CACHE BOOL
"Whether to build shared OpenMM libraries"
)
SET
(
OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL
"Whether to build static OpenMM libraries"
)
# Include CPU-Features for Android
IF
(
ANDROID
)
...
...
@@ -283,7 +286,7 @@ IF (ANDROID OR PNACL)
ELSE
(
ANDROID OR PNACL
)
SET_SOURCE_FILES_PROPERTIES
(
${
CMAKE_SOURCE_DIR
}
/libraries/sfmt/src/SFMT.cpp PROPERTIES COMPILE_FLAGS
"-DHAVE_SSE2=1"
)
ENDIF
(
ANDROID OR PNACL
)
IF
(
NOT
(
ANDROID OR PNACL
))
IF
(
NOT
(
ANDROID OR PNACL
OR
(
WIN32 AND OPENMM_BUILD_STATIC_LIB
)
))
FILE
(
GLOB src_files
${
CMAKE_CURRENT_SOURCE_DIR
}
/libraries/asmjit/*/*.cpp
)
FILE
(
GLOB incl_files
${
CMAKE_CURRENT_SOURCE_DIR
}
/libraries/asmjit/*.h
)
SET
(
SOURCE_FILES
${
SOURCE_FILES
}
${
src_files
}
)
...
...
@@ -302,8 +305,6 @@ ENDIF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
SET
(
OPENMM_BUILD_SHARED_LIB ON CACHE BOOL
"Whether to build shared OpenMM libraries"
)
SET
(
EXTRA_LINK_FLAGS
${
EXTRA_COMPILE_FLAGS
}
)
IF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
IF
(
NOT ANDROID
)
...
...
@@ -319,7 +320,6 @@ IF(OPENMM_BUILD_SHARED_LIB)
SET_TARGET_PROPERTIES
(
${
SHARED_TARGET
}
PROPERTIES LINK_FLAGS
"
${
EXTRA_LINK_FLAGS
}
"
COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_BUILDING_SHARED_LIBRARY"
)
ENDIF
(
OPENMM_BUILD_SHARED_LIB
)
SET
(
OPENMM_BUILD_STATIC_LIB OFF CACHE BOOL
"Whether to build static OpenMM libraries"
)
IF
(
OPENMM_BUILD_STATIC_LIB
)
ADD_LIBRARY
(
${
STATIC_TARGET
}
STATIC
${
SOURCE_FILES
}
${
SOURCE_INCLUDE_FILES
}
${
API_ABS_INCLUDE_FILES
}
)
SET
(
EXTRA_COMPILE_FLAGS
"
${
EXTRA_COMPILE_FLAGS
}
-DOPENMM_USE_STATIC_LIBRARIES -DLEPTON_USE_STATIC_LIBRARIES -DPTW32_STATIC_LIB"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment