 +  cmake_policy(SET CMP0077 NEW)
 +endif()
 +
++# MSVC runtime library flags are selected by an abstraction.
++if(POLICY CMP0091)
++  cmake_policy(SET CMP0091 NEW)
++endif()
++
  set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS_RELEASE}")
  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_RELEASE}")
  
-@@ -88,6 +93,7 @@
+@@ -88,6 +98,7 @@
  SET(COVERAGE_CTEST_ARGS "" CACHE STRING "additional ctest arguments for coverage")
  option(MT "use static runtime libraries for Visual Studio compiler" OFF)
  option(CXXONLY "use a c++ compiler for all source files" OFF)

     ${Readline_LIBRARY}
     ${GMP_LIBRARIES}
     ${THREAD_LIBRARIES}
@@ -991,8 +995,16 @@
     add_sanitizers(scip)
 endif()
 

 
 set(TPI none CACHE STRING "options for thread support library")  #create the variable
 set_property(CACHE TPI PROPERTY STRINGS none tny omp)  #define list of values GUI will offer for the variable
@@ -185,7 +196,7 @@
 set(NEWLINE "\\\\n")
 
 # create a target for updating the current git hash
-file(WRITE ${CMAKE_BINARY_DIR}/scip_update_githash.cmake "
+file(WRITE ${PROJECT_BINARY_DIR}/scip_update_githash.cmake "
 find_program(GIT git)
 if(EXISTS \${DST})
    file(STRINGS \${DST} GITHASH_OLD)
@@ -206,8 +217,9 @@
 message(STATUS \"Git hash: \" \${GITHASH})
 ")
 add_custom_target(scip_update_githash
-                  COMMAND ${CMAKE_COMMAND} -DDST=${PROJECT_SOURCE_DIR}/src/scip/githash.c
-                                           -P ${CMAKE_BINARY_DIR}/scip_update_githash.cmake)
+  COMMAND ${CMAKE_COMMAND}
+    -DDST=${PROJECT_SOURCE_DIR}/src/scip/githash.c
+    -P ${PROJECT_BINARY_DIR}/scip_update_githash.cmake)
 
 set(WITH_SCIPDEF on)
 
@@ -221,161 +233,200 @@
 
 # ZLIB
 if(ZLIB)
