Skip to content

Commit c82c586

Browse files
authored
Update the SimVascularSystemSetup.cmake to correctly fetch the MacOS version if it is not defined or empty string (#425)
1 parent 3629164 commit c82c586

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Code/CMake/SimVascularSystemSetup.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ if(APPLE)
157157
# Assuming use mac os if APPLE
158158
set(SV_PLATFORM_DIR "mac_osx" CACHE STRING "The distribution platform being used.")
159159

160+
# Safely fetch CURRENT_OSX_VERSION if undefined
161+
if(NOT DEFINED CURRENT_OSX_VERSION OR CURRENT_OSX_VERSION STREQUAL "")
162+
execute_process(COMMAND sw_vers -productVersion
163+
OUTPUT_VARIABLE CURRENT_OSX_VERSION
164+
OUTPUT_STRIP_TRAILING_WHITESPACE)
165+
endif()
166+
160167
# Get just major minor version of osx
161168
simvascular_get_major_minor_version(${CURRENT_OSX_VERSION} SV_OSX_MAJOR_VERSION SV_OSX_MINOR_VERSION)
162169

0 commit comments

Comments
 (0)