summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/ctest.1.rst34
-rw-r--r--Modules/FindBLAS.cmake70
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGeneratorTarget.cxx7
-rw-r--r--Source/cmParseArgumentsCommand.cxx26
5 files changed, 77 insertions, 62 deletions
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index d9af3bc..a04c403 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -330,11 +330,39 @@ associated with the tests run. The label time summary will not include labels
that are mapped to subprojects.
When the :prop_test:`PROCESSORS` test property is set, CTest will display a
-weighted test timing result in label and subproject summaries. The wall clock
-time for the test run will be multiplied by this property to give a better
-idea of how much cpu resource CTest allocated for the test. The time is
+weighted test timing result in label and subproject summaries. The time is
reported with `sec*proc` instead of just `sec`.
+The weighted time summary reported for each label or subproject j is computed
+as::
+
+ Weighted Time Summary for Label/Subproject j =
+ sum(raw_test_time[j,i] * num_processors[j,i], i=1...num_tests[j])
+
+ for labels/subprojects j=1...total
+
+where:
+
+* raw_test_time[j,i]: Wall-clock time for the ith test for the jth label or
+ subproject
+* num_processors[j,i]: Value of the CTest PROCESSORS property for the ith test
+ for the jth label or subproject
+* num_tests[j]: Number of tests associated with the jth label or subproject
+* total: Total number of labels or subprojects that have at least one test run
+
+Therefore, the weighted time summary for each label or subproject represents
+the amount of time that CTest gave to run the tests for each label or
+subproject and gives a good representation of the total expense of the tests
+for each label or subproject when compared to other labels or subprojects.
+
+For example, if "SubprojectA" showed "100 sec*proc" and "SubprojectB" showed
+"10 sec*proc", then CTest allocated approximately 10 times the CPU/core time
+to run the tests for "SubprojectA" than for "SubprojectB" (e.g. so if effort
+is going to be expended to reduce the cost of the test suite for the whole
+project, then reducing the cost of the test suite for "SubprojectA" would
+likely have a larger impact than effort to reduce the cost of the test suite
+for "SubprojectB").
+
.. _`Build and Test Mode`:
Build and Test Mode
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index bb8b308..8e8c6f4 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -27,10 +27,17 @@
# to link against to use BLAS95 interface
# BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
# is found
+#
+# The following variables can be used to control this module:
+#
+# ::
+#
# BLA_STATIC if set on this determines what kind of linkage we do (static)
# BLA_VENDOR if set checks only the specified vendor, if not set checks
# all the possibilities
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
+# BLA_PREFER_PKGCONFIG if set pkg-config will be used to search for a BLAS
+# library first and if one is found that is preferred
#
# List of vendors (BLA_VENDOR) valid in this module:
#
@@ -63,6 +70,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY})
@@ -78,6 +86,18 @@ if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_C
endif()
endif()
+if(BLA_PREFER_PKGCONFIG)
+ find_package(PkgConfig)
+ pkg_check_modules(PKGC_BLAS IMPORTED_TARGET blas)
+ if(PKGC_BLAS_FOUND)
+ set(BLAS_LIBRARIES PkgConfig::PKGC_BLAS)
+ find_package_handle_standard_args(BLAS
+ REQUIRED_VARS BLAS_LIBRARIES
+ VERSION_VAR PKGC_BLAS_VERSION)
+ return()
+ endif()
+endif()
+
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
# This macro checks for the existence of the combination of fortran libraries
# given by _list. If the combination is found, this macro checks (using the
@@ -660,8 +680,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
foreach (IT ${BLAS_SEARCH_LIBS})
string(REPLACE " " ";" SEARCH_LIBS ${IT})
- if (${_LIBRARIES})
- else ()
+ if (NOT ${_LIBRARIES})
check_fortran_libraries(
${_LIBRARIES}
BLAS
@@ -676,51 +695,14 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
endif ()
endif ()
-
if(BLA_F95)
- if(BLAS95_LIBRARIES)
- set(BLAS95_FOUND TRUE)
- else()
- set(BLAS95_FOUND FALSE)
- endif()
-
- if(NOT BLAS_FIND_QUIETLY)
- if(BLAS95_FOUND)
- message(STATUS "A library with BLAS95 API found.")
- else()
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR
- "A required library with BLAS95 API not found. Please specify library location.")
- else()
- message(STATUS
- "A library with BLAS95 API not found. Please specify library location.")
- endif()
- endif()
+ find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES)
+ set(BLAS95_FOUND ${BLAS_FOUND})
+ if(BLAS_FOUND)
+ set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
endif()
- set(BLAS_FOUND TRUE)
- set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
else()
- if(BLAS_LIBRARIES)
- set(BLAS_FOUND TRUE)
- else()
- set(BLAS_FOUND FALSE)
- endif()
-
- if(NOT BLAS_FIND_QUIETLY)
- if(BLAS_FOUND)
- message(STATUS "A library with BLAS API found.")
- else()
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR
- "A required library with BLAS API not found. Please specify library location."
- )
- else()
- message(STATUS
- "A library with BLAS API not found. Please specify library location."
- )
- endif()
- endif()
- endif()
+ find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES)
endif()
cmake_pop_check_state()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 9697bd5..16621ac 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 10)
-set(CMake_VERSION_PATCH 20171220)
+set(CMake_VERSION_PATCH 20171221)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 103d034..2cf53cc 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5133,7 +5133,12 @@ void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages,
std::string objLib = extObj->GetObjectLibrary();
if (cmGeneratorTarget* tgt =
this->LocalGenerator->FindGeneratorTargetToUse(objLib)) {
- objectLibraries.push_back(tgt);
+ auto const objLibIt =
+ std::find_if(objectLibraries.cbegin(), objectLibraries.cend(),
+ [tgt](cmGeneratorTarget* t) { return t == tgt; });
+ if (objectLibraries.cend() == objLibIt) {
+ objectLibraries.push_back(tgt);
+ }
}
}
}
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index 0922e6e..9a5b097 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -71,8 +71,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
typedef std::map<std::string, std::string> single_map;
typedef std::map<std::string, std::vector<std::string>> multi_map;
options_map options;
- single_map single;
- multi_map multi;
+ single_map singleValArgs;
+ multi_map multiValArgs;
// anything else is put into a vector of unparsed strings
std::vector<std::string> unparsed;
@@ -98,7 +98,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
if (!used_keywords.insert(iter).second) {
this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter);
}
- single[iter]; // default initialize
+ singleValArgs[iter]; // default initialize
}
// the fourth argument is a (cmake) list of multi argument options
@@ -108,7 +108,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
if (!used_keywords.insert(iter).second) {
this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter);
}
- multi[iter]; // default initialize
+ multiValArgs[iter]; // default initialize
}
enum insideValues
@@ -161,15 +161,15 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
continue;
}
- const single_map::iterator singleIter = single.find(arg);
- if (singleIter != single.end()) {
+ const single_map::iterator singleIter = singleValArgs.find(arg);
+ if (singleIter != singleValArgs.end()) {
insideValues = SINGLE;
currentArgName = arg;
continue;
}
- const multi_map::iterator multiIter = multi.find(arg);
- if (multiIter != multi.end()) {
+ const multi_map::iterator multiIter = multiValArgs.find(arg);
+ if (multiIter != multiValArgs.end()) {
insideValues = MULTI;
currentArgName = arg;
continue;
@@ -177,14 +177,14 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
switch (insideValues) {
case SINGLE:
- single[currentArgName] = arg;
+ singleValArgs[currentArgName] = arg;
insideValues = NONE;
break;
case MULTI:
if (parseFromArgV) {
- multi[currentArgName].push_back(escape_arg(arg));
+ multiValArgs[currentArgName].push_back(escape_arg(arg));
} else {
- multi[currentArgName].push_back(arg);
+ multiValArgs[currentArgName].push_back(arg);
}
break;
default:
@@ -204,7 +204,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
this->Makefile->AddDefinition(prefix + iter.first,
iter.second ? "TRUE" : "FALSE");
}
- for (auto const& iter : single) {
+ for (auto const& iter : singleValArgs) {
if (!iter.second.empty()) {
this->Makefile->AddDefinition(prefix + iter.first, iter.second.c_str());
} else {
@@ -212,7 +212,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
}
}
- for (auto const& iter : multi) {
+ for (auto const& iter : multiValArgs) {
if (!iter.second.empty()) {
this->Makefile->AddDefinition(
prefix + iter.first, cmJoin(cmMakeRange(iter.second), ";").c_str());