Merge branch origin/release-5-0
[alexxy/gromacs.git] / cmake / gmxManageSharedLibraries.cmake
index b667ba7c9e78fb2b4feb09348a91dca17194a24c..aef18bd15dff486fde7cc39f1ca05705b93646d4 100644 (file)
@@ -60,7 +60,7 @@ if (GMX_PREFER_STATIC_LIBS)
     set(SHARED_LIBS_DEFAULT OFF)
 endif()
 set(GMX_PREFER_STATIC_LIBS_DEFAULT OFF)
-if (WIN32 AND NOT CYGWIN AND NOT BUILD_SHARED_LIBS)
+if (WIN32 AND NOT BUILD_SHARED_LIBS)
     set(GMX_PREFER_STATIC_LIBS_DEFAULT ON)
 endif()
 if (NOT GMX_BUILD_SHARED_EXE)
@@ -77,7 +77,7 @@ endif()
 if (UNIX)
     set(GMX_PREFER_STATIC_LIBS_DESCRIPTION
         "When finding libraries prefer static archives (it will only work if static versions of external dependencies are available and found)")
-elseif (WIN32 AND NOT CYGWIN)
+elseif (WIN32)
     set(GMX_PREFER_STATIC_LIBS_DESCRIPTION
         "When finding libraries prefer static system libraries (MT instead of MD)")
 endif()
@@ -116,7 +116,7 @@ function(gmx_manage_prefer_static_libs_flags build_type)
     endforeach()
 endfunction()
 
-IF( WIN32 AND NOT CYGWIN)
+IF( WIN32)
   if (NOT BUILD_SHARED_LIBS)
       if(NOT GMX_PREFER_STATIC_LIBS)
           message(WARNING "Shared system libraries requested, and static Gromacs libraries requested.")
@@ -131,8 +131,9 @@ IF( WIN32 AND NOT CYGWIN)
           #this combination segfaults (illegal passing of file handles)
           message(FATAL_ERROR "Static system libraries requested, and shared Gromacs libraries requested.")
       endif()
-      add_definitions(-DUSE_VISIBILITY -DTMPI_USE_VISIBILITY)
-      set(PKG_CFLAGS "$PKG_CFLAGS -DUSE_VISIBILITY -DTMPI_USE_VISIBILITY")
+      # Visibility not yet implemented
+      # add_definitions(-DUSE_VISIBILITY -DTMPI_USE_VISIBILITY)
+      # set(PKG_CFLAGS "$PKG_CFLAGS -DUSE_VISIBILITY -DTMPI_USE_VISIBILITY")
   endif()
 
   IF (GMX_PREFER_STATIC_LIBS)