diff options
66 files changed, 419 insertions, 255 deletions
diff --git a/.clang-format b/.clang-format index a8bde41..88bfbd3 100644 --- a/.clang-format +++ b/.clang-format @@ -5,5 +5,4 @@ AlignOperands: false AlwaysBreakAfterReturnType: None AlwaysBreakAfterDefinitionReturnType: None ColumnLimit: 79 -Standard: Cpp03 ... diff --git a/.clang-tidy b/.clang-tidy index 0f14f6b..6093532 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -6,12 +6,19 @@ misc-*,\ -misc-macro-parentheses,\ -misc-misplaced-widening-cast,\ -misc-static-assert,\ -modernize-make-shared,\ -modernize-make-unique,\ -modernize-redundant-void-arg,\ -modernize-use-bool-literals,\ -modernize-use-nullptr,\ -modernize-use-override,\ +modernize-*,\ +-modernize-deprecated-headers,\ +-modernize-loop-convert,\ +-modernize-pass-by-value,\ +-modernize-raw-string-literal,\ +-modernize-replace-auto-ptr,\ +-modernize-use-auto,\ +-modernize-use-default-member-init,\ +-modernize-use-emplace,\ +-modernize-use-equals-default,\ +-modernize-use-equals-delete,\ +-modernize-use-transparent-functors,\ +-modernize-use-using,\ performance-*,\ -performance-inefficient-string-concatenation,\ readability-*,\ diff --git a/Help/release/dev/irsl-intel.rst b/Help/release/dev/irsl-intel.rst new file mode 100644 index 0000000..330fcc6 --- /dev/null +++ b/Help/release/dev/irsl-intel.rst @@ -0,0 +1,5 @@ +irsl-intel +---------- + +* The :module:`InstallRequiredSystemLibraries` gained support for installing + Intel compiler runtimes. diff --git a/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst b/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst index c49d264..789dc99 100644 --- a/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst +++ b/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst @@ -1,15 +1,19 @@ CMAKE_FIND_NO_INSTALL_PREFIX ---------------------------- -Ignore the :variable:`CMAKE_INSTALL_PREFIX` when searching for assets. +Exclude the values of the :variable:`CMAKE_INSTALL_PREFIX` and +:variable:`CMAKE_STAGING_PREFIX` variables from +:variable:`CMAKE_SYSTEM_PREFIX_PATH`. CMake adds these project-destination +prefixes to :variable:`CMAKE_SYSTEM_PREFIX_PATH` by default in order to +support building a series of dependent packages and installing them into +a common prefix. Set ``CMAKE_FIND_NO_INSTALL_PREFIX`` to ``TRUE`` +to suppress this behavior. -CMake adds the :variable:`CMAKE_INSTALL_PREFIX` and the -:variable:`CMAKE_STAGING_PREFIX` variable to the -:variable:`CMAKE_SYSTEM_PREFIX_PATH` by default. This variable may be set -on the command line to control that behavior. +The :variable:`CMAKE_SYSTEM_PREFIX_PATH` is initialized on the first call to a +:command:`project` or :command:`enable_language` command. Therefore one must +set ``CMAKE_FIND_NO_INSTALL_PREFIX`` before this in order to take effect. A +user may set the variable as a cache entry on the command line to achieve this. -Set ``CMAKE_FIND_NO_INSTALL_PREFIX`` to ``TRUE`` to tell -:command:`find_package` not to search in the :variable:`CMAKE_INSTALL_PREFIX` -or :variable:`CMAKE_STAGING_PREFIX` by default. Note that the -prefix may still be searched for other reasons, such as being the same prefix -as the CMake installation, or for being a built-in system prefix. +Note that the prefix(es) may still be searched for other reasons, such as being +the same prefix as the CMake installation, or for being a built-in system +prefix. diff --git a/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst b/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst index e74dfad..38b2f8d 100644 --- a/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst +++ b/Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst @@ -10,8 +10,11 @@ documentation. By default this contains the standard directories for the current system, the :variable:`CMAKE_INSTALL_PREFIX`, and the :variable:`CMAKE_STAGING_PREFIX`. -It is *not* intended to be modified by the project; use -:variable:`CMAKE_PREFIX_PATH` for this. +The installation and staging prefixes may be excluded by setting +the :variable:`CMAKE_FIND_NO_INSTALL_PREFIX` variable. + +``CMAKE_SYSTEM_PREFIX_PATH`` is *not* intended to be modified by the project; +use :variable:`CMAKE_PREFIX_PATH` for this. See also :variable:`CMAKE_SYSTEM_INCLUDE_PATH`, :variable:`CMAKE_SYSTEM_LIBRARY_PATH`, :variable:`CMAKE_SYSTEM_PROGRAM_PATH`, diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 1a4e268..bbbc9eb 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -56,6 +56,36 @@ # Specify the :command:`install(PROGRAMS)` command ``COMPONENT`` # option. If not specified, no such option will be used. +set(_IRSL_HAVE_Intel FALSE) +set(_IRSL_HAVE_MSVC FALSE) +foreach(LANG IN ITEMS C CXX Fortran) + if(CMAKE_${LANG}_COMPILER_ID STREQUAL Intel) + if(NOT _IRSL_HAVE_Intel) + get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_Intel_archdir intel64) + else() + set(_Intel_archdir x86) + endif() + set(_Intel_compiler_ver ${CMAKE_${LANG}_COMPILER_VERSION}) + if(WIN32) + get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../redist/${_Intel_archdir}/compiler" ABSOLUTE) + elseif(APPLE) + get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib" ABSOLUTE) + else() + if(EXISTS "${_Intel_basedir}/../lib/${_Intel_archdir}_lin") + get_filename_component(_Intel_redistdir "${_Intel_basedir}/../lib/${_Intel_archdir}" ABSOLUTE) + else() + get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib/${_Intel_archdir}_lin" ABSOLUTE) + endif() + endif() + set(_IRSL_HAVE_Intel TRUE) + endif() + elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL MSVC) + set(_IRSL_HAVE_MSVC TRUE) + endif() +endforeach() + if(MSVC) file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT) @@ -487,7 +517,7 @@ if(MSVC) # MSVC 8 was the first version with OpenMP # Furthermore, there is no debug version of this - if(CMAKE_INSTALL_OPENMP_LIBRARIES) + if(CMAKE_INSTALL_OPENMP_LIBRARIES AND _IRSL_HAVE_MSVC) if(MSVC_VERSION EQUAL 1911) set(_MSOMP_DLL_VERSION 140) set(_MSOMP_IDE_VERSION 15) @@ -548,6 +578,109 @@ if(MSVC) endforeach() endif() +if(_IRSL_HAVE_Intel) + unset(__install_libs) + if(CMAKE_INSTALL_OPENMP_LIBRARIES) + if(WIN32) + list(APPEND __install_libs "${_Intel_redistdir}/libiomp5md.dll" "${_Intel_redistdir}/libiompstubs5md.dll") + elseif(APPLE) + list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.dylib" "${_Intel_redistdir}/libiompstubs5.dylib") + else() + list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.so" "${_Intel_redistdir}/libiompstubs5.so") + if(_Intel_compiler_ver VERSION_LESS 17) + list(APPEND __install_libs "${_Intel_redistdir}/libomp_db.so") + endif() + if(_Intel_compiler_ver VERSION_LESS 13) + list(APPEND __install_libs "${_Intel_redistdir}/libiompprof5.so") + endif() + endif() + endif() + if(WIN32) + set(__install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c" + "${_Intel_redistdir}/1033" "${_Intel_redistdir}/1041") + foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libgfxoffload.dll libioffload_host.dll libirngmd.dll + libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) + foreach(__Intel_lib IN ITEMS libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + elseif(APPLE) + foreach(__Intel_lib IN ITEMS libchkp.dylib libcilkrts.5.dylib libcilkrts.dylib libimf.dylib libintlc.dylib libirc.dylib libirng.dylib libsvml.dylib) + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + if(_Intel_compiler_ver VERSION_LESS 17) + list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.dylib") + endif() + if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) + foreach(__Intel_lib IN ITEMS libifcore.dylib libifcoremt.dylib libifport.dylib libifportmt.dylib) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + else() + set(__install_dirs "${_Intel_redistdir}/irml") + foreach(__Intel_lib IN ITEMS cilk_db.so libchkp.so libcilkrts.so libcilkrts.so.5 libimf.so libintlc.so libintlc.so.5 libirc.so libpdbx.so libpdbx.so.5 libsvml.so) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + if(_Intel_compiler_ver VERSION_GREATER_EQUAL 13) + foreach(__Intel_lib IN ITEMS libirng.so liboffload.so liboffload.so.5) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15) + foreach(__Intel_lib IN ITEMS libgfxoffload.so libistrconv.so) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16) + foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + if(_Intel_compiler_ver VERSION_LESS 15) + foreach(__Intel_lib IN ITEMS libcxaguard.so libcxaguard.so.5) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) + foreach(__Intel_lib IN ITEMS libicaf.so libifcore.so libifcore.so.5 libifcoremt.so libifcoremt.so.5 libifport.so libifport.so.5) + + list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") + endforeach() + endif() + endif() + + foreach(lib IN LISTS __install_libs) + if(EXISTS ${lib}) + list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib}) + else() + if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) + message(WARNING "system runtime library file does not exist: '${lib}'") + endif() + endif() + endforeach() + + foreach(dir IN LISTS __install_dirs) + if(EXISTS ${dir}) + list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES ${dir}) + else() + if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) + message(WARNING "system runtime library file does not exist: '${dir}'") + endif() + endif() + endforeach() +endif() + if(WATCOM) get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH ) if(CMAKE_C_COMPILER_VERSION) @@ -601,5 +734,10 @@ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION} ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} ) + + install(DIRECTORY ${CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES} + DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION} + ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} + ) endif() endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0e0c748..fda6caa 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 9) -set(CMake_VERSION_PATCH 20170830) +set(CMake_VERSION_PATCH 20170831) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index b65eb64..44c7915 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -313,7 +313,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( const std::string& tempDir = tempInstallDirectory; for (it = installDirectoriesVector.begin(); it != installDirectoriesVector.end(); ++it) { - std::vector<std::pair<std::string, std::string> > symlinkedFiles; + std::vector<std::pair<std::string, std::string>> symlinkedFiles; cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl); cmsys::Glob gl; std::string top = *it; @@ -377,8 +377,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( } /* rebuild symlinks in the installed tree */ if (!symlinkedFiles.empty()) { - std::vector<std::pair<std::string, std::string> >::iterator - symlinkedIt; + std::vector<std::pair<std::string, std::string>>::iterator symlinkedIt; std::string curDir = cmSystemTools::GetCurrentWorkingDirectory(); std::string goToDir = tempDir; goToDir += "/" + subdir; diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 1a339b7..ddc309c 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -64,8 +64,8 @@ bool cmCTestRunTest::CheckOutput() // Check for TIMEOUT_AFTER_MATCH property. if (!this->TestProperties->TimeoutRegularExpressions.empty()) { - std::vector< - std::pair<cmsys::RegularExpression, std::string> >::iterator regIt; + std::vector<std::pair<cmsys::RegularExpression, std::string>>::iterator + regIt; for (regIt = this->TestProperties->TimeoutRegularExpressions.begin(); regIt != this->TestProperties->TimeoutRegularExpressions.end(); ++regIt) { @@ -163,7 +163,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) int res = started ? this->TestProcess->GetProcessStatus() : cmsysProcess_State_Error; int retVal = this->TestProcess->GetExitValue(); - std::vector<std::pair<cmsys::RegularExpression, std::string> >::iterator + std::vector<std::pair<cmsys::RegularExpression, std::string>>::iterator passIt; bool forceFail = false; bool skipped = false; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 57075c7..18d9346 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -994,8 +994,8 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // tests array for tests which require that fixture and tests which are // setups for that fixture. They are needed at the end to populate // dependencies of the cleanup tests in our final list of tests. - std::map<std::string, std::vector<size_t> > fixtureRequirements; - std::map<std::string, std::vector<size_t> > setupFixturesAdded; + std::map<std::string, std::vector<size_t>> fixtureRequirements; + std::map<std::string, std::vector<size_t>> setupFixturesAdded; // Use integer index for iteration because we append to // the tests vector as we go @@ -1150,7 +1150,7 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // This cleanup test could be part of the original test list that was // passed in. It is then possible that no other test requires the // fIt fixture, so we have to check for this. - std::map<std::string, std::vector<size_t> >::const_iterator cIt = + std::map<std::string, std::vector<size_t>>::const_iterator cIt = fixtureRequirements.find(fixture); if (cIt != fixtureRequirements.end()) { const std::vector<size_t>& indices = cIt->second; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index d8627b1..965552c 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -110,11 +110,11 @@ public: std::vector<std::string> Depends; std::vector<std::string> AttachedFiles; std::vector<std::string> AttachOnFail; - std::vector<std::pair<cmsys::RegularExpression, std::string> > + std::vector<std::pair<cmsys::RegularExpression, std::string>> ErrorRegularExpressions; - std::vector<std::pair<cmsys::RegularExpression, std::string> > + std::vector<std::pair<cmsys::RegularExpression, std::string>> RequiredRegularExpressions; - std::vector<std::pair<cmsys::RegularExpression, std::string> > + std::vector<std::pair<cmsys::RegularExpression, std::string>> TimeoutRegularExpressions; std::map<std::string, std::string> Measurements; bool IsInBasedOnREOptions; diff --git a/Source/LexerParser/cmListFileLexer.c b/Source/LexerParser/cmListFileLexer.c index 636a6fb..c6f524c 100644 --- a/Source/LexerParser/cmListFileLexer.c +++ b/Source/LexerParser/cmListFileLexer.c @@ -576,16 +576,16 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[77] = +static const flex_int16_t yy_accept[81] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 25, 13, 22, 1, 16, 3, 13, 5, 6, 7, - 15, 23, 17, 19, 20, 21, 10, 11, 8, 12, - 9, 4, 13, 0, 13, 0, 22, 0, 0, 7, - 13, 0, 13, 0, 2, 0, 13, 17, 0, 18, - 10, 8, 4, 0, 14, 0, 0, 0, 0, 14, - 0, 0, 14, 0, 0, 0, 2, 14, 0, 0, - 0, 0, 0, 0, 0, 0 + 15, 23, 23, 17, 19, 20, 21, 17, 10, 11, + 8, 10, 12, 9, 24, 4, 13, 0, 13, 0, + 22, 0, 0, 7, 13, 0, 13, 0, 2, 0, + 13, 17, 0, 18, 10, 8, 4, 0, 14, 0, + 0, 0, 0, 14, 0, 0, 14, 0, 0, 0, + 2, 14, 0, 0, 0, 0, 0, 0, 0, 0 } ; static const YY_CHAR yy_ec[256] = @@ -620,104 +620,122 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[16] = +static const YY_CHAR yy_meta[17] = { 0, 1, 1, 2, 3, 4, 3, 1, 3, 5, 6, - 1, 6, 1, 1, 7 + 1, 6, 1, 1, 7, 8 } ; -static const flex_int16_t yy_base[95] = +static const flex_int16_t yy_base[99] = { 0, - 0, 0, 13, 25, 14, 16, 17, 18, 90, 88, - 88, 39, 20, 237, 237, 74, 78, 237, 237, 13, - 54, 0, 71, 237, 237, 31, 0, 237, 73, 237, - 237, 0, 0, 65, 75, 0, 33, 30, 72, 0, - 0, 75, 70, 0, 74, 0, 0, 62, 70, 237, - 0, 63, 0, 85, 99, 65, 111, 62, 34, 0, - 54, 116, 0, 54, 127, 51, 237, 50, 0, 48, - 47, 39, 33, 29, 17, 237, 136, 143, 150, 157, - 164, 171, 178, 184, 191, 198, 201, 207, 214, 217, - 219, 225, 228, 230 + 0, 0, 14, 28, 42, 56, 70, 84, 18, 19, + 69, 100, 16, 323, 323, 55, 59, 323, 323, 13, + 115, 0, 323, 52, 323, 323, 21, 51, 0, 323, + 53, 0, 323, 323, 323, 0, 0, 126, 55, 0, + 25, 25, 53, 0, 0, 136, 53, 0, 57, 0, + 0, 42, 50, 323, 0, 43, 0, 146, 160, 45, + 172, 43, 26, 0, 42, 184, 0, 42, 195, 40, + 323, 40, 0, 38, 37, 34, 32, 31, 23, 323, + 211, 219, 227, 235, 243, 251, 259, 267, 274, 281, + 285, 291, 298, 302, 304, 310, 314, 316 } ; -static const flex_int16_t yy_def[95] = +static const flex_int16_t yy_def[99] = { 0, - 76, 1, 77, 77, 78, 78, 79, 79, 80, 80, - 76, 76, 76, 76, 76, 76, 12, 76, 76, 12, - 76, 81, 82, 76, 76, 82, 83, 76, 76, 76, - 76, 84, 12, 85, 12, 86, 76, 76, 87, 20, - 12, 88, 12, 21, 76, 89, 12, 82, 82, 76, - 83, 76, 84, 85, 76, 54, 85, 90, 76, 55, - 87, 88, 55, 62, 88, 91, 76, 55, 92, 93, - 90, 94, 91, 93, 94, 0, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76 + 80, 1, 81, 81, 82, 82, 83, 83, 84, 84, + 80, 80, 80, 80, 80, 80, 12, 80, 80, 12, + 80, 85, 80, 86, 80, 80, 86, 86, 87, 80, + 80, 87, 80, 80, 80, 88, 12, 89, 12, 90, + 80, 80, 91, 20, 12, 92, 12, 21, 80, 93, + 12, 86, 86, 80, 87, 80, 88, 89, 80, 58, + 89, 94, 80, 59, 91, 92, 59, 66, 92, 95, + 80, 59, 96, 97, 94, 98, 95, 97, 98, 0, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80 } ; -static const flex_int16_t yy_nxt[253] = +static const flex_int16_t yy_nxt[340] = { 0, 12, 13, 14, 13, 15, 16, 17, 18, 19, 12, - 12, 20, 21, 22, 12, 24, 28, 25, 28, 28, - 28, 37, 40, 37, 40, 62, 26, 24, 29, 25, - 29, 31, 31, 50, 37, 48, 37, 54, 26, 33, - 59, 63, 45, 34, 59, 35, 45, 62, 33, 33, - 33, 33, 36, 33, 41, 55, 54, 58, 42, 63, - 43, 72, 60, 41, 44, 41, 45, 46, 41, 55, - 55, 56, 70, 52, 48, 49, 67, 66, 57, 63, - 60, 64, 58, 52, 49, 39, 38, 76, 65, 55, - 14, 56, 14, 76, 76, 76, 76, 76, 57, 55, - - 76, 76, 76, 34, 76, 68, 76, 76, 55, 55, - 55, 55, 69, 55, 54, 76, 54, 76, 54, 54, - 63, 76, 64, 76, 76, 76, 76, 76, 76, 65, - 62, 76, 62, 76, 62, 62, 23, 23, 23, 23, - 23, 23, 23, 27, 27, 27, 27, 27, 27, 27, - 30, 30, 30, 30, 30, 30, 30, 32, 32, 32, - 32, 32, 32, 32, 47, 76, 47, 47, 47, 47, - 47, 48, 76, 48, 76, 48, 48, 48, 51, 76, - 51, 51, 51, 51, 53, 76, 53, 53, 53, 53, - 53, 54, 76, 76, 54, 76, 54, 54, 33, 76, - - 33, 33, 33, 33, 33, 61, 61, 62, 76, 76, - 62, 76, 62, 62, 41, 76, 41, 41, 41, 41, - 41, 71, 71, 73, 73, 55, 76, 55, 55, 55, - 55, 55, 74, 74, 75, 75, 11, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76 + 12, 20, 21, 22, 12, 23, 25, 41, 26, 41, + 14, 14, 44, 54, 44, 52, 41, 27, 41, 28, + 25, 66, 26, 35, 35, 63, 63, 49, 49, 58, + 67, 27, 66, 28, 30, 59, 58, 62, 67, 76, + 64, 59, 74, 56, 52, 53, 31, 32, 30, 71, + 70, 64, 62, 56, 53, 53, 43, 42, 80, 80, + 31, 32, 30, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 34, 35, 30, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 34, 35, + + 37, 80, 80, 80, 38, 80, 39, 80, 80, 37, + 37, 37, 37, 40, 37, 45, 80, 80, 80, 46, + 80, 47, 80, 80, 45, 48, 45, 49, 50, 45, + 59, 80, 60, 80, 80, 80, 80, 80, 80, 61, + 67, 80, 68, 80, 80, 80, 80, 80, 80, 69, + 59, 80, 60, 80, 80, 80, 80, 80, 80, 61, + 59, 80, 80, 80, 38, 80, 72, 80, 80, 59, + 59, 59, 59, 73, 59, 58, 80, 58, 80, 58, + 58, 80, 80, 80, 80, 80, 80, 58, 67, 80, + 68, 80, 80, 80, 80, 80, 80, 69, 66, 80, + + 66, 80, 66, 66, 80, 80, 80, 80, 80, 80, + 66, 24, 24, 24, 24, 24, 24, 24, 24, 29, + 29, 29, 29, 29, 29, 29, 29, 33, 33, 33, + 33, 33, 33, 33, 33, 36, 36, 36, 36, 36, + 36, 36, 36, 51, 80, 51, 51, 51, 51, 51, + 51, 52, 80, 52, 80, 52, 52, 52, 52, 55, + 80, 55, 55, 55, 55, 80, 55, 57, 80, 57, + 57, 57, 57, 57, 58, 80, 80, 58, 80, 58, + 58, 37, 80, 37, 37, 37, 37, 37, 37, 65, + 65, 66, 80, 80, 66, 80, 66, 66, 45, 80, + + 45, 45, 45, 45, 45, 45, 75, 75, 77, 77, + 59, 80, 59, 59, 59, 59, 59, 59, 78, 78, + 79, 79, 11, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80 } ; -static const flex_int16_t yy_chk[253] = +static const flex_int16_t yy_chk[340] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 6, 7, - 8, 13, 20, 13, 20, 75, 3, 4, 5, 4, - 6, 7, 8, 26, 37, 26, 37, 74, 4, 12, - 38, 73, 38, 12, 59, 12, 59, 72, 12, 12, - 12, 12, 12, 12, 21, 71, 70, 68, 21, 66, - 21, 64, 61, 21, 21, 21, 21, 21, 21, 34, - 58, 34, 56, 52, 49, 48, 45, 43, 34, 42, - 39, 42, 35, 29, 23, 17, 16, 11, 42, 54, - 10, 54, 9, 0, 0, 0, 0, 0, 54, 55, - - 0, 0, 0, 55, 0, 55, 0, 0, 55, 55, - 55, 55, 55, 55, 57, 0, 57, 0, 57, 57, - 62, 0, 62, 0, 0, 0, 0, 0, 0, 62, - 65, 0, 65, 0, 65, 65, 77, 77, 77, 77, - 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, - 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, - 80, 80, 80, 80, 81, 0, 81, 81, 81, 81, - 81, 82, 0, 82, 0, 82, 82, 82, 83, 0, - 83, 83, 83, 83, 84, 0, 84, 84, 84, 84, - 84, 85, 0, 0, 85, 0, 85, 85, 86, 0, - - 86, 86, 86, 86, 86, 87, 87, 88, 0, 0, - 88, 0, 88, 88, 89, 0, 89, 89, 89, 89, - 89, 90, 90, 91, 91, 92, 0, 92, 92, 92, - 92, 92, 93, 93, 94, 94, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76 + 1, 1, 1, 1, 1, 1, 3, 13, 3, 13, + 9, 10, 20, 27, 20, 27, 41, 3, 41, 3, + 4, 79, 4, 9, 10, 42, 63, 42, 63, 78, + 77, 4, 76, 4, 5, 75, 74, 72, 70, 68, + 65, 62, 60, 56, 53, 52, 5, 5, 6, 49, + 47, 43, 39, 31, 28, 24, 17, 16, 11, 0, + 6, 6, 7, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 8, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, + + 12, 0, 0, 0, 12, 0, 12, 0, 0, 12, + 12, 12, 12, 12, 12, 21, 0, 0, 0, 21, + 0, 21, 0, 0, 21, 21, 21, 21, 21, 21, + 38, 0, 38, 0, 0, 0, 0, 0, 0, 38, + 46, 0, 46, 0, 0, 0, 0, 0, 0, 46, + 58, 0, 58, 0, 0, 0, 0, 0, 0, 58, + 59, 0, 0, 0, 59, 0, 59, 0, 0, 59, + 59, 59, 59, 59, 59, 61, 0, 61, 0, 61, + 61, 0, 0, 0, 0, 0, 0, 61, 66, 0, + 66, 0, 0, 0, 0, 0, 0, 66, 69, 0, + + 69, 0, 69, 69, 0, 0, 0, 0, 0, 0, + 69, 81, 81, 81, 81, 81, 81, 81, 81, 82, + 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, + 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, + 84, 84, 84, 85, 0, 85, 85, 85, 85, 85, + 85, 86, 0, 86, 0, 86, 86, 86, 86, 87, + 0, 87, 87, 87, 87, 0, 87, 88, 0, 88, + 88, 88, 88, 88, 89, 0, 0, 89, 0, 89, + 89, 90, 0, 90, 90, 90, 90, 90, 90, 91, + 91, 92, 0, 0, 92, 0, 92, 92, 93, 0, + + 93, 93, 93, 93, 93, 93, 94, 94, 95, 95, + 96, 0, 96, 96, 96, 96, 96, 96, 97, 97, + 98, 98, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80 } ; /* Table of booleans, true if rule could match eol. */ @@ -1075,13 +1093,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 77 ) + if ( yy_current_state >= 81 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 237 ); + while ( yy_base[yy_current_state] != 323 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1647,7 +1665,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 16); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1656,7 +1674,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 77 ) + if ( yy_current_state >= 81 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1676,7 +1694,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ char *yy_cp = yyg->yy_c_buf_p; - YY_CHAR yy_c = 1; + YY_CHAR yy_c = 16; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1685,11 +1703,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 77 ) + if ( yy_current_state >= 81 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 76); + yy_is_jam = (yy_current_state == 80); (void)yyg; return yy_is_jam ? 0 : yy_current_state; diff --git a/Source/LexerParser/cmListFileLexer.in.l b/Source/LexerParser/cmListFileLexer.in.l index 6ec8da4..f2fd538 100644 --- a/Source/LexerParser/cmListFileLexer.in.l +++ b/Source/LexerParser/cmListFileLexer.in.l @@ -74,7 +74,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer); %x COMMENT MAKEVAR \$\([A-Za-z0-9_]*\) -UNQUOTED ([^ \t\r\n\(\)#\\\"[=]|\\.) +UNQUOTED ([^ \0\t\r\n\(\)#\\\"[=]|\\.) LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" %% @@ -113,7 +113,7 @@ LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" BEGIN(COMMENT); } -<COMMENT>.* { +<COMMENT>[^\0\n]* { lexer->column += yyleng; } @@ -168,7 +168,7 @@ LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" BEGIN(BRACKET); } -<BRACKET,BRACKETEND>. { +<BRACKET,BRACKETEND>[^\0\n] { cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; BEGIN(BRACKET); @@ -231,7 +231,7 @@ LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" return 1; } -<STRING>. { +<STRING>[^\0\n] { cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index a4f66a9..b6ea75a 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -120,7 +120,7 @@ struct cmIsPair }; template <typename K, typename V> -struct cmIsPair<std::pair<K, V> > +struct cmIsPair<std::pair<K, V>> { enum { diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index a0775b3..fc2bd0f 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -42,7 +42,7 @@ bool cmDepends::Write(std::ostream& makeDepends, std::ostream& internalDepends) std::vector<std::string> pairs; cmSystemTools::ExpandListArgument(srcStr, pairs); - std::map<std::string, std::set<std::string> > dependencies; + std::map<std::string, std::set<std::string>> dependencies; for (std::vector<std::string>::iterator si = pairs.begin(); si != pairs.end();) { // Get the source and object file. @@ -53,7 +53,7 @@ bool cmDepends::Write(std::ostream& makeDepends, std::ostream& internalDepends) std::string const& obj = *si++; dependencies[obj].insert(src); } - for (std::map<std::string, std::set<std::string> >::const_iterator it = + for (std::map<std::string, std::set<std::string>>::const_iterator it = dependencies.begin(); it != dependencies.end(); ++it) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 678a595..8c17348 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -64,7 +64,7 @@ public: }; /** Represent entire dynamic section header */ - typedef std::vector<std::pair<long, unsigned long> > DynamicEntryList; + typedef std::vector<std::pair<long, unsigned long>> DynamicEntryList; /** Get the type of the file opened. */ FileType GetFileType() const; diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 408497b..22246b2 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -32,7 +32,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args, this->SetError("called with incorrect number of arguments"); return false; } - std::vector<std::vector<const char*> > cmds; + std::vector<std::vector<const char*>> cmds; std::string arguments; bool doing_command = false; size_t command_index = 0; diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 547fc99..2c77343 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -63,7 +63,7 @@ cmExtraCodeBlocksGenerator::GetFactory() void cmExtraCodeBlocksGenerator::Generate() { // for each sub project in the project create a codeblocks project - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { // create a project file @@ -217,7 +217,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( Tree tree; // build tree of virtual folders - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { // Collect all files diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 96502d5..438c854 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -54,13 +54,13 @@ void cmExtraCodeLiteGenerator::Generate() std::string workspaceFileName; std::string workspaceSourcePath; - const std::map<std::string, std::vector<cmLocalGenerator*> >& projectMap = + const std::map<std::string, std::vector<cmLocalGenerator*>>& projectMap = this->GlobalGenerator->GetProjectMap(); // loop projects and locate the root project. // and extract the information for creating the worspace // root makefile - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = projectMap.begin(); it != projectMap.end(); ++it) { const cmMakefile* mf = it->second[0]->GetMakefile(); @@ -165,7 +165,7 @@ std::vector<std::string> cmExtraCodeLiteGenerator::CreateProjectsByProjectMaps( { std::vector<std::string> retval; // for each sub project in the workspace create a codelite project - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); it++) { diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 684d1f5..bfc490c 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -536,7 +536,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects( this->AppendLinkedResource(xml, "[Subprojects]", "virtual:/virtual", VirtualFolder); - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { std::string linkSourceDirectory = diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 5bb424b..bd0a261 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -68,7 +68,7 @@ void cmExtraSublimeTextGenerator::Generate() "CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS"); // for each sub project in the project create a sublime text 2 project - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { // create a project file diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index bf6d23f..58fcd22 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -24,7 +24,7 @@ class cmExtraSublimeTextGenerator : public cmExternalMakefileProjectGenerator { public: static cmExternalMakefileProjectGeneratorFactory* GetFactory(); - typedef std::map<std::string, std::vector<std::string> > MapSourceFileFlags; + typedef std::map<std::string, std::vector<std::string>> MapSourceFileFlags; cmExtraSublimeTextGenerator(); void Generate() CM_OVERRIDE; diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 939a5bc..32542f0 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -112,7 +112,7 @@ protected: std::vector<std::string> SearchPathSuffixes; - std::map<PathGroup, std::vector<PathLabel> > PathGroupLabelMap; + std::map<PathGroup, std::vector<PathLabel>> PathGroupLabelMap; std::vector<PathGroup> PathGroupOrder; std::map<std::string, PathLabel> PathLabelStringMap; std::map<PathLabel, cmSearchPath> LabeledPaths; diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 00b5ff4..3d8b3ba 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -379,7 +379,7 @@ void cmCompiledGeneratorExpression::GetMaxLanguageStandard( const cmGeneratorTarget* tgt, std::map<std::string, std::string>& mapping) { typedef std::map<cmGeneratorTarget const*, - std::map<std::string, std::string> > + std::map<std::string, std::string>> MapType; MapType::const_iterator it = this->MaxLanguageStandard.find(tgt); if (it != this->MaxLanguageStandard.end()) { diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 9d9ae4e..d22a191 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -143,7 +143,7 @@ private: mutable std::set<cmGeneratorTarget const*> AllTargetsSeen; mutable std::set<std::string> SeenTargetProperties; mutable std::map<cmGeneratorTarget const*, - std::map<std::string, std::string> > + std::map<std::string, std::string>> MaxLanguageStandard; mutable std::string Output; mutable bool HadContextSensitiveCondition; diff --git a/Source/cmGeneratorExpressionContext.h b/Source/cmGeneratorExpressionContext.h index cf292dc..5b0123e 100644 --- a/Source/cmGeneratorExpressionContext.h +++ b/Source/cmGeneratorExpressionContext.h @@ -26,7 +26,7 @@ struct cmGeneratorExpressionContext std::set<cmGeneratorTarget const*> AllTargets; std::set<std::string> SeenTargetProperties; std::set<cmGeneratorTarget const*> SourceSensitiveTargets; - std::map<cmGeneratorTarget const*, std::map<std::string, std::string> > + std::map<cmGeneratorTarget const*, std::map<std::string, std::string>> MaxLanguageStandard; cmLocalGenerator* LG; std::string Config; diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index c026631..f0eafb4 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -58,7 +58,7 @@ void cmGeneratorExpressionDAGChecker::Initialize() TEST_TRANSITIVE_PROPERTY_METHOD) false)) // NOLINT(clang-tidy) #undef TEST_TRANSITIVE_PROPERTY_METHOD { - std::map<std::string, std::set<std::string> >::const_iterator it = + std::map<std::string, std::set<std::string>>::const_iterator it = top->Seen.find(this->Target); if (it != top->Seen.end()) { const std::set<std::string>& propSet = it->second; diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index a3974ab..3f73fca 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -82,7 +82,7 @@ private: const cmGeneratorExpressionDAGChecker* const Parent; const std::string Target; const std::string Property; - std::map<std::string, std::set<std::string> > Seen; + std::map<std::string, std::set<std::string>> Seen; const GeneratorExpressionContent* const Content; const cmListFileBacktrace Backtrace; Result CheckResult; diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index f2dbc26..c73d486 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -25,13 +25,13 @@ std::string GeneratorExpressionContent::ProcessArbitraryContent( const cmGeneratorExpressionNode* node, const std::string& identifier, cmGeneratorExpressionContext* context, cmGeneratorExpressionDAGChecker* dagChecker, - std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator + std::vector<std::vector<cmGeneratorExpressionEvaluator*>>::const_iterator pit) const { std::string result; const std::vector< - std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator pend = + std::vector<cmGeneratorExpressionEvaluator*>>::const_iterator pend = this->ParamChildren.end(); for (; pit != pend; ++pit) { std::vector<cmGeneratorExpressionEvaluator*>::const_iterator it = @@ -122,10 +122,10 @@ std::string GeneratorExpressionContent::EvaluateParameters( { const int numExpected = node->NumExpectedParameters(); { - std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator + std::vector<std::vector<cmGeneratorExpressionEvaluator*>>::const_iterator pit = this->ParamChildren.begin(); const std::vector< - std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator pend = + std::vector<cmGeneratorExpressionEvaluator*>>::const_iterator pend = this->ParamChildren.end(); const bool acceptsArbitraryContent = node->AcceptsArbitraryContentParameter(); @@ -188,5 +188,5 @@ GeneratorExpressionContent::~GeneratorExpressionContent() { cmDeleteAll(this->IdentifierChildren); std::for_each(this->ParamChildren.begin(), this->ParamChildren.end(), - cmDeleteAll<std::vector<cmGeneratorExpressionEvaluator*> >); + cmDeleteAll<std::vector<cmGeneratorExpressionEvaluator*>>); } diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index a7e5f6f..cdf89d7 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -71,7 +71,7 @@ struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator } void SetParameters( - std::vector<std::vector<cmGeneratorExpressionEvaluator*> > const& + std::vector<std::vector<cmGeneratorExpressionEvaluator*>> const& parameters) { this->ParamChildren = parameters; @@ -100,12 +100,12 @@ private: const cmGeneratorExpressionNode* node, const std::string& identifier, cmGeneratorExpressionContext* context, cmGeneratorExpressionDAGChecker* dagChecker, - std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator + std::vector<std::vector<cmGeneratorExpressionEvaluator*>>::const_iterator pit) const; private: std::vector<cmGeneratorExpressionEvaluator*> IdentifierChildren; - std::vector<std::vector<cmGeneratorExpressionEvaluator*> > ParamChildren; + std::vector<std::vector<cmGeneratorExpressionEvaluator*>> ParamChildren; const char* StartContent; size_t ContentLength; }; diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 7d34293..44c93ec 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1320,7 +1320,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode } context->HadHeadSensitiveCondition = true; - typedef std::map<std::string, std::vector<std::string> > LangMap; + typedef std::map<std::string, std::vector<std::string>> LangMap; static LangMap availableFeatures; LangMap testedFeatures; @@ -1390,7 +1390,7 @@ static const char* targetPolicyWhitelist[] = { nullptr #define TARGET_POLICY_STRING(POLICY) , #POLICY - CM_FOR_EACH_TARGET_POLICY(TARGET_POLICY_STRING) + CM_FOR_EACH_TARGET_POLICY(TARGET_POLICY_STRING) #undef TARGET_POLICY_STRING }; diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index c33349a..278de04 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -97,7 +97,7 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( return; } - std::vector<std::vector<cmGeneratorExpressionEvaluator*> > parameters; + std::vector<std::vector<cmGeneratorExpressionEvaluator*>> parameters; std::vector<std::vector<cmGeneratorExpressionToken>::const_iterator> commaTokens; std::vector<cmGeneratorExpressionToken>::const_iterator colonToken; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index a0a3f4f..4e412f3 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -749,7 +749,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory( config_upper = cmSystemTools::UpperCase(config); } - typedef std::map<std::string, std::vector<std::string> > IncludeCacheType; + typedef std::map<std::string, std::vector<std::string>> IncludeCacheType; IncludeCacheType::const_iterator iter = this->SystemIncludesCache.find(config_upper); diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 85311a7..1ee8a16 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -661,7 +661,7 @@ private: SourceEntriesType SourceDepends; mutable std::map<cmSourceFile const*, std::string> Objects; std::set<cmSourceFile const*> ExplicitObjectName; - mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache; + mutable std::map<std::string, std::vector<std::string>> SystemIncludesCache; mutable std::string ExportMacro; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 7032cd5..4f799ba 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -439,7 +439,7 @@ cmGhsMultiTargetGenerator::GetObjectNames( cmLocalGhsMultiGenerator* const localGhsMultiGenerator, cmGeneratorTarget* const generatorTarget) { - std::map<std::string, std::vector<cmSourceFile*> > filenameToSource; + std::map<std::string, std::vector<cmSourceFile*>> filenameToSource; std::map<cmSourceFile*, std::string> sourceToFilename; for (std::vector<cmSourceFile*>::const_iterator sf = objectSources->begin(); sf != objectSources->end(); ++sf) { @@ -451,7 +451,7 @@ cmGhsMultiTargetGenerator::GetObjectNames( } std::vector<cmSourceFile*> duplicateSources; - for (std::map<std::string, std::vector<cmSourceFile*> >::const_iterator + for (std::map<std::string, std::vector<cmSourceFile*>>::const_iterator msvSourceI = filenameToSource.begin(); msvSourceI != filenameToSource.end(); ++msvSourceI) { if (msvSourceI->second.size() > 1) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 7ff141d..3931ab8 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -316,7 +316,7 @@ public: TargetDependSet const& GetTargetDirectDepends( const cmGeneratorTarget* target); - const std::map<std::string, std::vector<cmLocalGenerator*> >& GetProjectMap() + const std::map<std::string, std::vector<cmLocalGenerator*>>& GetProjectMap() const { return this->ProjectMap; @@ -468,7 +468,7 @@ protected: std::vector<cmLocalGenerator*> LocalGenerators; cmMakefile* CurrentConfigureMakefile; // map from project name to vector of local generators in that project - std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap; + std::map<std::string, std::vector<cmLocalGenerator*>> ProjectMap; // Set of named installation components requested by the project. std::set<std::string> InstallComponents; @@ -580,7 +580,7 @@ private: // track targets to issue CMP0068 warning for. std::set<std::string> CMP0068WarnTargets; - mutable std::map<cmSourceFile*, std::set<cmGeneratorTarget const*> > + mutable std::map<cmSourceFile*, std::set<cmGeneratorTarget const*>> FilenameTargetDepends; #if defined(CMAKE_BUILD_WITH_CMAKE) diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 39ac73a..c337ab0 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -49,7 +49,7 @@ void cmGlobalKdevelopGenerator::Generate() { // for each sub project in the project create // a kdevelop project - for (std::map<std::string, std::vector<cmLocalGenerator*> >::const_iterator + for (std::map<std::string, std::vector<cmLocalGenerator*>>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { std::string outputDir = it->second[0]->GetCurrentBinaryDirectory(); diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index de3546b..c9cd0fd 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -952,7 +952,7 @@ void cmGlobalNinjaGenerator::AddDependencyToAll(const std::string& input) void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies() { - for (std::map<std::string, std::set<std::string> >::iterator i = + for (std::map<std::string, std::set<std::string>>::iterator i = this->AssumedSourceDependencies.begin(); i != this->AssumedSourceDependencies.end(); ++i) { cmNinjaDeps deps; @@ -1260,7 +1260,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) } // remove all source files we know will exist. - typedef std::map<std::string, std::set<std::string> >::const_iterator map_it; + typedef std::map<std::string, std::set<std::string>>::const_iterator map_it; for (map_it i = this->AssumedSourceDependencies.begin(); i != this->AssumedSourceDependencies.end(); ++i) { knownDependencies.insert(this->ConvertToNinjaPath(i->first)); diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 87affdc..4a8ebe7 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -446,13 +446,13 @@ private: std::set<std::string> CombinedBuildOutputs; /// The mapping from source file to assumed dependencies. - std::map<std::string, std::set<std::string> > AssumedSourceDependencies; + std::map<std::string, std::set<std::string>> AssumedSourceDependencies; typedef std::map<std::string, cmGeneratorTarget*> TargetAliasMap; TargetAliasMap TargetAliases; typedef std::map<cmGeneratorTarget const*, - std::set<cmGeneratorTarget const*> > + std::set<cmGeneratorTarget const*>> TargetDependsClosureMap; TargetDependsClosureMap TargetDependsClosures; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index b155f5b..2ed51a0 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -334,7 +334,7 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile( // output the SLN file void cmGlobalVisualStudio7Generator::OutputSLNFile() { - std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it; + std::map<std::string, std::vector<cmLocalGenerator*>>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { this->OutputSLNFile(it->second[0], it->second); } @@ -467,7 +467,7 @@ void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) const char* prefix = "CMAKE_FOLDER_GUID_"; const std::string::size_type skip_prefix = strlen(prefix); std::string guidProjectTypeFolder = "2150E333-8FDC-42A3-9474-1A3956D46DE8"; - for (std::map<std::string, std::set<std::string> >::iterator iter = + for (std::map<std::string, std::set<std::string>>::iterator iter = VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter) { std::string fullName = iter->first; @@ -487,7 +487,7 @@ void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) void cmGlobalVisualStudio7Generator::WriteFoldersContent(std::ostream& fout) { - for (std::map<std::string, std::set<std::string> >::iterator iter = + for (std::map<std::string, std::set<std::string>>::iterator iter = VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter) { std::string key(iter->first); diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 32a8d60..788c431 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -156,7 +156,7 @@ protected: virtual void WriteFolders(std::ostream& fout); virtual void WriteFoldersContent(std::ostream& fout); - std::map<std::string, std::set<std::string> > VisualStudioFolders; + std::map<std::string, std::set<std::string>> VisualStudioFolders; // Set during OutputSLNFile with the name of the current project. // There is one SLN file per project. diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index f85e409..d7ea35a 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -58,7 +58,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() const char* no_working_dir = 0; std::vector<std::string> no_depends; cmCustomCommandLines no_commands; - std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it; + std::map<std::string, std::vector<cmLocalGenerator*>>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { std::vector<cmLocalGenerator*>& gen = it->second; // add the ALL_BUILD to the first local generator of each project @@ -295,7 +295,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() if (!this->cmGlobalGenerator::ComputeTargetDepends()) { return false; } - std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it; + std::map<std::string, std::vector<cmLocalGenerator*>>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { std::vector<cmLocalGenerator*>& gen = it->second; for (std::vector<cmLocalGenerator*>::iterator i = gen.begin(); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 9dbb173..bfc8d9b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -330,7 +330,7 @@ cmLocalGenerator* cmGlobalXCodeGenerator::CreateLocalGenerator(cmMakefile* mf) void cmGlobalXCodeGenerator::AddExtraIDETargets() { - std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it; + std::map<std::string, std::vector<cmLocalGenerator*>>::iterator it; // make sure extra targets are added before calling // the parent generate which will call trace depends for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { @@ -347,7 +347,7 @@ void cmGlobalXCodeGenerator::Generate() if (cmSystemTools::GetErrorOccuredFlag()) { return; } - std::map<std::string, std::vector<cmLocalGenerator*> >::iterator it; + std::map<std::string, std::vector<cmLocalGenerator*>>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { cmLocalGenerator* root = it->second[0]; this->SetGenerationRoot(root); @@ -1089,7 +1089,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( // framework or bundle targets std::vector<cmXCodeObject*> contentBuildPhases; if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) { - typedef std::map<std::string, std::vector<cmSourceFile*> > + typedef std::map<std::string, std::vector<cmSourceFile*>> mapOfVectorOfSourceFiles; mapOfVectorOfSourceFiles bundleFiles; for (std::vector<cmSourceFile*>::const_iterator i = classes.begin(); @@ -1140,7 +1140,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( // create vector of "resource content file" build phases - only for // framework or bundle targets if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) { - typedef std::map<std::string, std::vector<cmSourceFile*> > + typedef std::map<std::string, std::vector<cmSourceFile*>> mapOfVectorOfSourceFiles; mapOfVectorOfSourceFiles bundleFiles; for (std::vector<cmSourceFile*>::const_iterator i = classes.begin(); @@ -2924,7 +2924,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->CreateObject(cmXCodeObject::XCConfigurationList); cmXCodeObject* buildConfigurations = this->CreateObject(cmXCodeObject::OBJECT_LIST); - typedef std::vector<std::pair<std::string, cmXCodeObject*> > Configs; + typedef std::vector<std::pair<std::string, cmXCodeObject*>> Configs; Configs configs; const char* defaultConfigName = "Debug"; for (unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6e0e28c..1e5cd39 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1601,7 +1601,7 @@ void cmLocalGenerator::AddCompilerRequirementFlag( return; } - static std::map<std::string, std::vector<std::string> > langStdMap; + static std::map<std::string, std::vector<std::string>> langStdMap; if (langStdMap.empty()) { // Maintain sorted order, most recent first. langStdMap["CXX"].push_back("17"); diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 83bc9d3..b0eb1da 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -105,7 +105,7 @@ private: std::string HomeRelativeOutputPath; - typedef std::map<cmCustomCommand const*, std::set<cmGeneratorTarget*> > + typedef std::map<cmCustomCommand const*, std::set<cmGeneratorTarget*>> CustomCommandTargetMap; CustomCommandTargetMap CustomCommandTargets; std::vector<cmCustomCommand const*> CustomCommands; diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index d75ee8e..52acd35 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -70,7 +70,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, // options, single values and multi values typedef std::map<std::string, bool> options_map; typedef std::map<std::string, std::string> single_map; - typedef std::map<std::string, std::vector<std::string> > multi_map; + typedef std::map<std::string, std::vector<std::string>> multi_map; options_map options; single_map single; multi_map multi; diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 07fb528..ebfb6f0 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -858,7 +858,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( // Extract relevant source files std::vector<std::string> generatedSources; - std::vector<std::pair<std::string, bool> > qrcSources; + std::vector<std::pair<std::string, bool>> qrcSources; { const std::string qrcExt = "qrc"; std::vector<cmSourceFile*> srcFiles; @@ -914,7 +914,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( const std::string qtMajorVersion = GetQtMajorVersion(target); const std::string rccCommand = RccGetExecutable(target, qtMajorVersion); const cmFilePathChecksum fpathCheckSum(makefile); - for (std::vector<std::pair<std::string, bool> >::const_iterator it = + for (std::vector<std::pair<std::string, bool>>::const_iterator it = qrcSources.begin(); it != qrcSources.end(); ++it) { const std::string& absFile = it->first; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index e51033a..d7f1ea7 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -750,8 +750,8 @@ bool cmQtAutoGenerators::RunAutogen() // key = moc source filepath, value = moc output filepath std::map<std::string, std::string> mocsIncluded; std::map<std::string, std::string> mocsNotIncluded; - std::map<std::string, std::set<std::string> > mocDepends; - std::map<std::string, std::vector<std::string> > uisIncluded; + std::map<std::string, std::set<std::string>> mocDepends; + std::map<std::string, std::vector<std::string>> uisIncluded; // collects all headers which may need to be mocced std::set<std::string> mocHeaderFiles; std::set<std::string> uicHeaderFiles; @@ -828,7 +828,7 @@ bool cmQtAutoGenerators::MocRequired(const std::string& contentText, void cmQtAutoGenerators::MocFindDepends( const std::string& absFilename, const std::string& contentText, - std::map<std::string, std::set<std::string> >& mocDepends) + std::map<std::string, std::set<std::string>>& mocDepends) { for (std::vector<MocDependFilter>::iterator fit = this->MocDependFilters.begin(); @@ -899,8 +899,8 @@ bool cmQtAutoGenerators::UicSkip(const std::string& absFilename) const bool cmQtAutoGenerators::ParseSourceFile( const std::string& absFilename, std::map<std::string, std::string>& mocsIncluded, - std::map<std::string, std::set<std::string> >& mocDepends, - std::map<std::string, std::vector<std::string> >& uisIncluded, bool relaxed) + std::map<std::string, std::set<std::string>>& mocDepends, + std::map<std::string, std::vector<std::string>>& uisIncluded, bool relaxed) { std::string contentText; bool success = ReadAll(contentText, absFilename); @@ -931,7 +931,7 @@ bool cmQtAutoGenerators::ParseSourceFile( void cmQtAutoGenerators::UicParseContent( const std::string& absFilename, const std::string& contentText, - std::map<std::string, std::vector<std::string> >& uisIncluded) + std::map<std::string, std::vector<std::string>>& uisIncluded) { if (this->Verbose) { this->LogInfo("AutoUic: Checking " + absFilename); @@ -952,7 +952,7 @@ void cmQtAutoGenerators::UicParseContent( bool cmQtAutoGenerators::MocParseSourceContent( const std::string& absFilename, const std::string& contentText, std::map<std::string, std::string>& mocsIncluded, - std::map<std::string, std::set<std::string> >& mocDepends, bool relaxed) + std::map<std::string, std::set<std::string>>& mocDepends, bool relaxed) { if (this->Verbose) { this->LogInfo("AutoMoc: Checking " + absFilename); @@ -1148,7 +1148,7 @@ bool cmQtAutoGenerators::MocParseSourceContent( void cmQtAutoGenerators::MocParseHeaderContent( const std::string& absFilename, const std::string& contentText, std::map<std::string, std::string>& mocsNotIncluded, - std::map<std::string, std::set<std::string> >& mocDepends) + std::map<std::string, std::set<std::string>>& mocDepends) { // Log if (this->Verbose) { @@ -1196,8 +1196,8 @@ bool cmQtAutoGenerators::ParseHeaders( const std::set<std::string>& uicHeaderFiles, const std::map<std::string, std::string>& mocsIncluded, std::map<std::string, std::string>& mocsNotIncluded, - std::map<std::string, std::set<std::string> >& mocDepends, - std::map<std::string, std::vector<std::string> >& uisIncluded) + std::map<std::string, std::set<std::string>>& mocDepends, + std::map<std::string, std::vector<std::string>>& uisIncluded) { bool success = true; // Merged header files list to read files only once @@ -1235,7 +1235,7 @@ bool cmQtAutoGenerators::ParseHeaders( bool cmQtAutoGenerators::MocGenerateAll( const std::map<std::string, std::string>& mocsIncluded, const std::map<std::string, std::string>& mocsNotIncluded, - const std::map<std::string, std::set<std::string> >& mocDepends) + const std::map<std::string, std::set<std::string>>& mocDepends) { if (!this->MocEnabled()) { return true; @@ -1375,7 +1375,7 @@ bool cmQtAutoGenerators::MocGenerateAll( */ bool cmQtAutoGenerators::MocGenerateFile( const std::string& sourceFile, const std::string& mocFileName, - const std::map<std::string, std::set<std::string> >& mocDepends, + const std::map<std::string, std::set<std::string>>& mocDepends, bool included) { bool mocGenerated = false; @@ -1391,7 +1391,7 @@ bool cmQtAutoGenerators::MocGenerateFile( generateMoc = FileAbsentOrOlder(mocFileAbs, sourceFile); if (!generateMoc) { // Test if a dependency file changed - std::map<std::string, std::set<std::string> >::const_iterator dit = + std::map<std::string, std::set<std::string>>::const_iterator dit = mocDepends.find(sourceFile); if (dit != mocDepends.end()) { for (std::set<std::string>::const_iterator fit = dit->second.begin(); @@ -1523,19 +1523,19 @@ bool cmQtAutoGenerators::UicFindIncludedFile(std::string& absFile, } bool cmQtAutoGenerators::UicGenerateAll( - const std::map<std::string, std::vector<std::string> >& uisIncluded) + const std::map<std::string, std::vector<std::string>>& uisIncluded) { if (!this->UicEnabled()) { return true; } // single map with input / output names - std::map<std::string, std::map<std::string, std::string> > sourceGenMap; + std::map<std::string, std::map<std::string, std::string>> sourceGenMap; { // Collision lookup map std::map<std::string, std::string> testMap; // Compile maps - for (std::map<std::string, std::vector<std::string> >::const_iterator sit = + for (std::map<std::string, std::vector<std::string>>::const_iterator sit = uisIncluded.begin(); sit != uisIncluded.end(); ++sit) { const std::string& source(sit->first); @@ -1576,7 +1576,7 @@ bool cmQtAutoGenerators::UicGenerateAll( // generate ui files for (std::map<std::string, - std::map<std::string, std::string> >::const_iterator it = + std::map<std::string, std::string>>::const_iterator it = sourceGenMap.begin(); it != sourceGenMap.end(); ++it) { for (std::map<std::string, std::string>::const_iterator sit = diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index a8eb961..5cb3d9f 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -62,7 +62,7 @@ private: std::string* macroName = nullptr); void MocFindDepends( const std::string& absFilename, const std::string& contentText, - std::map<std::string, std::set<std::string> >& mocDepends); + std::map<std::string, std::set<std::string>>& mocDepends); bool MocSkip(const std::string& absFilename) const; bool UicSkip(const std::string& absFilename) const; @@ -70,8 +70,8 @@ private: bool ParseSourceFile( const std::string& absFilename, std::map<std::string, std::string>& mocsIncluded, - std::map<std::string, std::set<std::string> >& mocDepends, - std::map<std::string, std::vector<std::string> >& includedUis, + std::map<std::string, std::set<std::string>>& mocDepends, + std::map<std::string, std::vector<std::string>>& includedUis, bool relaxed); void SearchHeadersForSourceFile(const std::string& absFilename, @@ -83,31 +83,31 @@ private: const std::set<std::string>& uicHeaderFiles, const std::map<std::string, std::string>& mocsIncluded, std::map<std::string, std::string>& mocsNotIncluded, - std::map<std::string, std::set<std::string> >& mocDepends, - std::map<std::string, std::vector<std::string> >& includedUis); + std::map<std::string, std::set<std::string>>& mocDepends, + std::map<std::string, std::vector<std::string>>& includedUis); void UicParseContent( const std::string& fileName, const std::string& contentText, - std::map<std::string, std::vector<std::string> >& includedUis); + std::map<std::string, std::vector<std::string>>& includedUis); bool MocParseSourceContent( const std::string& absFilename, const std::string& contentText, std::map<std::string, std::string>& mocsIncluded, - std::map<std::string, std::set<std::string> >& mocDepends, bool relaxed); + std::map<std::string, std::set<std::string>>& mocDepends, bool relaxed); void MocParseHeaderContent( const std::string& absFilename, const std::string& contentText, std::map<std::string, std::string>& mocsNotIncluded, - std::map<std::string, std::set<std::string> >& mocDepends); + std::map<std::string, std::set<std::string>>& mocDepends); // -- Moc file generation bool MocGenerateAll( const std::map<std::string, std::string>& mocsIncluded, const std::map<std::string, std::string>& mocsNotIncluded, - const std::map<std::string, std::set<std::string> >& mocDepends); + const std::map<std::string, std::set<std::string>>& mocDepends); bool MocGenerateFile( const std::string& sourceFile, const std::string& mocFileName, - const std::map<std::string, std::set<std::string> >& mocDepends, + const std::map<std::string, std::set<std::string>>& mocDepends, bool included); // -- Uic file generation @@ -115,7 +115,7 @@ private: const std::string& searchPath, const std::string& searchFile); bool UicGenerateAll( - const std::map<std::string, std::vector<std::string> >& includedUis); + const std::map<std::string, std::vector<std::string>>& includedUis); bool UicGenerateFile(const std::string& realName, const std::string& uiInputFile, const std::string& uiOutputFile); @@ -216,7 +216,7 @@ private: bool RccRunFailed; std::vector<std::string> RccSources; std::map<std::string, std::string> RccOptions; - std::map<std::string, std::vector<std::string> > RccInputs; + std::map<std::string, std::vector<std::string>> RccInputs; }; #endif diff --git a/Source/cmServer.h b/Source/cmServer.h index eafd860..9d8473d 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -62,7 +62,7 @@ public: void OnDisconnect(cmConnection* pConnection); protected: - std::vector<std::unique_ptr<cmConnection> > Connections; + std::vector<std::unique_ptr<cmConnection>> Connections; bool ServeThreadRunning = false; uv_thread_t ServeThread; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 2bcfefd..2b0a826 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -591,7 +591,7 @@ public: std::string Language; std::string Flags; std::vector<std::string> Defines; - std::vector<std::pair<std::string, bool> > IncludePathList; + std::vector<std::pair<std::string, bool>> IncludePathList; }; bool LanguageData::operator==(const LanguageData& other) const @@ -686,7 +686,7 @@ static Json::Value DumpSourceFilesList( std::vector<cmSourceFile*> files; target->GetSourceFiles(files, config); - std::unordered_map<LanguageData, std::vector<std::string> > fileGroups; + std::unordered_map<LanguageData, std::vector<std::string>> fileGroups; for (cmSourceFile* file : files) { LanguageData fileData; fileData.Language = file->GetLanguage(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1ca013c..4d93810 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -714,7 +714,7 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const const char* sigString = (sig == cmTarget::KeywordTLLSignature ? "keyword" : "plain"); s << "The uses of the " << sigString << " signature are here:\n"; - typedef std::vector<std::pair<TLLSignature, cmListFileContext> > Container; + typedef std::vector<std::pair<TLLSignature, cmListFileContext>> Container; cmOutputConverter converter(this->GetMakefile()->GetStateSnapshot()); for (Container::const_iterator it = this->TLLCommands.begin(); it != this->TLLCommands.end(); ++it) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c335c81..940e26c 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -297,7 +297,7 @@ private: std::vector<cmCustomCommand> PreBuildCommands; std::vector<cmCustomCommand> PreLinkCommands; std::vector<cmCustomCommand> PostBuildCommands; - std::vector<std::pair<TLLSignature, cmListFileContext> > TLLCommands; + std::vector<std::pair<TLLSignature, cmListFileContext>> TLLCommands; LinkLibraryVectorType OriginalLinkLibraries; cmMakefile* Makefile; cmTargetInternalPointer Internal; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0e73806..86099eb 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -642,7 +642,7 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferences() this->WriteDotNetReference(*ri, ""); } } - for (std::vector<std::pair<std::string, std::string> >::const_iterator i = + for (std::vector<std::pair<std::string, std::string>>::const_iterator i = hintReferences.begin(); i != hintReferences.end(); ++i) { this->WriteDotNetReference(i->first, i->second); diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h index 9d89fec..981255d 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -107,7 +107,7 @@ private: private: std::ostream& Output; - std::stack<std::string, std::vector<std::string> > Elements; + std::stack<std::string, std::vector<std::string>> Elements; std::string IndentationElement; std::size_t Level; bool ElementOpen; diff --git a/Tests/CompileFeatures/cxx_digit_separators.cpp b/Tests/CompileFeatures/cxx_digit_separators.cpp index a40ac0a..abcd1c8 100644 --- a/Tests/CompileFeatures/cxx_digit_separators.cpp +++ b/Tests/CompileFeatures/cxx_digit_separators.cpp @@ -1,5 +1,6 @@ int someFunc() { - int one_thousand = 1'000; return one_thousand - 1000; + int one_thousand = 1'000; + return one_thousand - 1000; } diff --git a/Tests/CompileFeatures/cxx_raw_string_literals.cpp b/Tests/CompileFeatures/cxx_raw_string_literals.cpp index ea4d231..0f83a7c 100644 --- a/Tests/CompileFeatures/cxx_raw_string_literals.cpp +++ b/Tests/CompileFeatures/cxx_raw_string_literals.cpp @@ -1,7 +1,7 @@ void someFunc() { -const char p[] = R"(a\ + const char p[] = R"(a\ b c)"; } diff --git a/Tests/CompileFeatures/cxx_variadic_templates.cpp b/Tests/CompileFeatures/cxx_variadic_templates.cpp index 3dc2570..6951230 100644 --- a/Tests/CompileFeatures/cxx_variadic_templates.cpp +++ b/Tests/CompileFeatures/cxx_variadic_templates.cpp @@ -35,7 +35,7 @@ struct eval }; template <template <typename...> class T, typename... U> -struct eval<T<U...> > +struct eval<T<U...>> { enum { @@ -62,11 +62,11 @@ struct D // Note: This test assumes that a compiler supporting this feature // supports static_assert. Add a workaround if that does not hold. -static_assert(eval<A<> >::Matched, "A Matches"); -static_assert(eval<A<int> >::Matched, "A Matches"); -static_assert(eval<A<int, char> >::Matched, "A Matches"); -static_assert(eval<B<int> >::Matched, "B Matches"); -static_assert(eval<C<int, char> >::Matched, "C Matches"); -static_assert(eval<D<int, char> >::Matched, "D Matches"); -static_assert(eval<D<int, char, bool> >::Matched, "D Matches"); -static_assert(eval<D<int, char, bool, double> >::Matched, "D Matches"); +static_assert(eval<A<>>::Matched, "A Matches"); +static_assert(eval<A<int>>::Matched, "A Matches"); +static_assert(eval<A<int, char>>::Matched, "A Matches"); +static_assert(eval<B<int>>::Matched, "B Matches"); +static_assert(eval<C<int, char>>::Matched, "C Matches"); +static_assert(eval<D<int, char>>::Matched, "D Matches"); +static_assert(eval<D<int, char, bool>>::Matched, "D Matches"); +static_assert(eval<D<int, char, bool, double>>::Matched, "D Matches"); diff --git a/Tests/Cuda/.clang-format b/Tests/Cuda/.clang-format deleted file mode 100644 index a77589a..0000000 --- a/Tests/Cuda/.clang-format +++ /dev/null @@ -1,9 +0,0 @@ ---- -# This configuration requires clang-format 3.8 or higher. -BasedOnStyle: Mozilla -AlignOperands: false -AlwaysBreakAfterReturnType: None -AlwaysBreakAfterDefinitionReturnType: None -ColumnLimit: 79 -Standard: Cpp11 -... diff --git a/Tests/CudaOnly/.clang-format b/Tests/CudaOnly/.clang-format deleted file mode 100644 index a77589a..0000000 --- a/Tests/CudaOnly/.clang-format +++ /dev/null @@ -1,9 +0,0 @@ ---- -# This configuration requires clang-format 3.8 or higher. -BasedOnStyle: Mozilla -AlignOperands: false -AlwaysBreakAfterReturnType: None -AlwaysBreakAfterDefinitionReturnType: None -ColumnLimit: 79 -Standard: Cpp11 -... diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt b/Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NullTerminatedArgument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt b/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt new file mode 100644 index 0000000..f26754e --- /dev/null +++ b/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at NullTerminatedArgument.cmake:1: + Parse error. Function missing ending "\)". Instead found bad character + with text "". +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument.cmake b/Tests/RunCMake/Syntax/NullTerminatedArgument.cmake Binary files differnew file mode 100644 index 0000000..c82aceb --- /dev/null +++ b/Tests/RunCMake/Syntax/NullTerminatedArgument.cmake diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index d1fbb16..628df91 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -55,6 +55,7 @@ run_cmake(BracketNoSpace5) run_cmake(Escape1) run_cmake(Escape2) run_cmake(EscapeCharsAllowed) +run_cmake(NullTerminatedArgument) include("${RunCMake_SOURCE_DIR}/EscapeCharsDisallowed.cmake") run_cmake(ParenNoSpace0) run_cmake(ParenNoSpace1) diff --git a/Tests/Server/CMakeLists.txt b/Tests/Server/CMakeLists.txt index 2ad05c3..08bef0c 100644 --- a/Tests/Server/CMakeLists.txt +++ b/Tests/Server/CMakeLists.txt @@ -16,7 +16,7 @@ macro(do_test bsname file) ) if (NOT test_result EQUAL 0) - message(SEND_ERROR "TEST FAILED") + message(SEND_ERROR "TEST FAILED: ${test_result}") endif() endmacro() diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py index f5a3f28..9380910 100644 --- a/Tests/Server/server-test.py +++ b/Tests/Server/server-test.py @@ -111,4 +111,5 @@ for obj in testData: print("Completed") cmakelib.exitProc(proc) +print('cmake-server exited: %d' % proc.returncode) sys.exit(proc.returncode) |