File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ if(UNIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
66 set (CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation directory prefix" FORCE)
77endif ()
88
9- # Check write access to prefix, fallback to user's home directory if needed (Unix only)
109if (UNIX )
11- file (WRITE "${CMAKE_INSTALL_PREFIX} /.cmake_write_test" "" )
12- if ("${CMAKE_STATUS} " STREQUAL "0" )
10+ # Test write access to CMAKE_INSTALL_PREFIX
11+ set (TEST_FILE "${CMAKE_INSTALL_PREFIX} /.cmake_write_test" )
12+ file (WRITE "${TEST_FILE} " "" ) # Attempt to write the test file
13+ if (EXISTS "${TEST_FILE} " )
1314 message (STATUS "Write access to ${CMAKE_INSTALL_PREFIX} confirmed." )
14- file (REMOVE "${CMAKE_INSTALL_PREFIX} /.cmake_write_test" )
15+ file (REMOVE "${TEST_FILE} " ) # Cleanup the test file
1516 else ()
1617 set (CMAKE_INSTALL_PREFIX "$ENV{HOME} /mst_telemetry" CACHE PATH "Fallback installation directory prefix" FORCE)
1718 message (STATUS "No write access to ${CMAKE_INSTALL_PREFIX} , installing to $HOME/mst_telemetry instead." )
Original file line number Diff line number Diff line change 11#! /bin/sh
2+ // Add current user
3+ current_user=` id`
4+ echo " CURRENT USER:" $current_user
25cd ${0%/* }
36SKU=${1:- release}
47SIMULATOR=${2:- iPhone 8}
You can’t perform that action at this time.
0 commit comments