Skip to content

Commit

Permalink
disable dependency tracking, avoid COMMAND_ERROR_IS_FATAL
Browse files Browse the repository at this point in the history
COMMAND_ERROR_IS_FATAL requires cmake 3.19
  • Loading branch information
minrk committed Mar 6, 2024
1 parent e1c0cd2 commit 14020ef
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,12 @@ if (ZMQ_PREFIX STREQUAL "bundled")
COMMAND ${libsodium_build}
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
# COMMAND_ERROR_IS_FATAL ANY
RESULT_VARIABLE _status
)
if (_status)
message(FATAL_ERROR "failed to build libsodium")
endif()
file(GLOB_RECURSE BUILT_LIB "${bundled_libsodium_SOURCE_DIR}/**/libsodium.lib")
message(STATUS "copy ${BUILT_LIB} ${libsodium_lib}")
file(COPY_FILE ${BUILT_LIB} ${libsodium_lib})
Expand All @@ -235,6 +239,7 @@ if (ZMQ_PREFIX STREQUAL "bundled")
./configure
--prefix=${BUNDLE_DIR}
--with-pic
--disable-dependency-tracking
--disable-shared
--enable-static
)
Expand All @@ -243,20 +248,33 @@ if (ZMQ_PREFIX STREQUAL "bundled")
COMMAND ${libsodium_configure}
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
# COMMAND_ERROR_IS_FATAL ANY
RESULT_VARIABLE _status
)
# COMMAND_ERROR_IS_FATAL requires cmake 3.19, ubuntu 20.04 has 3.16
if (_status)
message(FATAL_ERROR "failed to configure libsodium")
endif()
execute_process(
COMMAND make
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
# COMMAND_ERROR_IS_FATAL ANY
RESULT_VARIABLE _status
)
if (_status)
message(FATAL_ERROR "failed to build libsodium")
endif()
execute_process(
COMMAND make install
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
# COMMAND_ERROR_IS_FATAL ANY
RESULT_VARIABLE _status
)
if (_status)
message(FATAL_ERROR "failed to install libsodium")
endif()
endif()
endif()

Expand Down

0 comments on commit 14020ef

Please sign in to comment.