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.")
# 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()
# 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()
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()
* 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);
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})
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})