diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 6 | ||||
-rw-r--r-- | Modules/FindMPI.cmake | 2 | ||||
-rw-r--r-- | Modules/GoogleTest.cmake | 27 | ||||
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 3 |
4 files changed, 32 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 347106e..15c304c 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -742,12 +742,12 @@ function(CMAKE_DIAGNOSE_UNSUPPORTED_CLANG lang envvar) return() endif() - # Test whether a GNU-like command-line option works. - execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" --version + # Test whether an MSVC-like command-line option works. + execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" /? RESULT_VARIABLE _clang_result OUTPUT_VARIABLE _clang_stdout ERROR_VARIABLE _clang_stderr) - if(NOT _clang_result EQUAL 0) + if(_clang_result EQUAL 0) return() endif() diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 21ac0bc..0a011af 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1342,7 +1342,7 @@ foreach(LANG IN ITEMS C CXX Fortran) set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) unset(MPI_${LANG}_REQUIRED_VARS) - if (MPI_${LANG}_WRAPPER_FOUND OR MPI_${LANG}_GUESS_FOUND) + if (NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") endforeach() diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index 41bd1dc..3d47367 100644 --- a/Modules/GoogleTest.cmake +++ b/Modules/GoogleTest.cmake @@ -361,9 +361,32 @@ function(gtest_discover_tests TARGET) set(_TEST_LIST ${TARGET}_TESTS) endif() + get_property( + has_counter + TARGET ${TARGET} + PROPERTY CTEST_DISCOVERED_TEST_COUNTER + SET + ) + if(has_counter) + get_property( + counter + TARGET ${TARGET} + PROPERTY CTEST_DISCOVERED_TEST_COUNTER + ) + math(EXPR counter "${counter} + 1") + else() + set(counter 1) + endif() + set_property( + TARGET ${TARGET} + PROPERTY CTEST_DISCOVERED_TEST_COUNTER + ${counter} + ) + # Define rule to generate test list for aforementioned test executable - set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include.cmake") - set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests.cmake") + set(ctest_file_base "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}[${counter}]") + set(ctest_include_file "${ctest_file_base}_include.cmake") + set(ctest_tests_file "${ctest_file_base}_tests.cmake") get_property(crosscompiling_emulator TARGET ${TARGET} PROPERTY CROSSCOMPILING_EMULATOR diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 5687653..328d3c6 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -69,6 +69,9 @@ list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /usr/include ) +list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES + /usr/include + ) # Enable use of lib32 and lib64 search path variants by default. set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE) |