Skip to content

Commit 31afc10

Browse files
committed
Try to set the macos version if not defined
1 parent 48a2109 commit 31afc10

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Code/CMake/SimVascularSystemSetup.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ if(APPLE)
156156
# Assuming use mac os if APPLE
157157
set(SV_PLATFORM_DIR "mac_osx" CACHE STRING "The distribution platform being used.")
158158

159+
if(NOT DEFINED CURRENT_OSX_VERSION OR CURRENT_OSX_VERSION STREQUAL "")
160+
execute_process(COMMAND sw_vers -productVersion
161+
OUTPUT_VARIABLE CURRENT_OSX_VERSION
162+
OUTPUT_STRIP_TRAILING_WHITESPACE)
163+
endif()
164+
159165
# Get just major minor version of osx
160166
simvascular_get_major_minor_version(${CURRENT_OSX_VERSION} SV_OSX_MAJOR_VERSION SV_OSX_MINOR_VERSION)
161167

@@ -166,7 +172,7 @@ if(APPLE)
166172
message(STATUS "CURRENT_OSX_VERSION: ${CURRENT_OSX_VERSION}")
167173
message(STATUS "SV_OSX_MAJOR_VERSION: ${SV_OSX_MAJOR_VERSION}")
168174
message(STATUS "SV_OSX_MINOR_VERSION: ${SV_OSX_MINOR_VERSION}")
169-
175+
170176
elseif(LINUX)
171177

172178
# To get the distribution and the version, we need to use lsb

0 commit comments

Comments
 (0)