From: Roland Schulz Date: Wed, 3 Sep 2014 21:48:23 +0000 (-0400) Subject: Add Mingw warnings X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=2fc88eb9b1111516461b3ff7b2cbfa79a63b7dd1;p=alexxy%2Fgromacs.git Add Mingw warnings Change-Id: I8825ee1948fe03be751f09bc87db050f89fa49bd --- diff --git a/cmake/ThreadMPI.cmake b/cmake/ThreadMPI.cmake index 76e4d37b05..027eff6918 100644 --- a/cmake/ThreadMPI.cmake +++ b/cmake/ThreadMPI.cmake @@ -65,6 +65,11 @@ ENDMACRO(TMPI_TEST_ATOMICS VARIABLE) try_compile(HAVE_PROCESSOR_NUMBER ${CMAKE_BINARY_DIR} "${CMAKE_SOURCE_DIR}/cmake/TestWinProcNum.c") include(FindThreads) + +if(CMAKE_USE_WIN32_THREADS_INIT AND NOT HAVE_PROCESSOR_NUMBER) + message(WARNING "Incomplete Windows Processor Group API. If you want Gromacs to be able to set thread affinity, choose a Mingw distribution with a complete API (e.g. Mingw-w64).") +endif() + if (CMAKE_USE_WIN32_THREADS_INIT AND HAVE_PROCESSOR_NUMBER) set(THREAD_WINDOWS 1) set(THREAD_LIB) diff --git a/cmake/gmxTestCompilerProblems.cmake b/cmake/gmxTestCompilerProblems.cmake index ec4fed2185..e534730013 100644 --- a/cmake/gmxTestCompilerProblems.cmake +++ b/cmake/gmxTestCompilerProblems.cmake @@ -1,7 +1,7 @@ # # This file is part of the GROMACS molecular simulation package. # -# Copyright (c) 2012,2013, by the GROMACS development team, led by +# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, # and including many others, as listed in the AUTHORS file in the # top-level source directory and at http://www.gromacs.org. @@ -80,6 +80,19 @@ macro(gmx_test_compiler_problems) message(WARNING "All tested PGI compiler versions (up to 12.9.0) generate binaries which produce incorrect results, or even fail to compile Gromacs. Highly recommended to use a different compiler. If you choose to use PGI, make sure to run the regressiontests.") endif() + if(CMAKE_COMPILER_IS_GNUCC AND WIN32 AND (GMX_SIMD STREQUAL "AVX_256" OR GMX_SIMD STREQUAL "AVX2_256")) + message(WARNING "GCC on Windows with AVX crashes. Choose SSE4_1 or a different compiler.") # GCC bug 49001. + endif() + + if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND WIN32 AND NOT CYGWIN) + if(CMAKE_VERSION VERSION_LESS 3.0.0) + message(WARNING "Clang on Windows requires cmake 3.0.0") + endif() + if(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.5.0) + message(WARNING "Clang on Windows requires clang 3.5.0") + endif() + endif() + if(CMAKE_C_COMPILER_ID MATCHES "Intel" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "12.0.0") message(WARNING "Intel compilers before 12.0.0 are not routinely tested, so there may be problems. Version 11.1 with SSE4.1 is known to produce incorrect results. It is highly recommended to use a more up-to-date compiler. If you choose to use this version, make sure you run the regressiontests.") endif()