One more try with Octave on OSX

This commit is contained in:
Ian Bell
2015-07-01 08:23:59 -06:00
parent 03bfd3995d
commit bf0f9e63bd

View File

@@ -492,13 +492,15 @@ if (COOLPROP_OCTAVE_MODULE)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# We need to see which library to link with on OSX - clang++ or stdc++
execute_process(COMMAND "otool -L ${OCTAVE_OCTAVE_LIB} | grep libc++" OUTPUT_VARIABLE COOLPROP_OCTAVE_USING_CLANG)
string(STRIP ${COOLPROP_OCTAVE_USING_CLANG} COOLPROP_OCTAVE_USING_CLANG)
STRING(LENGTH ${COOLPROP_OCTAVE_USING_CLANG} LEN)
MESSAGE(STATUS "COOLPROP_OCTAVE_USING_CLANG = ${COOLPROP_OCTAVE_USING_CLANG}")
string(STRIP "${COOLPROP_OCTAVE_USING_CLANG}" COOLPROP_OCTAVE_USING_CLANG)
STRING(LENGTH "${COOLPROP_OCTAVE_USING_CLANG}" LEN)
if (LEN GREATER 0)
message(STATUS "Using -stdlib=libc++")
set_target_properties(CoolProp PROPERTIES LINK_FLAGS "-stdlib=libc++")
else()
message(STATUS "Using -stdlib=libstdc++")
set_target_properties(CoolProp PROPERTIES LINK_FLAGS "-stdlib=libstdc++")
endif()
endif()