haskell-debian-stretch: restore previous test installation behavior
@@ -27,10 +27,6 @@ if (NOT BUILD_STATIC)
endif ()
string (REPLACE ";" " " CABAL_ELEKTRA_DEPENDENCY "${ELEKTRA_DEPENDENCY}")
- if (BUILD_TESTING)
- set (CABAL_OPTS "${CABAL_OPTS};--enable-tests")
- endif (BUILD_TESTING)
-
# configure include paths
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/libelektra-haskell.cabal.in"
@@ -85,6 +81,8 @@ if (NOT BUILD_STATIC)
)
add_custom_command (
OUTPUT ${HASKELL_TESTS}
+ COMMAND ${CABAL_EXECUTABLE} install ${CABAL_OPTS} --enable-tests --only-dependencies -v0 || true
+ COMMAND ${CABAL_EXECUTABLE} configure ${CABAL_OPTS} --enable-tests -v0
COMMAND ${CABAL_EXECUTABLE} build -v0
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${BINDING_HASKELL_DEPENDENCIES} ${ELEKTRA_DEPENDENCY} c2hs_haskell
