summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-12 15:26:16 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-12 15:26:16 +0800
commit0f72582a734dcd585627341ddb16678d18e373ac (patch)
tree1a3d8294d553ca5735f258f7d07335b4c03b3ec0 /indra
parent199d71b2baa76f1719cd074b60051db40886f7c0 (diff)
Don't redownload sse2neon if already installed
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/CMakeLists.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 9811e705a0..a62a72c79c 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -294,13 +294,19 @@ target_link_libraries(
target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
-if (CMAKE_OSX_ARCHITECTURES MATCHES "(x86_64;)*arm64(;x86_64)*")
- execute_process(COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/sse2neon)
- execute_process(COMMAND curl
- -OL
- https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h
- WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon
- )
+if (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+ if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0)
+ execute_process(
+ COMMAND mkdir -p include/sse2neon
+ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}
+ )
+ execute_process(
+ COMMAND curl -OL https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h
+ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon
+ RESULT_VARIABLE sse2neon_installed
+ )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "${sse2neon_installed}")
+ endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0)
target_include_directories(llcommon PUBLIC ${AUTOBUILD_INSTALL_DIR}/include/sse2neon)
endif ()