Skip to content

Commit

Permalink
make sure directory exists before unpacking bundled boost
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Jun 21, 2019
1 parent 844703d commit b900dd8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions export/cmake/CMakeLists.txt.export
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,17 @@ endif(Boost_FOUND)

# if usable Boost.Preprocessor not found install the bundled version
if (NOT LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/include/libint2)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_SOURCE_DIR}/external/boost.tar.gz
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/include/libint2
RESULT_VARIABLE UNPACK_BOOST_RESULT
OUTPUT_VARIABLE UNPACK_BOOST_OUTPUT
ERROR_VARIABLE UNPACK_BOOST_OUTPUT
)
if (NOT UNPACK_BOOST_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to unpack the bundled Boost! The tar command output:\n${UNPACK_BOOST_OUTPUT}")
endif()
endif()

# Python is optional, unless ...
Expand Down

0 comments on commit b900dd8

Please sign in to comment.