diff options
-rw-r--r-- | Modules/FindBLAS.cmake | 34 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 34 | ||||
-rw-r--r-- | Modules/GoogleTestAddTests.cmake | 1 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.cxx | 3 | ||||
-rw-r--r-- | Source/cmFindProgramCommand.cxx | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt | 10 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | 14 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/skip_test.cpp | 18 | ||||
-rw-r--r-- | Tests/RunCMake/find_program/ExeNoRead-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/find_program/ExeNoRead.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/find_program/RunCMakeTest.cmake | 4 |
12 files changed, 129 insertions, 2 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 9b6d09c..caed7ef 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -48,6 +48,10 @@ The following variables may be set to influence this module's behavior: * ``ACML_GPU`` * ``Apple`` * ``NAS`` + * ``Arm`` + * ``Arm_mp`` + * ``Arm_ilp64`` + * ``Arm_ilp64_mp`` * ``Generic`` ``BLA_F95`` @@ -550,6 +554,36 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") endif() endif() +# ArmPL blas library? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries) +if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All") + + # Check for 64bit Integer support + if(BLA_VENDOR MATCHES "_ilp64") + set(BLAS_armpl_LIB "armpl_ilp64") + else() + set(BLAS_armpl_LIB "armpl_lp64") + endif() + + # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp + if(BLA_VENDOR MATCHES "_mp") + set(BLAS_armpl_LIB "${BLAS_armpl_LIB}_mp") + endif() + + if(NOT BLAS_LIBRARIES) + check_blas_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "${BLAS_armpl_LIB}" + "" + "" + "" + ) + endif() + +endif() + # FLAME's blis library? (https://github.com/flame/blis) if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index c962976..e5bd58d 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -38,6 +38,10 @@ The following variables may be set to influence this module's behavior: * ``ACML`` * ``Apple`` * ``NAS`` + * ``Arm`` + * ``Arm_mp`` + * ``Arm_ilp64`` + * ``Arm_ilp64_mp`` * ``Generic`` ``BLA_F95`` @@ -359,6 +363,36 @@ if(BLAS_FOUND) endif() endif() + # ArmPL? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries) + if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All") + + # Check for 64bit Integer support + if(BLA_VENDOR MATCHES "_ilp64") + set(LAPACK_armpl_LIB "armpl_ilp64") + else() + set(LAPACK_armpl_LIB "armpl_lp64") + endif() + + # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp + if(BLA_VENDOR MATCHES "_mp") + set(LAPACK_armpl_LIB "${LAPACK_armpl_LIB}_mp") + endif() + + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "${LAPACK_armpl_LIB}" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + # FLAME's blis library? (https://github.com/flame/blis) if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") if(NOT LAPACK_LIBRARIES) diff --git a/Modules/GoogleTestAddTests.cmake b/Modules/GoogleTestAddTests.cmake index 65af4c2..499332f 100644 --- a/Modules/GoogleTestAddTests.cmake +++ b/Modules/GoogleTestAddTests.cmake @@ -134,6 +134,7 @@ function(gtest_discover_tests_impl) "${prefix}${pretty_suite}.${pretty_test}${suffix}" PROPERTIES WORKING_DIRECTORY "${_TEST_WORKING_DIR}" + SKIP_REGULAR_EXPRESSION "\\\\[ SKIPPED \\\\]" ${properties} ) list(APPEND tests_buffer "${prefix}${pretty_suite}.${pretty_test}${suffix}") diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index afd2b6b..664ba2f 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -41,7 +41,8 @@ void cmCursesLongMessageForm::UpdateContent(std::string const& output, this->Title = title; if (!output.empty() && this->Messages.size() < MAX_CONTENT_SIZE) { - this->Messages.append("\n" + output); + this->Messages.push_back('\n'); + this->Messages.append(output); form_driver(this->Form, REQ_NEW_LINE); this->DrawMessage(output.c_str()); } diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index 4b88bea..599b1d2 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -85,7 +85,7 @@ struct cmFindProgramHelper this->TestNameExt = cmStrCat(name, ext); this->TestPath = cmSystemTools::CollapseFullPath(this->TestNameExt, path); - bool exists = cmSystemTools::FileExists(this->TestPath, true); + bool exists = cmSystemTools::FileIsExecutable(this->TestPath); exists ? this->DebugSearches.FoundAt(this->TestPath) : this->DebugSearches.FailedAt(this->TestPath); if (exists) { diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt new file mode 100644 index 0000000..eeecb6a --- /dev/null +++ b/Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt @@ -0,0 +1,10 @@ +Test project .* + Start 20: skip_test.test1 +1/1 Test #20: skip_test.test1 \.+\*\*\*Skipped +[0-9.]+ sec + +100% tests passed, 0 tests failed out of 1 + +Total Test time \(real\) = +[0-9.]+ sec + +The following tests did not run: +.*20 - skip_test\.test1 \(Skipped\) diff --git a/Tests/RunCMake/GoogleTest/GoogleTest.cmake b/Tests/RunCMake/GoogleTest/GoogleTest.cmake index 4bc6b9d..fca292a 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest.cmake +++ b/Tests/RunCMake/GoogleTest/GoogleTest.cmake @@ -49,3 +49,9 @@ gtest_discover_tests( DISCOVERY_TIMEOUT 20 PROPERTIES TIMEOUT 2 ) + +add_executable(skip_test skip_test.cpp) + +gtest_discover_tests( + skip_test +) diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake index 6b9d458..efd22be 100644 --- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake @@ -60,6 +60,20 @@ function(run_GoogleTest DISCOVERY_MODE) -R property_timeout\\.case_with_discovery --no-label-summary ) + + run_cmake_command(GoogleTest-build + ${CMAKE_COMMAND} + --build . + --config Debug + --target skip_test + ) + + run_cmake_command(GoogleTest-skip-test + ${CMAKE_CTEST_COMMAND} + -C Debug + -R skip_test + --no-label-summary + ) endfunction() function(run_GoogleTestXML DISCOVERY_MODE) diff --git a/Tests/RunCMake/GoogleTest/skip_test.cpp b/Tests/RunCMake/GoogleTest/skip_test.cpp new file mode 100644 index 0000000..2bc9fe1 --- /dev/null +++ b/Tests/RunCMake/GoogleTest/skip_test.cpp @@ -0,0 +1,18 @@ +#include <iostream> +#include <string> + +int main(int argc, char** argv) +{ + // Note: GoogleTest.cmake doesn't actually depend on Google Test as such; + // it only requires that we produces output in the expected format when + // invoked with --gtest_list_tests. Thus, we fake that here. This allows us + // to test the module without actually needing Google Test. + if (argc > 1 && std::string(argv[1]) == "--gtest_list_tests") { + std::cout << "skip_test." << std::endl; + std::cout << " test1" << std::endl; + return 0; + } + + std::cout << "[ SKIPPED ] skip_test.test1" << std::endl; + return 0; +} diff --git a/Tests/RunCMake/find_program/ExeNoRead-stdout.txt b/Tests/RunCMake/find_program/ExeNoRead-stdout.txt new file mode 100644 index 0000000..35a83f2 --- /dev/null +++ b/Tests/RunCMake/find_program/ExeNoRead-stdout.txt @@ -0,0 +1 @@ +-- ExeNoRead_EXECUTABLE='.*/Tests/RunCMake/find_program/ExeNoRead-build/ExeNoRead' diff --git a/Tests/RunCMake/find_program/ExeNoRead.cmake b/Tests/RunCMake/find_program/ExeNoRead.cmake new file mode 100644 index 0000000..7e22dc5 --- /dev/null +++ b/Tests/RunCMake/find_program/ExeNoRead.cmake @@ -0,0 +1,4 @@ +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead" "#!/bin/sh\n") +execute_process(COMMAND chmod -r+x "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead") +find_program(ExeNoRead_EXECUTABLE NAMES ExeNoRead NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_BINARY_DIR}") +message(STATUS "ExeNoRead_EXECUTABLE='${ExeNoRead_EXECUTABLE}'") diff --git a/Tests/RunCMake/find_program/RunCMakeTest.cmake b/Tests/RunCMake/find_program/RunCMakeTest.cmake index 0ff9a97..95ffd84 100644 --- a/Tests/RunCMake/find_program/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_program/RunCMakeTest.cmake @@ -10,3 +10,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN)$") run_cmake(WindowsCom) run_cmake(WindowsExe) endif() + +if(UNIX) + run_cmake(ExeNoRead) +endif() |