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
54ef6b4c
Commit
54ef6b4c
authored
Aug 02, 2013
by
peastman
Browse files
Get the version number from the CMake script
parent
9d11cedc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
CMakeLists.txt
CMakeLists.txt
+2
-2
olla/src/Platform.cpp
olla/src/Platform.cpp
+5
-1
wrappers/python/CMakeLists.txt
wrappers/python/CMakeLists.txt
+2
-1
wrappers/python/setup.py
wrappers/python/setup.py
+5
-5
No files found.
CMakeLists.txt
View file @
54ef6b4c
...
...
@@ -130,8 +130,8 @@ ENDIF (NOT CMAKE_CXX_FLAGS_RELEASE)
# and make it available to the code so it can be built into the binaries.
SET
(
OPENMM_LIBRARY_NAME OpenMM
)
SET
(
OPENMM_MAJOR_VERSION
1
)
SET
(
OPENMM_MINOR_VERSION
0
)
SET
(
OPENMM_MAJOR_VERSION
5
)
SET
(
OPENMM_MINOR_VERSION
2
)
SET
(
OPENMM_BUILD_VERSION 0
)
SET
(
OPENMM_COPYRIGHT_YEARS
"2008"
)
...
...
olla/src/Platform.cpp
View file @
54ef6b4c
...
...
@@ -279,8 +279,12 @@ const string& Platform::getDefaultPluginsDirectory() {
return
directory
;
}
// Some bizarre preprocessor magic required to convert a macro to a string...
#define STRING1(x) #x
#define STRING(x) STRING1(x)
const
string
&
Platform
::
getOpenMMVersion
()
{
static
const
string
version
=
"5.1"
;
static
const
string
version
=
STRING
(
OPENMM_MAJOR_VERSION
)
"."
STRING
(
OPENMM_MINOR_VERSION
)
;
return
version
;
}
...
...
wrappers/python/CMakeLists.txt
View file @
54ef6b4c
...
...
@@ -21,8 +21,9 @@ set(STAGING_OUTPUT_FILES "") # Will contain all required package files
file
(
GLOB STAGING_INPUT_FILES RELATIVE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/MANIFEST.in"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/README.txt"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
*
.py"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
filterPythonFiles
.py"
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/setup.py
${
OPENMM_PYTHON_STAGING_DIR
}
/setup.py
)
###########################################################
### Check the git revision of the source, and write it ###
...
...
wrappers/python/setup.py
View file @
54ef6b4c
...
...
@@ -13,9 +13,9 @@ import sys
import
platform
from
distutils.core
import
setup
MAJOR_VERSION_NUM
=
'
5
'
MINOR_VERSION_NUM
=
'
1
'
BUILD_INFO
=
'
0
'
MAJOR_VERSION_NUM
=
'
@OPENMM_MAJOR_VERSION@
'
MINOR_VERSION_NUM
=
'
@OPENMM_MINOR_VERSION@
'
BUILD_INFO
=
'
@OPENMM_BUILD_VERSION@
'
IS_RELEASED
=
False
...
...
@@ -67,7 +67,7 @@ def uninstall(verbose=True):
sys
.
path
=
save_path
def
write
_v
ersion
_p
y
(
filename
=
"simtk/openmm/version.py"
,
major_version_num
=
MAJOR_VERSION_NUM
,
def
write
V
ersion
P
y
(
filename
=
"simtk/openmm/version.py"
,
major_version_num
=
MAJOR_VERSION_NUM
,
minor_version_num
=
MINOR_VERSION_NUM
,
build_info
=
BUILD_INFO
):
"""Write a version.py file into the python source directory before installation.
If a version.py file already exists, we assume that it contains only the git_revision
...
...
@@ -238,7 +238,7 @@ def main():
uninstall
()
except
:
pass
write
_v
ersion
_p
y
()
write
V
ersion
P
y
()
setupKeywords
=
buildKeywordDictionary
()
setup
(
**
setupKeywords
)
...
...
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