File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ endif()
169169add_executable (test_xsimd ${XSIMD_TESTS} ${XSIMD_HEADERS} )
170170target_include_directories (test_xsimd PRIVATE ${XSIMD_INCLUDE_DIR} )
171171
172- option (XSIMD_DOWNLOAD_DOCTEST OFF )
172+ option (DOWNLOAD_DOCTEST OFF )
173173find_package (doctest QUIET )
174174if (doctest_FOUND)
175175 set (DOCTEST_MINIMAL_VERSION 2.4.9)
@@ -181,7 +181,15 @@ elseif(DOWNLOAD_DOCTEST)
181181 file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /doctest" )
182182 file (DOWNLOAD
183183 "https://github.com/doctest/doctest/releases/download/v2.4.9/doctest.h"
184- "${CMAKE_CURRENT_BINARY_DIR} /doctest/doctest.h" )
184+ "${CMAKE_CURRENT_BINARY_DIR} /doctest/doctest.h"
185+ STATUS DOWNLOAD_DOCTEST_STATUS)
186+ list (GET DOWNLOAD_DOCTEST_STATUS 0 DOWNLOAD_DOCTEST_STATUS_CODE)
187+ list (GET DOWNLOAD_DOCTEST_STATUS 1 DOWNLOAD_DOCTEST_ERROR_MESSAGE)
188+ if (${DOWNLOAD_DOCTEST_STATUS_CODE} EQUAL 0)
189+ message (STATUS "Successfully downloaded doctest.h" )
190+ else ()
191+ message (FATAL_ERROR "Error occurred during download of doctest: ${DOWNLOAD_DOCTEST_ERROR_MESSAGE} " )
192+ endif ()
185193 target_include_directories (test_xsimd PRIVATE ${CMAKE_CURRENT_BINARY_DIR} )
186194else ()
187195 message (FATAL_ERROR "
You can’t perform that action at this time.
0 commit comments