Merge release-5-0 into master
authorRoland Schulz <roland@utk.edu>
Sun, 21 Sep 2014 17:38:26 +0000 (13:38 -0400)
committerRoland Schulz <roland@utk.edu>
Sun, 21 Sep 2014 17:38:26 +0000 (13:38 -0400)
Conflicts:
src/gromacs/CMakeLists.txt (adjacent changes)

Change-Id: I6e5b35508b3f6f6d805a2a539e49decdef28012b

cmake/gmxManageSharedLibraries.cmake
cmake/gmxTestSimd.cmake
src/gromacs/CMakeLists.txt
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
src/testutils/CMakeLists.txt
src/testutils/TestMacros.cmake

index 4a83ebe35c7561411ee5833d40e8472f253dcd0c..b58a1be697620cb1ed2dfac7b9900d870e5ce391 100644 (file)
@@ -118,7 +118,11 @@ IF( WIN32 AND NOT CYGWIN)
           message(WARNING "Shared system libraries requested, and static Gromacs libraries requested.")
       endif()
   else()
-      message(FATAL_ERROR "BUILD_SHARED_LIBS=ON not yet working for Windows in the master branch")
+      if(MINGW)
+          set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols ${CMAKE_SHARED_LINKER_FLAGS}")
+      else()
+          message(FATAL_ERROR "BUILD_SHARED_LIBS=ON not yet working for Windows in the master branch")
+      endif()
       if(GMX_PREFER_STATIC_LIBS)
           #this combination segfaults (illegal passing of file handles)
           message(FATAL_ERROR "Static system libraries requested, and shared Gromacs libraries requested.")
index fe477d7f2f801dc11183ff6a6f6be638f2e71d4a..db57dd3f36771c081bf0d5693486ec9e9b57cd17 100644 (file)
@@ -43,10 +43,10 @@ macro(gmx_use_clang_as_with_gnu_compilers_on_osx)
     # does not support AVX, so we need to tell the linker to use the clang
     # compilers assembler instead - and this has to happen before we detect AVX
     # flags.
-    if(APPLE AND ${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
+    if(APPLE AND "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
         gmx_test_cflag(GNU_C_USE_CLANG_AS "-Wa,-q" SIMD_C_FLAGS)
     endif()
-    if(APPLE AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+    if(APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
         gmx_test_cxxflag(GNU_CXX_USE_CLANG_AS "-Wa,-q" SIMD_CXX_FLAGS)
     endif()
 endmacro()
@@ -179,8 +179,8 @@ int main(){__m128 x=_mm_set1_ps(0.5);x=_mm_frcz_ps(x);return _mm_movemask_ps(x);
     # We don't have the full compiler version string yet (BUILD_C_COMPILER),
     # so we can't distinguish vanilla from Apple clang versions, but catering for a few rare AMD
     # hackintoshes is not worth the effort.
-    if (APPLE AND (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR
-                ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
+    if (APPLE AND ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
+                "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
         message(WARNING "Due to a known compiler bug, Clang up to version 3.2 (and Apple Clang up to version 4.1) produces incorrect code with AVX_128_FMA SIMD. As we cannot work around this bug on OS X, you will have to select a different compiler or SIMD instruction set.")
     endif()
 
index 0f8cc721cdfc39d40fa18bd5d89b9d74e9e52f62..912789403df6eeb2ca7239c0d6484427d8e22b3d 100644 (file)
@@ -196,7 +196,9 @@ set_target_properties(libgromacs PROPERTIES
 if (NOT GMX_BUILD_MDRUN_ONLY OR BUILD_SHARED_LIBS)
     install(TARGETS libgromacs
             EXPORT libgromacs
-            DESTINATION ${LIB_INSTALL_DIR}
+            LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+            RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+            ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
             COMPONENT libraries)
 endif()
 
index f0e6fa8561d6e4e00aa6bf115a26cea55d632df4..6612d13097c1625da9b67b864b5581ec51179fa3 100644 (file)
@@ -579,7 +579,7 @@ void nbnxn_cuda_init(FILE                 *fplog,
          * priorities, because we are querying the priority range which in this
          * case will be a single value.
          */
-#if CUDA_VERSION >= 5500
+#if CUDA_VERSION >= 5050
         {
             int highest_priority;
             stat = cudaDeviceGetStreamPriorityRange(NULL, &highest_priority);
index 1941dbcb2f70743d4af3ec23dc85fc4fc4378f6d..6366b970843dfe82a77ac20ddec3b8aa2bc63e2d 100644 (file)
@@ -37,7 +37,7 @@ include_directories(${LIBXML2_INCLUDE_DIR})
 file(GLOB TESTUTILS_SOURCES *.cpp)
 
 add_library(testutils STATIC ${UNITTEST_TARGET_OPTIONS} ${TESTUTILS_SOURCES})
-set(TESTUTILS_LIBS testutils ${GMOCK_LIBRARIES} ${LIBXML2_LIBRARIES})
+set(TESTUTILS_LIBS testutils)
 set_property(TARGET testutils APPEND PROPERTY COMPILE_DEFINITIONS "${GMOCK_COMPILE_DEFINITIONS}")
 target_link_libraries(testutils libgromacs ${GMOCK_LIBRARIES} ${LIBXML2_LIBRARIES})
 
index 0796c6993c87df2f64fd22e8ac84ab674a34ce88..b3acdbefd16539468521696d034ef14e18d7900b 100644 (file)
@@ -45,7 +45,7 @@ function (gmx_build_unit_test NAME EXENAME)
         include_directories(BEFORE ${GMOCK_INCLUDE_DIRS})
         add_executable(${EXENAME} ${UNITTEST_TARGET_OPTIONS} ${ARGN} ${TESTUTILS_DIR}/unittest_main.cpp)
         set_property(TARGET ${EXENAME} APPEND PROPERTY COMPILE_DEFINITIONS "${GMOCK_COMPILE_DEFINITIONS}")
-        target_link_libraries(${EXENAME} libgromacs ${TESTUTILS_LIBS} ${GMOCK_LIBRARIES} ${GMX_EXE_LINKER_FLAGS})
+        target_link_libraries(${EXENAME} ${TESTUTILS_LIBS} libgromacs ${GMOCK_LIBRARIES} ${GMX_EXE_LINKER_FLAGS})
         set(_temporary_files_path "${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary")
         file(MAKE_DIRECTORY ${_temporary_files_path})