From ea311b8fd1ca1235d7935558df4dfcba50d4d423 Mon Sep 17 00:00:00 2001 From: "Paul J. Durack" Date: Tue, 24 Feb 2015 15:17:06 -0800 Subject: [PATCH] Fix #423 - Added python vacumm library --- CMake/cdat_modules/vacumm_deps.cmake | 1 + CMake/cdat_modules/vacumm_external.cmake | 24 +++++++++++++++++++ CMake/cdat_modules/vacumm_pkg.cmake | 18 ++++++++++++++ .../vacumm_build_step.cmake.in | 6 +++++ CMakeLists.txt | 1 + 5 files changed, 50 insertions(+) create mode 100644 CMake/cdat_modules/vacumm_deps.cmake create mode 100644 CMake/cdat_modules/vacumm_external.cmake create mode 100644 CMake/cdat_modules/vacumm_pkg.cmake create mode 100644 CMake/cdat_modules_extra/vacumm_build_step.cmake.in diff --git a/CMake/cdat_modules/vacumm_deps.cmake b/CMake/cdat_modules/vacumm_deps.cmake new file mode 100644 index 0000000000..4f54447004 --- /dev/null +++ b/CMake/cdat_modules/vacumm_deps.cmake @@ -0,0 +1 @@ +set(vacumm ${vacumm_pkg} ${python_pkg}) diff --git a/CMake/cdat_modules/vacumm_external.cmake b/CMake/cdat_modules/vacumm_external.cmake new file mode 100644 index 0000000000..f400b3e8db --- /dev/null +++ b/CMake/cdat_modules/vacumm_external.cmake @@ -0,0 +1,24 @@ +# vacumm +# +set(vacumm_source_dir "${CMAKE_CURRENT_BINARY_DIR}/build/vacumm") + +configure_file( + "${cdat_CMAKE_SOURCE_DIR}/cdat_modules_extra/vacumm_build_step.cmake.in" + "${cdat_CMAKE_BINARY_DIR}/vacumm_build_step.cmake" + @ONLY +) + +set(vacumm_build_command ${CMAKE_COMMAND} -P ${cdat_CMAKE_BINARY_DIR}/vacumm_build_step.cmake) + +ExternalProject_Add(vacumm + DOWNLOAD_DIR ${CDAT_PACKAGE_CACHE_DIR} + SOURCE_DIR ${vacumm_source_dir} + URL ${VACUMM_URL}/${VACUMM_GZ} + URL_MD5 ${VACUMM_MD5} + BUILD_IN_SOURCE 1 + CONFIGURE_COMMAND "" + BUILD_COMMAND ${vacumm_build_command} + INSTALL_COMMAND "" + DEPENDS ${vacumm_deps} + ${ep_log_options} +) diff --git a/CMake/cdat_modules/vacumm_pkg.cmake b/CMake/cdat_modules/vacumm_pkg.cmake new file mode 100644 index 0000000000..2d4b0316fd --- /dev/null +++ b/CMake/cdat_modules/vacumm_pkg.cmake @@ -0,0 +1,18 @@ +set( VACUMM_MAJOR 2 ) +set( VACUMM_MINOR 5 ) +set( VACUMM_PATCH 0-svn1791 ) +set( VACUMM_VERSION ${VACUMM_MAJOR}.${VACUMM_MINOR}.${VACUMM_PATCH} ) +set( VACUMM_URL ${LLNL_URL} ) +set( VACUMM_GZ vacumm-${VACUMM_VERSION}.tar.gz ) +set( VACUMM_MD5 9e9f8a1b66b4dcfa4e21519f6e5ed348 ) + +set (nm VACUMM) +string(TOUPPER ${nm} uc_nm) +set(${uc_nm}_VERSION ${${nm}_MAJOR}.${${nm}_MINOR}.${${nm}_PATCH}) +set(VACUMM_SOURCE ${VACUMM_URL}/${VACUMM_GZ}) + +if (CDAT_BUILD_ALL) + add_cdat_package(vacumm "" "" ON) +else() + add_cdat_package(vacumm "" "" OFF) +endif() diff --git a/CMake/cdat_modules_extra/vacumm_build_step.cmake.in b/CMake/cdat_modules_extra/vacumm_build_step.cmake.in new file mode 100644 index 0000000000..ad571c0727 --- /dev/null +++ b/CMake/cdat_modules_extra/vacumm_build_step.cmake.in @@ -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 "@vacumm_source_dir@" +) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37ab5b6432..13f52fd9dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -487,6 +487,7 @@ include(numpy_pkg) include(mpi_pkg) include(osmesa_pkg) include(python_pkg) +include(vacumm_pkg) if (CDAT_BUILD_PARALLEL) include(paraview_pkg) else()