diff options
20 files changed, 375 insertions, 23 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 376b56c..d025d63 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -55,7 +55,7 @@ used in a comparison with the iterator returned by ``end()``: .. code-block:: c++ - const std::set<cmStdString>& someSet = getSet(); + const std::set<std::string>& someSet = getSet(); if (someSet.find("needle") == someSet.end()) // Wrong { // ... @@ -66,8 +66,8 @@ The return value of ``find()`` must be assigned to an intermediate .. code-block:: c++ - const std::set<cmStdString>& someSet; - const std::set<cmStdString>::const_iterator i = someSet.find("needle"); + const std::set<std::string>& someSet; + const std::set<std::string>::const_iterator i = someSet.find("needle"); if (i != propSet.end()) // Ok { // ... @@ -110,7 +110,7 @@ conversion is not allowed: .. code-block:: c++ - std::set<cmStdString> theSet; + std::set<const char*> theSet; std::vector<std::string> theVector; theVector.insert(theVector.end(), theSet.begin(), theSet.end()); // Wrong @@ -118,9 +118,9 @@ A loop must be used instead: .. code-block:: c++ - std::set<cmStdString> theSet; + std::set<const char*> theSet; std::vector<std::string> theVector; - for(std::set<cmStdString>::iterator li = theSet.begin(); + for(std::set<const char*>::iterator li = theSet.begin(); li != theSet.end(); ++li) { theVector.push_back(*li); diff --git a/Help/release/dev/ctest-intel-coverage.rst b/Help/release/dev/ctest-intel-coverage.rst new file mode 100644 index 0000000..11455a5 --- /dev/null +++ b/Help/release/dev/ctest-intel-coverage.rst @@ -0,0 +1,5 @@ +ctest-intel-coverage +-------------------- + +* The :command:`ctest_coverage` command learned to support + Intel coverage files with the ``codecov`` tool. diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index 99ffca8..73efaae 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -31,14 +31,17 @@ macro(find_dependency dep) if (NOT ${dep}_FOUND) set(cmake_fd_version) if (${ARGC} GREATER 1) - if (${ARGV1} STREQUAL EXACT) + if ("${ARGV1}" STREQUAL "") + message(FATAL_ERROR "Invalid arguments to find_dependency. VERSION is empty") + endif() + if ("${ARGV1}" STREQUAL EXACT) message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified") endif() set(cmake_fd_version ${ARGV1}) endif() set(cmake_fd_exact_arg) if(${ARGC} GREATER 2) - if (NOT ${ARGV2} STREQUAL EXACT) + if (NOT "${ARGV2}" STREQUAL EXACT) message(FATAL_ERROR "Invalid arguments to find_dependency") endif() set(cmake_fd_exact_arg EXACT) diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 6696515..a72954c 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -492,6 +492,8 @@ function(FEATURE_SUMMARY) set(title_ENABLED_FEATURES "The following features have been enabled:") set(title_DISABLED_FEATURES "The following features have been disabled:") + set(title_PACKAGES_FOUND "The following packages have been found:") + set(title_PACKAGES_NOT_FOUND "The following packages have not been found:") set(title_OPTIONAL_PACKAGES_FOUND "The following OPTIONAL packages have been found:") set(title_OPTIONAL_PACKAGES_NOT_FOUND "The following OPTIONAL packages have not been found:") set(title_RECOMMENDED_PACKAGES_FOUND "The following RECOMMENDED packages have been found:") diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index e23a58b..c41f3a7 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -27,6 +27,10 @@ # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp). +# +# If also calling find_package(PythonLibs), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2005-2010 Kitware, Inc. @@ -71,18 +75,23 @@ if(PythonInterp_FIND_VERSION) else() set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) endif() - -list(APPEND _Python_NAMES python) - -# Search for the current active python version first find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) # Set up the versions we know about, in the order we will search. Always add # the user supplied additional versions to the front. -set(_Python_VERSIONS - ${Python_ADDITIONAL_VERSIONS} - ${_PYTHON_FIND_OTHER_VERSIONS} - ) +set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) +# If FindPythonInterp has already found the major and minor version, +# insert that version next to get consistent versions of the interpreter and +# library. +if(DEFINED PYTHONLIBS_VERSION_STRING) + string(REPLACE "." ";" _PYTHONLIBS_VERSION "${PYTHONLIBS_VERSION_STRING}") + list(GET _PYTHONLIBS_VERSION 0 _PYTHONLIBS_VERSION_MAJOR) + list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR) + list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR}) +endif() +# Search for the current active python version first +list(APPEND _Python_VERSIONS ";") +list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS}) unset(_PYTHON_FIND_OTHER_VERSIONS) unset(_PYTHON1_VERSIONS) @@ -91,7 +100,7 @@ unset(_PYTHON3_VERSIONS) # Search for newest python version if python executable isn't found if(NOT PYTHON_EXECUTABLE) - foreach(_CURRENT_VERSION ${_Python_VERSIONS}) + foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) set(_Python_NAMES python${_CURRENT_VERSION}) if(WIN32) list(APPEND _Python_NAMES python) diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 40c7d50..cc875ad 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -31,6 +31,10 @@ # # PYTHON_LIBRARY - path to the python library # PYTHON_INCLUDE_DIR - path to where Python.h is found +# +# If also calling find_package(PythonInterp), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2001-2009 Kitware, Inc. diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index be11dce..040cd27 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 0) -set(CMake_VERSION_PATCH 20140313) +set(CMake_VERSION_PATCH 20140314) #set(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index f0b1124..cb6e56e 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -383,6 +383,12 @@ int cmCTestCoverageHandler::ProcessHandler() { return error; } + file_count += this->HandleLCovCoverage(&cont); + error = cont.Error; + if ( file_count < 0 ) + { + return error; + } file_count += this->HandleTracePyCoverage(&cont); error = cont.Error; if ( file_count < 0 ) @@ -880,6 +886,13 @@ int cmCTestCoverageHandler::HandleGCovCoverage( std::string gcovExtraFlags = this->CTest->GetCTestConfiguration("CoverageExtraFlags"); + // Immediately skip to next coverage option since codecov is only for Intel + // compiler + if ( gcovCommand == "codecov" ) + { + return 0; + } + // Style 1 std::string st1gcovOutputRex1 = "[0-9]+\\.[0-9]+% of [0-9]+ (source |)lines executed in file (.*)$"; @@ -1296,6 +1309,270 @@ int cmCTestCoverageHandler::HandleGCovCoverage( return file_count; } +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::HandleLCovCoverage( + cmCTestCoverageHandlerContainer* cont) +{ + std::string lcovCommand + = this->CTest->GetCTestConfiguration("CoverageCommand"); + std::string lcovExtraFlags + = this->CTest->GetCTestConfiguration("CoverageExtraFlags"); + if ( lcovCommand != "codecov" ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " Not a valid Intel Coverage command." + << std::endl); + return 0; + } + // There is only percentage completed output from LCOV + std::string st2lcovOutputRex3 = "[0-9]+%"; + cmsys::RegularExpression st2re3(st2lcovOutputRex3.c_str()); + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " This is coverage command: " << lcovCommand + << std::endl); + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " These are coverage command flags: " << lcovExtraFlags + << std::endl); + + std::vector<std::string> files; + this->FindLCovFiles(files); + std::vector<std::string>::iterator it; + + if ( files.size() == 0 ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " Cannot find any LCov coverage files." + << std::endl); + // No coverage files is a valid thing, so the exit code is 0 + return 0; + } + std::string testingDir = this->CTest->GetBinaryDir(); + std::string tempDir = testingDir; + std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory(); + + std::set<std::string> missingFiles; + + std::string actualSourceFile = ""; + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Processing coverage (each . represents one file):" << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + int file_count = 0; + + // make sure output from lcov is in English! + cmCTestCoverageHandlerLocale locale_C; + static_cast<void>(locale_C); + + // In intel compiler we have to call codecov only once in each executable + // directory. It collects all *.dyn files to generate .dpi file. + for ( it = files.begin(); it != files.end(); ++ it ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush); + std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str()); + cmSystemTools::ChangeDirectory(fileDir.c_str()); + std::string command = "\"" + lcovCommand + "\" " + + lcovExtraFlags + " "; + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Current coverage dir: " + << fileDir.c_str() << std::endl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str() + << std::endl); + + std::string output = ""; + std::string errors = ""; + int retVal = 0; + *cont->OFS << "* Run coverage for: " << fileDir.c_str() << std::endl; + *cont->OFS << " Command: " << command.c_str() << std::endl; + int res = this->CTest->RunCommand(command.c_str(), &output, &errors, + &retVal, fileDir.c_str(), 0 /*this->TimeOut*/); + + *cont->OFS << " Output: " << output.c_str() << std::endl; + *cont->OFS << " Errors: " << errors.c_str() << std::endl; + if ( ! res ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem running coverage on file: " << it->c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Command produced error: " << errors << std::endl); + cont->Error ++; + continue; + } + if ( retVal != 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: " + << retVal << " while processing: " << it->c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Command produced error: " << cont->Error << std::endl); + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "--------------------------------------------------------------" + << std::endl + << output << std::endl + << "--------------------------------------------------------------" + << std::endl); + + std::vector<std::string> lines; + std::vector<std::string>::iterator line; + + cmSystemTools::Split(output.c_str(), lines); + + for ( line = lines.begin(); line != lines.end(); ++line) + { + std::string sourceFile; + std::string lcovFile; + + if ( line->size() == 0 ) + { + // Ignore empty line + } + // Look for LCOV files in binary directory + // Intel Compiler creates a CodeCoverage dir for each subfolder and + // each subfolder has LCOV files + cmsys::Glob gl; + gl.RecurseOn(); + gl.RecurseThroughSymlinksOff(); + std::string dir; + std::vector<std::string> lcovFiles; + dir = this->CTest->GetBinaryDir(); + std::string daGlob; + daGlob = dir; + daGlob += "/*.LCOV"; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " looking for LCOV files in: " << daGlob << std::endl); + gl.FindFiles(daGlob); + // Keep a list of all LCOV files + lcovFiles.insert(lcovFiles.end(), gl.GetFiles().begin(), + gl.GetFiles().end()); + + for(std::vector<std::string>::iterator a = lcovFiles.begin(); + a != lcovFiles.end(); ++a) + { + lcovFile = *a; + cmsys::ifstream srcead(lcovFile.c_str()); + if ( ! srcead ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: " + << lcovFile << std::endl); + } + std::string srcname; + + int success = cmSystemTools::GetLineFromStream(srcead, srcname); + if ( !success ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error while parsing lcov file '" << lcovFile << "':" + << " No source file name found!" << std::endl); + return 0; + } + srcname = srcname.substr(18); + // We can directly read found LCOV files to determine the source + // files + sourceFile = srcname; + actualSourceFile = srcname; + + for(std::vector<std::string>::iterator t = lcovFiles.begin(); + t != lcovFiles.end(); ++t) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found LCOV File: " + << *t << std::endl); + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "SourceFile: " + << sourceFile << std::endl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "lCovFile: " + << lcovFile << std::endl); + + // If we have some LCOV files to process + if ( !lcovFile.empty() && !actualSourceFile.empty() ) + { + cmCTestCoverageHandlerContainer::SingleFileCoverageVector& vec + = cont->TotalCoverage[actualSourceFile]; + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " in lcovFile: " + << lcovFile << std::endl); + + cmsys::ifstream ifile(lcovFile.c_str()); + if ( ! ifile ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: " + << lcovFile << std::endl); + } + else + { + long cnt = -1; + std::string nl; + + // Skip the first line + cmSystemTools::GetLineFromStream(ifile, nl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "File is ready, start reading." << std::endl); + while ( cmSystemTools::GetLineFromStream(ifile, nl) ) + { + cnt ++; + + // Skip empty lines + if ( !nl.size() ) + { + continue; + } + + // Skip unused lines + if ( nl.size() < 12 ) + { + continue; + } + + // Read the coverage count from the beginning of the lcov + // output line + std::string prefix = nl.substr(0, 17); + int cov = atoi(prefix.c_str()); + + // Read the line number starting at the 17th character of the + // lcov output line + std::string lineNumber = nl.substr(17, 7); + + int lineIdx = atoi(lineNumber.c_str())-1; + if ( lineIdx >= 0 ) + { + while ( vec.size() <= static_cast<size_t>(lineIdx) ) + { + vec.push_back(-1); + } + + // Initially all entries are -1 (not used). If we get coverage + // information, increment it to 0 first. + if ( vec[lineIdx] < 0 ) + { + if ( cov > 0 || prefix.find("#") != prefix.npos ) + { + vec[lineIdx] = 0; + } + } + + vec[lineIdx] += cov; + } + } + } + + actualSourceFile = ""; + } + } + } + + file_count++; + + if ( file_count % 50 == 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " processed: " << file_count + << " out of " << files.size() << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + } + } + + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); + return file_count; +} + //---------------------------------------------------------------------------- void cmCTestCoverageHandler::FindGCovFiles(std::vector<std::string>& files) { @@ -1327,6 +1604,34 @@ void cmCTestCoverageHandler::FindGCovFiles(std::vector<std::string>& files) } } +//---------------------------------------------------------------------------- +void cmCTestCoverageHandler::FindLCovFiles(std::vector<std::string>& files) +{ + cmsys::Glob gl; + gl.RecurseOff(); // No need of recurse if -prof_dir${BUILD_DIR} flag is + // used while compiling. + gl.RecurseThroughSymlinksOff(); + std::string prevBinaryDir; + cmSystemTools::ChangeDirectory( + this->CTest->GetCTestConfiguration("BuildDirectory").c_str()); + + // Run profmerge to merge all *.dyn files into dpi files + cmSystemTools::RunSingleCommand("profmerge"); + + prevBinaryDir = cmSystemTools::GetCurrentWorkingDirectory().c_str(); + + // DPI file should appear in build directory + std::string daGlob; + daGlob = prevBinaryDir; + daGlob += "/*.dpi"; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " looking for dpi files in: " << daGlob << std::endl); + gl.FindFiles(daGlob); + files.insert(files.end(), gl.GetFiles().begin(), gl.GetFiles().end()); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Now searching in: " << daGlob << std::endl); +} + //---------------------------------------------------------------------- int cmCTestCoverageHandler::HandleTracePyCoverage( cmCTestCoverageHandlerContainer* cont) diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 6a8f55d..0a0fe81 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -68,6 +68,10 @@ private: int HandleGCovCoverage(cmCTestCoverageHandlerContainer* cont); void FindGCovFiles(std::vector<std::string>& files); + //! Handle coverage using Intel's LCov + int HandleLCovCoverage(cmCTestCoverageHandlerContainer* cont); + void FindLCovFiles(std::vector<std::string>& files); + //! Handle coverage using xdebug php coverage int HandlePHPCoverage(cmCTestCoverageHandlerContainer* cont); diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 995929e..1b04a00 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -81,9 +81,7 @@ int main(int argc, char** argv) #if defined(KWSYS_CP_UTF8) QTextCodec* utf8_codec = QTextCodec::codecForName("UTF-8"); - QTextCodec::setCodecForCStrings(utf8_codec); QTextCodec::setCodecForLocale(utf8_codec); - QTextCodec::setCodecForTr(utf8_codec); #endif // clean out standard Qt paths for plugins, which we don't use anyway diff --git a/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt b/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt index 6f4fc04..348f8bb 100644 --- a/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt +++ b/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:35 \(message\): +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/find_dependency/RunCMakeTest.cmake b/Tests/RunCMake/find_dependency/RunCMakeTest.cmake index b85104a..9403136 100644 --- a/Tests/RunCMake/find_dependency/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_dependency/RunCMakeTest.cmake @@ -1,5 +1,7 @@ include(RunCMake) run_cmake(EXACT-no-version) +run_cmake(empty-version) +run_cmake(empty-arg-3) run_cmake(invalid-arg-3) run_cmake(extra-args) diff --git a/Tests/RunCMake/find_dependency/empty-arg-3-result.txt b/Tests/RunCMake/find_dependency/empty-arg-3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt b/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt new file mode 100644 index 0000000..bf9b02b --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency +Call Stack \(most recent call first\): + empty-arg-3.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/empty-arg-3.cmake b/Tests/RunCMake/find_dependency/empty-arg-3.cmake new file mode 100644 index 0000000..b08200a --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 1.2 "") diff --git a/Tests/RunCMake/find_dependency/empty-version-result.txt b/Tests/RunCMake/find_dependency/empty-version-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/empty-version-stderr.txt b/Tests/RunCMake/find_dependency/empty-version-stderr.txt new file mode 100644 index 0000000..b5e9f46 --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency. VERSION is empty +Call Stack \(most recent call first\): + empty-version.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/empty-version.cmake b/Tests/RunCMake/find_dependency/empty-version.cmake new file mode 100644 index 0000000..e6f17cd --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 "") diff --git a/Tests/RunCMake/find_dependency/extra-args-stderr.txt b/Tests/RunCMake/find_dependency/extra-args-stderr.txt index 1b52380..83a7f02 100644 --- a/Tests/RunCMake/find_dependency/extra-args-stderr.txt +++ b/Tests/RunCMake/find_dependency/extra-args-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:47 \(message\): +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): Invalid arguments to find_dependency Call Stack \(most recent call first\): extra-args.cmake:4 \(find_dependency\) diff --git a/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt b/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt index c36148f..fee8d5d 100644 --- a/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt +++ b/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:42 \(message\): +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): Invalid arguments to find_dependency Call Stack \(most recent call first\): invalid-arg-3.cmake:4 \(find_dependency\) |