From: Roland Schulz Date: Sun, 21 Sep 2014 17:38:26 +0000 (-0400) Subject: Merge release-5-0 into master X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=982993423b348095df0e550ec9d7e6163a270b4f;hp=80c60b9374efdb883ac53877746348a0531f0ea5;p=alexxy%2Fgromacs.git Merge release-5-0 into master Conflicts: src/gromacs/CMakeLists.txt (adjacent changes) Change-Id: I6e5b35508b3f6f6d805a2a539e49decdef28012b --- diff --git a/cmake/gmxManageSharedLibraries.cmake b/cmake/gmxManageSharedLibraries.cmake index 4a83ebe35c..b58a1be697 100644 --- a/cmake/gmxManageSharedLibraries.cmake +++ b/cmake/gmxManageSharedLibraries.cmake @@ -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.") diff --git a/cmake/gmxTestSimd.cmake b/cmake/gmxTestSimd.cmake index fe477d7f2f..db57dd3f36 100644 --- a/cmake/gmxTestSimd.cmake +++ b/cmake/gmxTestSimd.cmake @@ -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() diff --git a/src/gromacs/CMakeLists.txt b/src/gromacs/CMakeLists.txt index 0f8cc721cd..912789403d 100644 --- a/src/gromacs/CMakeLists.txt +++ b/src/gromacs/CMakeLists.txt @@ -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() diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu index f0e6fa8561..6612d13097 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu @@ -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); diff --git a/src/testutils/CMakeLists.txt b/src/testutils/CMakeLists.txt index 1941dbcb2f..6366b97084 100644 --- a/src/testutils/CMakeLists.txt +++ b/src/testutils/CMakeLists.txt @@ -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}) diff --git a/src/testutils/TestMacros.cmake b/src/testutils/TestMacros.cmake index 0796c6993c..b3acdbefd1 100644 --- a/src/testutils/TestMacros.cmake +++ b/src/testutils/TestMacros.cmake @@ -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})