Skip to content

Instantly share code, notes, and snippets.

@vmiheer
Created August 28, 2020 22:07
Show Gist options
  • Save vmiheer/f766c05fcc2ab806f63e509d435cca4e to your computer and use it in GitHub Desktop.
Save vmiheer/f766c05fcc2ab806f63e509d435cca4e to your computer and use it in GitHub Desktop.
Cmake for BeBOP Sparse Matrix Converter
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
ExternalProject_Add(bebop_make
URL http://bebop.cs.berkeley.edu/smc/tarballs/bebop_make.tar.gz
SOURCE_DIR bebop/bebop_make
CONFIGURE_COMMAND cmake -E cmake_echo_color --red --bold "Don't skip configuration step if on non-linux platform see ${CMAKE_CURRENT_BINARY_DIR}/bebop/bebop_make/README!"
BUILD_COMMAND cmake -E echo "Skipping build step."
INSTALL_COMMAND cmake -E echo "Skipping install step."
)
ExternalProject_Get_property(bebop_make SOURCE_DIR)
set(BEBOP_SOURCE_DIR ${SOURCE_DIR})
unset(SOURCE_DIR)
message("BEBOP_SOURCE_DIR: ${BEBOP_SOURCE_DIR}")
ExternalProject_Add(bebop_util
URL http://bebop.cs.berkeley.edu/smc/tarballs/bebop_util.tar.gz
SOURCE_DIR bebop/bebop_util
CONFIGURE_COMMAND cmake -E echo "Skipping configure step."
BUILD_COMMAND make
BUILD_IN_SOURCE TRUE
INSTALL_COMMAND cmake -E echo "Skipping install step."
DEPENDS bebop_make
)
ExternalProject_Get_property(bebop_util SOURCE_DIR)
set(BEBOP_UTIL_SOURCE_DIR ${SOURCE_DIR})
unset(SOURCE_DIR)
message("BEBOP_UTIL_SOURCE_DIR: ${BEBOP_UTIL_SOURCE_DIR}")
ExternalProject_Add(sparse_matrix_converter
URL http://bebop.cs.berkeley.edu/smc/tarballs/sparse_matrix_converter.tar.gz
SOURCE_DIR bebop/sparse_matrix_converter
CONFIGURE_COMMAND cmake -E echo "Skipping configure step."
BUILD_COMMAND make
BUILD_IN_SOURCE TRUE
INSTALL_COMMAND cmake -E echo "Skipping install step."
DEPENDS bebop_make bebop_util
)
ExternalProject_Get_property(sparse_matrix_converter SOURCE_DIR)
set(BEBOP_SPARSE_MATRIX_CONVERTER_SOURCE_DIR ${SOURCE_DIR})
unset(SOURCE_DIR)
message("BEBOP_SPARSE_MATRIX_CONVERTER_SOURCE_DIR: ${BEBOP_SPARSE_MATRIX_CONVERTER_SOURCE_DIR}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment