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
339cb645
Commit
339cb645
authored
Dec 02, 2009
by
Christopher Bruns
Browse files
TestNormalModeLangevin now passes for both Release and Debug on Linux
parent
732eaf77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
25 deletions
+17
-25
plugins/normalModeLangevin/CMakeLists.txt
plugins/normalModeLangevin/CMakeLists.txt
+17
-25
No files found.
plugins/normalModeLangevin/CMakeLists.txt
View file @
339cb645
...
...
@@ -43,47 +43,39 @@ file(GLOB sources "${CMAKE_CURRENT_SOURCE_DIR}/platforms/reference/src/*.cpp")
set
(
nml_headers
${
nml_headers
}
${
headers
}
)
set
(
nml_sources
${
nml_sources
}
${
sources
}
)
add_library
(
NormalModeLangevin SHARED
${
nml_sources
}
${
nml_headers
}
)
set_target_properties
(
NormalModeLangevin PROPERTIES COMPILE_FLAGS
"-DOPENMM_BUILDING_SHARED_LIBRARY"
)
set
(
NML_PLUGIN NormalModeLangevin
)
# On Unix or Cygwin we have to add the debug suffix manually
if
(
UNIX
)
set_target_properties
(
NormalModeLangevin PROPERTIES DEBUG_OUTPUT_NAME NormalModeLangevin_d
)
endif
(
UNIX
)
target_link_libraries
(
NormalModeLangevin
${
SHARED_TARGET
}
)
# Copy plugin to test_plugin_dir
# TODO - move this up to top level CMakeLists.txt
set
(
test_plugin_dir
"
${
CMAKE_BINARY_DIR
}
/test_plugin_dir"
)
file
(
MAKE_DIRECTORY
"
${
test_plugin_dir
}
"
)
if
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
set
(
NML_PLUGIN
${
NML_PLUGIN
}
_d
)
endif
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
add_library
(
${
NML_PLUGIN
}
SHARED
${
nml_sources
}
${
nml_headers
}
)
set_target_properties
(
${
NML_PLUGIN
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_BUILDING_SHARED_LIBRARY"
)
target_link_libraries
(
${
NML_PLUGIN
}
${
SHARED_TARGET
}
)
if
(
BUILD_TESTING
)
# Copy plugin to test_plugin_dir
set
(
test_plugin_dir
"
${
CMAKE_BINARY_DIR
}
/test_plugin_dir"
)
file
(
MAKE_DIRECTORY
"
${
test_plugin_dir
}
"
)
# On Windows we need to copy the correct Release/Debug plugin for testing
if
(
MSVC
)
set
(
args -E copy $\
(
TargetPath\
)
\"
${
test_plugin_dir
}
\"
)
message
(
${
args
}
)
add_custom_command
(
TARGET NormalModeLangevin POST_BUILD
add_custom_command
(
TARGET
${
NML_PLUGIN
}
POST_BUILD
DEPENDS $
(
TargetPath
)
COMMAND
"
${
CMAKE_COMMAND
}
"
ARGS -E copy \"$\
(
TargetPath\
)
\" \"
${
test_plugin_dir
}
\"
COMMENT
"Copying normal mode langevin plugin for testing (WIN32)"
)
else
(
MSVC
)
get_target_property
(
old_loc NormalModeLangevin LOCATION
)
get_filename_component
(
new_loc
${
old_loc
}
NAME
)
set
(
new_loc
"
${
test_plugin_dir
}
/
${
new_loc
}
"
)
add_custom_command
(
DEPENDS
${
old_loc
}
NormalModeLangevin
OUTPUT
${
new_loc
}
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
old_loc
}
${
new_loc
}
)
add_custom_target
(
CopyTestNmlPlugin ALL
DEPENDS
"
${
new_loc
}
"
get_target_property
(
old_loc
${
NML_PLUGIN
}
LOCATION
)
add_custom_command
(
TARGET
${
NML_PLUGIN
}
POST_BUILD
COMMAND
"
${
CMAKE_COMMAND
}
"
ARGS -E copy
${
old_loc
}
${
test_plugin_dir
}
COMMENT
"Copying normal mode langevin plugin for testing"
)
endif
(
MSVC
)
add_subdirectory
(
test
)
endif
(
BUILD_TESTING
)
if
(
WIN32
)
# install DLL but not LIB
install
(
TARGETS
NormalModeLangevin
RUNTIME DESTINATION lib/plugins
)
install
(
TARGETS
${
NML_PLUGIN
}
RUNTIME DESTINATION lib/plugins
)
else
(
WIN32
)
install
(
TARGETS
NormalModeLangevin
LIBRARY DESTINATION lib/plugins
)
install
(
TARGETS
${
NML_PLUGIN
}
LIBRARY DESTINATION lib/plugins
)
endif
(
WIN32
)
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