diff options
author | Paul Oppenheim <poppy@lindenlab.com> | 2008-06-16 18:51:52 +0000 |
---|---|---|
committer | Paul Oppenheim <poppy@lindenlab.com> | 2008-06-16 18:51:52 +0000 |
commit | cd21004bdae8c6e361e2d88404200ee2ae86e083 (patch) | |
tree | a7be4513eba76c6d302c7057562d209824626d9b /indra/cmake | |
parent | 916f9af25cee5d10aa5d4d432f939ebb826a6773 (diff) |
for "new lib install step is too slow!" problem mailed to cmake@. Reviewed by bos and cg.
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/Prebuilt.cmake | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 33cdeeeed5..5eba28b66b 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -4,17 +4,22 @@ include(Python) macro (use_prebuilt_binary _binary) if (NOT STANDALONE) - execute_process(COMMAND ${PYTHON_EXECUTABLE} - install.py - --install-dir=${CMAKE_SOURCE_DIR}/.. - ${_binary} - WORKING_DIRECTORY ${SCRIPTS_DIR} - RESULT_VARIABLE _installed - ) - if (NOT _installed EQUAL 0) + if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + execute_process(COMMAND ${PYTHON_EXECUTABLE} + install.py + --install-dir=${CMAKE_SOURCE_DIR}/.. + ${_binary} + WORKING_DIRECTORY ${SCRIPTS_DIR} + RESULT_VARIABLE ${_binary}_installed + ) + file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}") + else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + set(${_binary}_installed 0) + endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + if(NOT ${_binary}_installed EQUAL 0) message(FATAL_ERROR "Failed to download or unpack prebuilt '${_binary}'." - " Process returned ${_installed}.") - endif (NOT _installed EQUAL 0) + " Process returned ${${_binary}_installed}.") + endif (NOT ${_binary}_installed EQUAL 0) endif (NOT STANDALONE) endmacro (use_prebuilt_binary _binary) |