-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue421 durack1 add seawater packages #1072
Merged
aashish24
merged 7 commits into
CDAT:master
from
durack1:issue421_durack1_AddSeawaterPackages
Feb 27, 2015
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a321697
Merge branch 'master' into durack1_master
durack1 cc62a43
Fix #421 - Added python seawater and teos-10 gsw seawater libraries
durack1 781c7c5
Corrected to follow correct syntax
durack1 6a74967
Corrected to follow correct syntax
durack1 cc05841
Added numpy as dependency
durack1 7b38e3f
Added numpy as dependency
durack1 d2ee6ec
Changed SEAWATER_VERSION to GSW_VERSION
durack1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(gsw_deps ${python_pkg} ${numpy_pkg}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# gsw (Gibbs Seawater) | ||
# | ||
set(gsw_source_dir "${CMAKE_CURRENT_BINARY_DIR}/build/gsw") | ||
|
||
configure_file( | ||
"${cdat_CMAKE_SOURCE_DIR}/cdat_modules_extra/gsw_build_step.cmake.in" | ||
"${cdat_CMAKE_BINARY_DIR}/gsw_build_step.cmake" | ||
@ONLY | ||
) | ||
|
||
set(gsw_build_command ${CMAKE_COMMAND} -P ${cdat_CMAKE_BINARY_DIR}/gsw_build_step.cmake) | ||
|
||
ExternalProject_Add(gsw | ||
DOWNLOAD_DIR ${CDAT_PACKAGE_CACHE_DIR} | ||
SOURCE_DIR ${gsw_source_dir} | ||
URL ${GSW_URL}/${GSW_GZ} | ||
URL_MD5 ${GSW_MD5} | ||
BUILD_IN_SOURCE 1 | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${gsw_build_command} | ||
INSTALL_COMMAND "" | ||
DEPENDS ${gsw_deps} | ||
${ep_log_options} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set( GSW_MAJOR 3 ) | ||
set( GSW_MINOR 0 ) | ||
set( GSW_PATCH 3 ) | ||
set( GSW_VERSION ${GSW_MAJOR}.${GSW_MINOR}.${GSW_PATCH} ) | ||
set( GSW_URL ${LLNL_URL} ) | ||
set( GSW_GZ python-gsw-${SEAWATER_VERSION}.tar.gz ) | ||
set( GSW_MD5 a522a9ab6ab41fb70064e0378e904ffd ) | ||
|
||
set (nm GSW) | ||
string(TOUPPER ${nm} uc_nm) | ||
set(${uc_nm}_VERSION ${${nm}_MAJOR}.${${nm}_MINOR}.${${nm}_PATCH}) | ||
set(GSW_SOURCE ${GSW_URL}/${GSW_GZ}) | ||
|
||
if (CDAT_BUILD_ALL) | ||
add_cdat_package(gsw "" "" ON) | ||
else() | ||
add_cdat_package(gsw "" "" OFF) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(seawater_deps ${python_pkg} ${numpy_pkg}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# seawater | ||
# | ||
set(seawater_source_dir "${CMAKE_CURRENT_BINARY_DIR}/build/seawater") | ||
|
||
configure_file( | ||
"${cdat_CMAKE_SOURCE_DIR}/cdat_modules_extra/seawater_build_step.cmake.in" | ||
"${cdat_CMAKE_BINARY_DIR}/seawater_build_step.cmake" | ||
@ONLY | ||
) | ||
|
||
set(seawater_build_command ${CMAKE_COMMAND} -P ${cdat_CMAKE_BINARY_DIR}/seawater_build_step.cmake) | ||
|
||
ExternalProject_Add(seawater | ||
DOWNLOAD_DIR ${CDAT_PACKAGE_CACHE_DIR} | ||
SOURCE_DIR ${seawater_source_dir} | ||
URL ${SEAWATER_URL}/${SEAWATER_GZ} | ||
URL_MD5 ${SEAWATER_MD5} | ||
BUILD_IN_SOURCE 1 | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${seawater_build_command} | ||
INSTALL_COMMAND "" | ||
DEPENDS ${seawater_deps} | ||
${ep_log_options} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set( SEAWATER_MAJOR 3 ) | ||
set( SEAWATER_MINOR 3 ) | ||
set( SEAWATER_PATCH 2 ) | ||
set( SEAWATER_VERSION ${SEAWATER_MAJOR}.${SEAWATER_MINOR}.${SEAWATER_PATCH} ) | ||
set( SEAWATER_URL ${LLNL_URL} ) | ||
set( SEAWATER_GZ python-seawater-${SEAWATER_VERSION}.tar.gz ) | ||
set( SEAWATER_MD5 b23df1bbf3b96771aa9926dc851c4675 ) | ||
|
||
set (nm SEAWATER) | ||
string(TOUPPER ${nm} uc_nm) | ||
set(${uc_nm}_VERSION ${${nm}_MAJOR}.${${nm}_MINOR}.${${nm}_PATCH}) | ||
set(SEAWATER_SOURCE ${SEAWATER_URL}/${SEAWATER_GZ}) | ||
|
||
if (CDAT_BUILD_ALL) | ||
add_cdat_package(seawater "" "" ON) | ||
else() | ||
add_cdat_package(seawater "" "" OFF) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include(@cdat_CMAKE_BINARY_DIR@/cdat_common_environment.cmake) | ||
|
||
execute_process( | ||
COMMAND "@PYTHON_EXECUTABLE@" setup.py install @PYTHON_EXTRA_PREFIX@ | ||
WORKING_DIRECTORY "@gsw_source_dir@" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include(@cdat_CMAKE_BINARY_DIR@/cdat_common_environment.cmake) | ||
|
||
execute_process( | ||
COMMAND "@PYTHON_EXECUTABLE@" setup.py install @PYTHON_EXTRA_PREFIX@ | ||
WORKING_DIRECTORY "@seawater_source_dir@" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work. SEAWATER_VERSION is not set globally or in parent scope.