Skip to content

Commit

Permalink
removed INSTALL and replaced it with copy_if_different
Browse files Browse the repository at this point in the history
  • Loading branch information
FaroukY committed May 4, 2018
1 parent f60500b commit 7e65749
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions cmake/external/StanMath.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
set(STAN_STABLE_RELEASE 4b1a10bc877d941bbe0a12c198526807be27167a)

set(STAN_INCLUDE_DIR_STAN_MATH ${CMAKE_BINARY_DIR}/StanMath/src/StanMath)
set(STAN_INCLUDE_DIR_BOOST ${CMAKE_BINARY_DIR}/StanMath/src/StanMath/lib/boost_1.64.0)
set(STAN_INCLUDE_DIR_CVODES ${CMAKE_BINARY_DIR}/StanMath/src/StanMath/lib/cvodes_2.9.0/include)

include(ExternalProject)
ExternalProject_Add(
StanMath
Expand All @@ -9,18 +13,10 @@ ExternalProject_Add(
GIT_TAG ${STAN_STABLE_RELEASE}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
INSTALL_COMMAND
${CMAKE_COMMAND} -E copy_if_different ${STAN_INCLUDE_DIR_STAN_MATH} include/shogun/third_party/Stan
&& ${CMAKE_COMMAND} -E copy_if_different ${STAN_INCLUDE_DIR_BOOST} include/shogun/third_party/Stan_Boost
&& ${CMAKE_COMMAND} -E copy_if_different ${STAN_INCLUDE_DIR_CVODES} include/shogun/third_party/Stan_Cvodes
LOG_DOWNLOAD ON
)


add_dependencies(libshogun StanMath)

set(STAN_INCLUDE_DIR_STAN_MATH ${CMAKE_BINARY_DIR}/StanMath/src/StanMath)
set(STAN_INCLUDE_DIR_BOOST ${CMAKE_BINARY_DIR}/StanMath/src/StanMath/lib/boost_1.64.0)
set(STAN_INCLUDE_DIR_CVODES ${CMAKE_BINARY_DIR}/StanMath/src/StanMath/lib/cvodes_2.9.0/include)


INSTALL( DIRECTORY ${STAN_INCLUDE_DIR_STAN_MATH} DESTINATION include/shogun/lib/external/Stan )
INSTALL( DIRECTORY ${STAN_INCLUDE_DIR_BOOST} DESTINATION include/shogun/lib/external/Stan_Boost )
INSTALL( DIRECTORY ${STAN_INCLUDE_DIR_CVODES} DESTINATION include/shogun/lib/external/Stan_Cvodes )

0 comments on commit 7e65749

Please sign in to comment.