diff --git a/CMakeLists.txt b/CMakeLists.txt index 524236dc..6b55b1a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()