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