diff options
112 files changed, 409 insertions, 219 deletions
diff --git a/Help/release/dev/cpack-deb-long-filenames.rst b/Help/release/dev/cpack-deb-long-filenames.rst new file mode 100644 index 0000000..6113eaf --- /dev/null +++ b/Help/release/dev/cpack-deb-long-filenames.rst @@ -0,0 +1,6 @@ +cpack-deb-long-filenames +------------------------ + +* The :module:`CPackDeb` module learned to support long file names + when archive format is set to GNU tar. + See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index c9678d6..1a7b923 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -177,6 +177,24 @@ # # See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections # +# .. variable:: CPACK_DEBIAN_ARCHIVE_TYPE +# +# The archive format used for creating the Debian package. +# +# * Mandatory : YES +# * Default : "paxr" +# +# Possible values are: +# +# - paxr +# - gnutar +# +# .. note:: +# +# Default pax archive format is the most portable format and generates +# packages that do not treat sparse files specially. +# GNU tar format on the other hand supports longer filenames. +# # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE # # The compression used for creating the Debian package. @@ -842,12 +860,24 @@ function(cpack_deb_prepare_package_vars) set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") endif() + if(CPACK_DEBIAN_ARCHIVE_TYPE) + set(archive_types_ "paxr;gnutar") + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_) + message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported" + "type ${CPACK_DEBIAN_ARCHIVE_TYPE}") + endif() + cmake_policy(POP) + else() + set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr") + endif() + # Compression: (recommended) if(NOT CPACK_DEBIAN_COMPRESSION_TYPE) set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip") endif() - # Recommends: # You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS @@ -1000,6 +1030,7 @@ function(cpack_deb_prepare_package_vars) set(GEN_CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_DEBIAN_PACKAGE_MAINTAINER}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_DESCRIPTION}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}" PARENT_SCOPE) + set(GEN_CPACK_DEBIAN_ARCHIVE_TYPE "${CPACK_DEBIAN_ARCHIVE_TYPE}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_COMPRESSION_TYPE "${CPACK_DEBIAN_COMPRESSION_TYPE}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_RECOMMENDS}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_SUGGESTS "${CPACK_DEBIAN_PACKAGE_SUGGESTS}" PARENT_SCOPE) diff --git a/Modules/Platform/AIX-GNU-CXX.cmake b/Modules/Platform/AIX-GNU-CXX.cmake index ec8e83f..d047801 100644 --- a/Modules/Platform/AIX-GNU-CXX.cmake +++ b/Modules/Platform/AIX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/AIX-GNU) __aix_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index df97ab1..ce6faff 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -34,4 +34,5 @@ macro(__aix_compiler_gnu lang) set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() diff --git a/Modules/Platform/HP-UX-GNU-CXX.cmake b/Modules/Platform/HP-UX-GNU-CXX.cmake index 689bed0..ac72560 100644 --- a/Modules/Platform/HP-UX-GNU-CXX.cmake +++ b/Modules/Platform/HP-UX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/HP-UX-GNU) __hpux_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index 6c71784..cbd8164 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -26,4 +26,5 @@ macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c886a6a..fb13b21 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 6) -set(CMake_VERSION_PATCH 20160905) +set(CMake_VERSION_PATCH 20160906) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 0d3725d..377fee1 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -87,17 +87,17 @@ int cmCPackArchiveGenerator::addOneComponentToArchive( */ #define DECLARE_AND_OPEN_ARCHIVE(filename, archive) \ cmGeneratedFileStream gf; \ - gf.Open(filename.c_str(), false, true); \ + gf.Open((filename).c_str(), false, true); \ if (!GenerateHeader(&gf)) { \ cmCPackLogger(cmCPackLog::LOG_ERROR, \ "Problem to generate Header for archive < " \ - << filename << ">." << std::endl); \ + << (filename) << ">." << std::endl); \ return 0; \ } \ cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \ - if (!archive) { \ + if (!(archive)) { \ cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < " \ - << filename << ">. ERROR =" << archive.GetError() \ + << (filename) << ">. ERROR =" << (archive).GetError() \ << std::endl); \ return 0; \ } diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 1f3ac51..b909598 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -419,6 +419,12 @@ int cmCPackDebGenerator::createDeb() << debian_compression_type << std::endl); } + const char* debian_archive_type = + this->GetOption("GEN_CPACK_DEBIAN_ARCHIVE_TYPE"); + if (!debian_archive_type) { + debian_archive_type = "paxr"; + } + std::string filename_data_tar = strGenWDIR + "/data.tar" + compression_suffix; @@ -431,7 +437,8 @@ int cmCPackDebGenerator::createDeb() << filename_data_tar << "\" for writing" << std::endl); return 0; } - cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, "paxr"); + cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, + debian_archive_type); // uid/gid should be the one of the root user, and this root user has // always uid/gid equal to 0. @@ -535,7 +542,8 @@ int cmCPackDebGenerator::createDeb() return 0; } cmArchiveWrite control_tar(fileStream_control_tar, - cmArchiveWrite::CompressGZip, "paxr"); + cmArchiveWrite::CompressGZip, + debian_archive_type); // sets permissions and uid/gid for the files control_tar.SetUIDAndGID(0u, 0u); diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 640e437..14436da 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -330,8 +330,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, if (!cpack_dmg_disable_applications_symlink) { std::ostringstream application_link; application_link << staging.str() << "/Applications"; - cmSystemTools::CreateSymlink("/Applications", - application_link.str().c_str()); + cmSystemTools::CreateSymlink("/Applications", application_link.str()); } // Optionally add a custom volume icon ... @@ -755,7 +754,7 @@ std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix( // the current COMPONENT belongs to. std::string groupVar = "CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP"; - const char* _groupName = GetOption(groupVar.c_str()); + const char* _groupName = GetOption(groupVar); if (_groupName) { std::string groupName = _groupName; diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index c0d2553..c36439f 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -102,15 +102,14 @@ int cmCPackOSXX11Generator::PackageFiles() } std::string applicationsLinkName = diskImageDirectory + "/Applications"; - cmSystemTools::CreateSymlink("/Applications", applicationsLinkName.c_str()); + cmSystemTools::CreateSymlink("/Applications", applicationsLinkName); - if (!this->CopyResourcePlistFile("VolumeIcon.icns", - diskImageDirectory.c_str(), + if (!this->CopyResourcePlistFile("VolumeIcon.icns", diskImageDirectory, ".VolumeIcon.icns", true) || - !this->CopyResourcePlistFile("DS_Store", diskImageDirectory.c_str(), - ".DS_Store", true) || + !this->CopyResourcePlistFile("DS_Store", diskImageDirectory, ".DS_Store", + true) || !this->CopyResourcePlistFile("background.png", - diskImageBackgroundImageDir.c_str(), + diskImageBackgroundImageDir, "background.png", true) || !this->CopyResourcePlistFile("RuntimeScript", dir) || !this->CopyResourcePlistFile("OSXX11.Info.plist", contDir, diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx index 19b587a..e5b96e3 100644 --- a/Source/CPack/cmCPackPKGGenerator.cxx +++ b/Source/CPack/cmCPackPKGGenerator.cxx @@ -225,8 +225,7 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component, dirName += '/'; dirName += component.Name; dirName += this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"); - unsigned long installedSize = - component.GetInstalledSizeInKbytes(dirName.c_str()); + unsigned long installedSize = component.GetInstalledSizeInKbytes(dirName); xout.StartElement("pkg-ref"); xout.Attribute("id", packageId); @@ -283,7 +282,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name, { std::string uname = cmSystemTools::UpperCase(name); std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname; - const char* inFileName = this->GetOption(cpackVar.c_str()); + const char* inFileName = this->GetOption(cpackVar); if (!inFileName) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() @@ -314,7 +313,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name, // Set this so that distribution.dist gets the right name (without // the path). - this->SetOption(("CPACK_RESOURCE_FILE_" + uname + "_NOPATH").c_str(), + this->SetOption("CPACK_RESOURCE_FILE_" + uname + "_NOPATH", (name + ext).c_str()); cmCPackLogger(cmCPackLog::LOG_VERBOSE, @@ -358,7 +357,7 @@ int cmCPackPKGGenerator::CopyInstallScript(const std::string& resdir, std::string dst = resdir; dst += "/"; dst += name; - cmSystemTools::CopyFileAlways(script.c_str(), dst.c_str()); + cmSystemTools::CopyFileAlways(script, dst); cmSystemTools::SetPermissions(dst.c_str(), 0777); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "copy script : " << script << "\ninto " << dst << std::endl); diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index ce329ca..0704e9f 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -118,13 +118,13 @@ int cmCPackPackageMakerGenerator::PackageFiles() // then copy them into the resource directory and make // them executable if (preflight) { - this->CopyInstallScript(resDir.c_str(), preflight, "preflight"); + this->CopyInstallScript(resDir, preflight, "preflight"); } if (postflight) { - this->CopyInstallScript(resDir.c_str(), postflight, "postflight"); + this->CopyInstallScript(resDir, postflight, "postflight"); } if (postupgrade) { - this->CopyInstallScript(resDir.c_str(), postupgrade, "postupgrade"); + this->CopyInstallScript(resDir, postupgrade, "postupgrade"); } } else if (postflight) { // create a postflight component to house the script @@ -160,7 +160,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() // copy postflight script into resource directory of .pkg std::string resourceDir = packageFile + "/Contents/Resources"; - this->CopyInstallScript(resourceDir.c_str(), postflight, "postflight"); + this->CopyInstallScript(resourceDir, postflight, "postflight"); } if (!this->Components.empty()) { @@ -254,9 +254,9 @@ int cmCPackPackageMakerGenerator::PackageFiles() this->SetOption("CPACK_MODULE_VERSION_SUFFIX", ""); // Copy or create all of the resource files we need. - if (!this->CopyCreateResourceFile("License", resDir.c_str()) || - !this->CopyCreateResourceFile("ReadMe", resDir.c_str()) || - !this->CopyCreateResourceFile("Welcome", resDir.c_str()) || + if (!this->CopyCreateResourceFile("License", resDir) || + !this->CopyCreateResourceFile("ReadMe", resDir) || + !this->CopyCreateResourceFile("Welcome", resDir) || !this->CopyResourcePlistFile("Info.plist") || !this->CopyResourcePlistFile("Description.plist")) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" @@ -372,7 +372,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal() } // Get path to the real PackageMaker, not a symlink: - pkgPath = cmSystemTools::GetRealPath(pkgPath.c_str()); + pkgPath = cmSystemTools::GetRealPath(pkgPath); // Up from there to find the version.plist file in the "Contents" dir: std::string contents_dir; contents_dir = cmSystemTools::GetFilenamePath(pkgPath); diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx index c2a13d0..d867046 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.cxx +++ b/Source/CPack/cmCPackProductBuildGenerator.cxx @@ -73,9 +73,9 @@ int cmCPackProductBuildGenerator::PackageFiles() // Copy or create all of the resource files we need. std::string resDir = packageDirFileName + "/Contents"; - if (!this->CopyCreateResourceFile("License", resDir.c_str()) || - !this->CopyCreateResourceFile("ReadMe", resDir.c_str()) || - !this->CopyCreateResourceFile("Welcome", resDir.c_str())) { + if (!this->CopyCreateResourceFile("License", resDir) || + !this->CopyCreateResourceFile("ReadMe", resDir) || + !this->CopyCreateResourceFile("Welcome", resDir)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" << std::endl); return 0; @@ -185,10 +185,10 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage( // then copy them into the script directory and make // them executable if (preflight) { - this->CopyInstallScript(scriptDir.c_str(), preflight, "preinstall"); + this->CopyInstallScript(scriptDir, preflight, "preinstall"); } if (postflight) { - this->CopyInstallScript(scriptDir.c_str(), postflight, "postinstall"); + this->CopyInstallScript(scriptDir, postflight, "postinstall"); } // The command that will be used to run ProductBuild diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index cdf292c..754bb5f 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -366,11 +366,11 @@ int cmCTestBuildHandler::ProcessHandler() regexes.clear(); \ cmCTestOptionalLog(this->CTest, DEBUG, \ this << "Add " #regexes << std::endl, this->Quiet); \ - for (it = strings.begin(); it != strings.end(); ++it) { \ + for (it = (strings).begin(); it != (strings).end(); ++it) { \ cmCTestOptionalLog(this->CTest, DEBUG, \ "Add " #strings ": " << *it << std::endl, \ this->Quiet); \ - regexes.push_back(it->c_str()); \ + (regexes).push_back(it->c_str()); \ } cmCTestBuildHandlerPopulateRegexVector(this->CustomErrorMatches, this->ErrorMatchRegex); diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 80bb55d..2e062bc 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -9,19 +9,22 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCursesStandardIncludes.h" - -#include "../cmDocumentation.h" -#include "../cmSystemTools.h" -#include "../cmake.h" - -#include <signal.h> -#include <sys/ioctl.h> +#include <cmConfigure.h> +#include "cmCursesForm.h" #include "cmCursesMainForm.h" -#include <cmsys/Encoding.hxx> +#include "cmCursesStandardIncludes.h" +#include "cmDocumentation.h" +#include "cmDocumentationEntry.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include <form.h> +#include <cmsys/Encoding.hxx> +#include <iostream> +#include <signal.h> +#include <string.h> +#include <string> +#include <vector> static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ccmake - Curses Interface for CMake." }, diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 99f7dcc..de95bae 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -11,7 +11,10 @@ ============================================================================*/ #include "cmCursesBoolWidget.h" -#include "cmCursesMainForm.h" +#include "cmCursesWidget.h" +#include "cmState.h" + +#include <string> cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index d2899ee..b9f1b16 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -12,6 +12,9 @@ #ifndef cmCursesBoolWidget_h #define cmCursesBoolWidget_h +#include <cmConfigure.h> + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" class cmCursesMainForm; diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 462cb6e..d115c77 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -11,18 +11,20 @@ ============================================================================*/ #include "cmCursesCacheEntryComposite.h" -#include "../cmState.h" -#include "../cmSystemTools.h" -#include "../cmake.h" #include "cmCursesBoolWidget.h" -#include "cmCursesDummyWidget.h" #include "cmCursesFilePathWidget.h" #include "cmCursesLabelWidget.h" #include "cmCursesOptionsWidget.h" #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" +#include "cmCursesWidget.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmake.h" #include <assert.h> +#include <cmConfigure.h> +#include <vector> cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( const std::string& key, int labelwidth, int entrywidth) diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index c9c8238..c717e1a 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -12,8 +12,12 @@ #ifndef cmCursesCacheEntryComposite_h #define cmCursesCacheEntryComposite_h -#include "cmCursesLabelWidget.h" +#include <cmConfigure.h> // IWYU pragma: keep +#include <string> + +class cmCursesLabelWidget; +class cmCursesWidget; class cmake; class cmCursesCacheEntryComposite diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index a960090..fe73e7e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -11,6 +11,9 @@ ============================================================================*/ #include "cmCursesDummyWidget.h" +#include "cmCursesWidget.h" +#include "cmState.h" + cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index e6ca91e..cf88e6e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -12,6 +12,9 @@ #ifndef cmCursesDummyWidget_h #define cmCursesDummyWidget_h +#include <cmConfigure.h> + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" class cmCursesMainForm; diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 28a74a9..654e0d4 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -11,6 +11,9 @@ ============================================================================*/ #include "cmCursesFilePathWidget.h" +#include "cmCursesPathWidget.h" +#include "cmState.h" + cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h index 72adc77..86c78ce 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.h +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -12,6 +12,8 @@ #ifndef cmCursesFilePathWidget_h #define cmCursesFilePathWidget_h +#include <cmConfigure.h> // IWYU pragma: keep + #include "cmCursesPathWidget.h" class cmCursesFilePathWidget : public cmCursesPathWidget diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx index b3320c9..699dabc 100644 --- a/Source/CursesDialog/cmCursesForm.cxx +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesForm.h" +#include <cmConfigure.h> + cmsys::ofstream cmCursesForm::DebugFile; bool cmCursesForm::Debug = false; diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index c0192fc..bf97c66 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -12,6 +12,8 @@ #ifndef cmCursesForm_h #define cmCursesForm_h +#include <cmConfigure.h> // IWYU pragma: keep + #include "cmCursesStandardIncludes.h" #include <cmsys/FStream.hxx> diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx index 784738b..0ed9240 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.cxx +++ b/Source/CursesDialog/cmCursesLabelWidget.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesLabelWidget.h" +#include "cmCursesWidget.h" + cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index ff645af..990078b 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -12,8 +12,13 @@ #ifndef cmCursesLabelWidget_h #define cmCursesLabelWidget_h +#include <cmConfigure.h> + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include <string> + class cmCursesMainForm; class cmCursesLabelWidget : public cmCursesWidget diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 47f98a2..75b136c 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -11,10 +11,13 @@ ============================================================================*/ #include "cmCursesLongMessageForm.h" -#include "../cmSystemTools.h" -#include "../cmVersion.h" -#include "../cmake.h" +#include "cmCursesForm.h" #include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmVersion.h" + +#include <stdio.h> +#include <string.h> inline int ctrl(int z) { diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index a12ed2f..f8e8544 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -12,11 +12,13 @@ #ifndef cmCursesLongMessageForm_h #define cmCursesLongMessageForm_h -#include "cmCursesStandardIncludes.h" +#include <cmConfigure.h> #include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" -class cmCursesCacheEntryComposite; +#include <string> +#include <vector> class cmCursesLongMessageForm : public cmCursesForm { diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 1d036c4..d8d1a7d 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,19 +11,22 @@ ============================================================================*/ #include "cmCursesMainForm.h" -#include "../cmSystemTools.h" -#include "../cmVersion.h" -#include "../cmake.h" #include "cmAlgorithms.h" -#include "cmCursesBoolWidget.h" #include "cmCursesCacheEntryComposite.h" #include "cmCursesDummyWidget.h" -#include "cmCursesFilePathWidget.h" +#include "cmCursesForm.h" #include "cmCursesLabelWidget.h" #include "cmCursesLongMessageForm.h" -#include "cmCursesPathWidget.h" +#include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" +#include "cmCursesWidget.h" #include "cmState.h" +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmake.h" + +#include <stdio.h> +#include <string.h> inline int ctrl(int z) { @@ -742,8 +745,6 @@ void cmCursesMainForm::FixValue(cmState::CacheEntryType type, } } -#include <unistd.h> - void cmCursesMainForm::HandleInput() { int x = 0, y = 0; diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index d17ee33..1140945 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -12,13 +12,17 @@ #ifndef cmCursesMainForm_h #define cmCursesMainForm_h -#include "cmCursesStandardIncludes.h" +#include <cmConfigure.h> -#include "../cmState.h" #include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmState.h" + +#include <stddef.h> +#include <string> +#include <vector> class cmCursesCacheEntryComposite; -class cmCursesWidget; class cmake; /** \class cmCursesMainForm diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index 9a88aef..f7a8cc6 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -11,7 +11,8 @@ ============================================================================*/ #include "cmCursesOptionsWidget.h" -#include "cmCursesMainForm.h" +#include "cmCursesWidget.h" +#include "cmState.h" #define ctrl(z) ((z)&037) diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index f88b6bc..80dccad 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -12,8 +12,14 @@ #ifndef cmCursesOptionsWidget_h #define cmCursesOptionsWidget_h +#include <cmConfigure.h> + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include <string> +#include <vector> + class cmCursesMainForm; class cmCursesOptionsWidget : public cmCursesWidget diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index 33fffd1..2ee64c7 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -12,8 +12,12 @@ #include "cmCursesPathWidget.h" #include "cmCursesMainForm.h" +#include "cmCursesStringWidget.h" +#include "cmState.h" #include "cmSystemTools.h" +#include <vector> + cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index cd26df6..0ffce04 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -12,8 +12,15 @@ #ifndef cmCursesPathWidget_h #define cmCursesPathWidget_h +#include <cmConfigure.h> + +#include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" +#include <string> + +class cmCursesMainForm; + class cmCursesPathWidget : public cmCursesStringWidget { public: diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 0953978..4929958 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -14,8 +14,6 @@ #include <cmConfigure.h> -#include "../cmStandardIncludes.h" - #if defined(__sun__) && defined(__GNUC__) #define _MSE_INT_H #endif diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index db98a00..726a128 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -11,7 +11,14 @@ ============================================================================*/ #include "cmCursesStringWidget.h" +#include "cmCursesForm.h" #include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmCursesWidget.h" +#include "cmState.h" + +#include <stdio.h> +#include <string.h> inline int ctrl(int z) { diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index c8ca482..2bcf7e6 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -12,8 +12,13 @@ #ifndef cmCursesStringWidget_h #define cmCursesStringWidget_h +#include <cmConfigure.h> + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include <string> + class cmCursesMainForm; /** \class cmCursesStringWidget diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx index 49f2795..ed76e7c 100644 --- a/Source/CursesDialog/cmCursesWidget.cxx +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesWidget.h" +#include <cmConfigure.h> + cmCursesWidget::cmCursesWidget(int width, int height, int left, int top) { this->Field = new_field(height, width, top, left, 0, 0); diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index 2ac5bb8..3f438af 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -12,9 +12,12 @@ #ifndef cmCursesWidget_h #define cmCursesWidget_h +#include <cmConfigure.h> // IWYU pragma: keep + #include "cmCursesStandardIncludes.h" +#include "cmState.h" -#include "../cmState.h" +#include <string> class cmCursesMainForm; diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx index dc7a4b0..a94c54b 100644 --- a/Source/QtDialog/AddCacheEntry.cxx +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -64,7 +64,8 @@ QVariant AddCacheEntry::value() const QWidget* w = this->StackedWidget->currentWidget(); if (qobject_cast<QLineEdit*>(w)) { return static_cast<QLineEdit*>(w)->text(); - } else if (qobject_cast<QCheckBox*>(w)) { + } + if (qobject_cast<QCheckBox*>(w)) { return static_cast<QCheckBox*>(w)->isChecked(); } return QVariant(); diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 5a8a5be..4de4bef 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -29,18 +29,19 @@ #include "cmSystemTools.h" // IWYU pragma: keep -static const char* cmDocumentationName[][2] = { { 0, +static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " cmake-gui - CMake GUI." }, - { 0, 0 } }; + { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationUsage[][2] = { - { 0, " cmake-gui [options]\n" - " cmake-gui [options] <path-to-source>\n" - " cmake-gui [options] <path-to-existing-build>" }, - { 0, 0 } + { CM_NULLPTR, " cmake-gui [options]\n" + " cmake-gui [options] <path-to-source>\n" + " cmake-gui [options] <path-to-existing-build>" }, + { CM_NULLPTR, CM_NULLPTR } }; -static const char* cmDocumentationOptions[][2] = { { 0, 0 } }; +static const char* cmDocumentationOptions[] + [2] = { { CM_NULLPTR, CM_NULLPTR } }; #if defined(Q_OS_MAC) static int cmOSXInstall(std::string dir); diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index fda3e58..5b84597 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -41,7 +41,7 @@ QCMakeThread::QCMakeThread(QObject* p) : QThread(p) - , CMakeInstance(NULL) + , CMakeInstance(CM_NULLPTR) { } @@ -57,7 +57,7 @@ void QCMakeThread::run() emit this->cmakeInitialized(); this->exec(); delete this->CMakeInstance; - this->CMakeInstance = NULL; + this->CMakeInstance = CM_NULLPTR; } CMakeSetupDialog::CMakeSetupDialog() diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index bdb1962..276e2a5 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -3,6 +3,8 @@ #ifndef COMPILERS_HPP #define COMPILERS_HPP +#include <cmConfigure.h> + #include <QWidget> #include <ui_Compilers.h> @@ -11,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers { Q_OBJECT public: - Compilers(QWidget* p = NULL) + Compilers(QWidget* p = CM_NULLPTR) : QWidget(p) { this->setupUi(this); diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index ca5e3b5..c34751a 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -129,8 +129,9 @@ bool StartCompilerSetup::crossCompilerSetup() const void StartCompilerSetup::onSelectionChanged(bool on) { - if (on) + if (on) { selectionChanged(); + } } void StartCompilerSetup::onGeneratorChanged(QString const& name) @@ -144,12 +145,15 @@ void StartCompilerSetup::onGeneratorChanged(QString const& name) int StartCompilerSetup::nextId() const { - if (compilerSetup()) + if (compilerSetup()) { return NativeSetup; - if (crossCompilerSetup()) + } + if (crossCompilerSetup()) { return CrossSetup; - if (crossCompilerToolChainFile()) + } + if (crossCompilerToolChainFile()) { return ToolchainSetup; + } return -1; } @@ -515,7 +519,8 @@ QString FirstConfigure::getCCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getCCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getCCompiler(); } return QString(); @@ -525,7 +530,8 @@ QString FirstConfigure::getCXXCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getCXXCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getCXXCompiler(); } return QString(); @@ -535,7 +541,8 @@ QString FirstConfigure::getFortranCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getFortranCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getFortranCompiler(); } return QString(); diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index a818c6b..7eadb09 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -13,6 +13,8 @@ #ifndef QCMake_h #define QCMake_h +#include <cmConfigure.h> + #include "cmake.h" #ifdef _MSC_VER @@ -71,7 +73,7 @@ class QCMake : public QObject { Q_OBJECT public: - QCMake(QObject* p = 0); + QCMake(QObject* p = CM_NULLPTR); ~QCMake(); public slots: /// load the cache file in a directory diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index cc1f4aa..88ea049 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -33,7 +33,7 @@ public: } protected: - bool filterAcceptsRow(int row, const QModelIndex& p) const + bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE { QStringList strs; const QAbstractItemModel* m = this->sourceModel(); @@ -87,7 +87,7 @@ public: protected: bool ShowAdvanced; - bool filterAcceptsRow(int row, const QModelIndex& p) const + bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE { const QAbstractItemModel* m = this->sourceModel(); QModelIndex idx = m->index(row, 0, p); @@ -160,7 +160,8 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act, // want home/end to go to begin/end of rows, not columns if (act == MoveHome) { return this->model()->index(0, 1); - } else if (act == MoveEnd) { + } + if (act == MoveEnd) { return this->model()->index(this->model()->rowCount() - 1, 1); } return QTreeView::moveCursor(act, mod); @@ -538,15 +539,16 @@ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f) this->FileDialogFlag = f; } -QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, - const QStyleOptionViewItem&, - const QModelIndex& idx) const +QWidget* QCMakeCacheModelDelegate::createEditor( + QWidget* p, const QStyleOptionViewItem& /*option*/, + const QModelIndex& idx) const { QModelIndex var = idx.sibling(idx.row(), 0); int type = var.data(QCMakeCacheModel::TypeRole).toInt(); if (type == QCMakeProperty::BOOL) { - return NULL; - } else if (type == QCMakeProperty::PATH) { + return CM_NULLPTR; + } + if (type == QCMakeProperty::PATH) { QCMakePathEditor* editor = new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, @@ -645,7 +647,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option, QStyleOptionButton opt; opt.QStyleOption::operator=(option); sz = sz.expandedTo( - style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, NULL) + style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR) .size()); return sz; diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index 4b3eb34..fc481b8 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -67,7 +67,7 @@ void QCMakeFilePathEditor::chooseFile() this->fileDialogExists(true); path = QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(), - NULL, QFileDialog::DontResolveSymlinks); + CM_NULLPTR, QFileDialog::DontResolveSymlinks); this->fileDialogExists(false); if (!path.isEmpty()) { @@ -99,7 +99,7 @@ void QCMakePathEditor::chooseFile() // use same QDirModel for all completers static QDirModel* fileDirModel() { - static QDirModel* m = NULL; + static QDirModel* m = CM_NULLPTR; if (!m) { m = new QDirModel(); } @@ -107,7 +107,7 @@ static QDirModel* fileDirModel() } static QDirModel* pathDirModel() { - static QDirModel* m = NULL; + static QDirModel* m = CM_NULLPTR; if (!m) { m = new QDirModel(); m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot); diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index f1e87ce..0d95e63 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -13,6 +13,8 @@ #ifndef QCMakeWidgets_h #define QCMakeWidgets_h +#include <cmConfigure.h> + #include <QComboBox> #include <QCompleter> #include <QLineEdit> @@ -43,7 +45,7 @@ class QCMakePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString()); void chooseFile(); }; @@ -52,7 +54,8 @@ class QCMakeFilePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakeFilePathEditor(QWidget* p = CM_NULLPTR, + const QString& var = QString()); void chooseFile(); }; diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 6a2dfe8..473634d 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -80,7 +80,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, std::string str; if (cmSystemTools::GetEnv(var, str)) { if (this->EscapeQuotes) { - return this->AddString(cmSystemTools::EscapeQuotes(str.c_str())); + return this->AddString(cmSystemTools::EscapeQuotes(str)); } return this->AddString(str); } diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index eec773f..91da239 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -25,9 +25,9 @@ #endif #define check_curl_result(result, errstr) \ - if (result != CURLE_OK && result != CURLE_NOT_BUILT_IN) { \ + if ((result) != CURLE_OK && (result) != CURLE_NOT_BUILT_IN) { \ e += e.empty() ? "" : "\n"; \ - e += errstr; \ + e += (errstr); \ e += ::curl_easy_strerror(result); \ } diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 13736b9..70612d1 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -166,7 +166,7 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os) #define GET_OPT_ARGUMENT(target) \ if ((i + 1 < argc) && !this->IsOption(argv[i + 1])) { \ - target = argv[i + 1]; \ + (target) = argv[i + 1]; \ i = i + 1; \ }; diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index b2def51..d47a0da 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -118,7 +118,7 @@ std::string cmFilePathUuid::GetChecksumString( // Calculate the file ( seed + relative path + name ) checksum std::vector<unsigned char> hashBytes = cmCryptoHash::New("SHA256")->ByteHashString( - (sourceRelSeed + sourceRelPath + sourceFilename).c_str()); + sourceRelSeed + sourceRelPath + sourceFilename); checksumBase32 = cmBase32Encoder().encodeString(&hashBytes[0], hashBytes.size(), false); diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 87cfcf8..b54dc47 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -52,8 +52,9 @@ public: * @arg outputPrefix optional string to prepend to the result * @arg outputSuffix optional string to append to the result */ - std::string get(const std::string& filePath, const char* outputPrefix = NULL, - const char* outputSuffix = NULL); + std::string get(const std::string& filePath, + const char* outputPrefix = CM_NULLPTR, + const char* outputSuffix = CM_NULLPTR); private: void initParentDirs(const std::string& currentSrcDir, diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b4bc084..5653820 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -397,7 +397,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( std::string listfile = root->GetCurrentSourceDirectory(); listfile += "/"; listfile += "CMakeLists.txt"; - allBuildGt->AddSource(listfile.c_str()); + allBuildGt->AddSource(listfile); // Add XCODE depend helper std::string dir = root->GetCurrentBinaryDirectory(); @@ -405,9 +405,9 @@ void cmGlobalXCodeGenerator::AddExtraTargets( if (this->XcodeVersion < 50) { makeHelper.push_back("make"); makeHelper.push_back("-C"); - makeHelper.push_back(dir.c_str()); + makeHelper.push_back(dir); makeHelper.push_back("-f"); - makeHelper.push_back(this->CurrentXCodeHackMakefile.c_str()); + makeHelper.push_back(this->CurrentXCodeHackMakefile); makeHelper.push_back(""); // placeholder, see below } @@ -480,7 +480,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( listfile = lg->GetCurrentSourceDirectory(); listfile += "/"; listfile += "CMakeLists.txt"; - target->AddSource(listfile.c_str()); + target->AddSource(listfile); } } } @@ -841,7 +841,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( // lastKnownFileType as folder in order for Xcode to be able to // open the contents of the folder. // (Xcode 4.6 does not like explicitFileType=folder). - if (cmSystemTools::FileIsDirectory(fullpath.c_str())) { + if (cmSystemTools::FileIsDirectory(fullpath)) { fileType = (ext == "xcassets" ? "folder.assetcatalog" : "folder"); useLastKnownFileType = true; } else { @@ -856,7 +856,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( // Store the file path relative to the top of the source tree. std::string path = this->RelativeToSource(fullpath.c_str()); - std::string name = cmSystemTools::GetFilenameName(path.c_str()); + std::string name = cmSystemTools::GetFilenameName(path); const char* sourceTree = (cmSystemTools::FileIsFullPath(path.c_str()) ? "<absolute>" : "SOURCE_ROOT"); @@ -898,8 +898,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) this->CurrentMakefile = gen->GetMakefile(); std::string outdir = cmSystemTools::CollapseFullPath( this->CurrentLocalGenerator->GetCurrentBinaryDirectory()); - cmSystemTools::SplitPath(outdir.c_str(), - this->CurrentOutputDirectoryComponents); + cmSystemTools::SplitPath(outdir, this->CurrentOutputDirectoryComponents); // Select the current set of configuration types. this->CurrentConfigurationTypes.clear(); @@ -951,7 +950,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( std::string targetName = gtgt->GetName(); // make sure ALL_BUILD, INSTALL, etc are only done once - if (this->SpecialTargetEmitted(targetName.c_str())) { + if (this->SpecialTargetEmitted(targetName)) { continue; } @@ -1223,7 +1222,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt) cmGeneratedFileStream fout(fname.c_str()); fout << "\n"; } - if (cmSourceFile* sf = mf->GetOrCreateSource(fname.c_str())) { + if (cmSourceFile* sf = mf->GetOrCreateSource(fname)) { sf->SetProperty("LANGUAGE", llang.c_str()); gtgt->AddSource(fname); } @@ -1468,7 +1467,7 @@ void cmGlobalXCodeGenerator::AddCommandsToBuildPhase( currentConfig != this->CurrentConfigurationTypes.end(); currentConfig++) { this->CreateCustomRulesMakefile(makefile.c_str(), target, commands, - currentConfig->c_str()); + *currentConfig); } std::string cdir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory(); @@ -1550,8 +1549,8 @@ void cmGlobalXCodeGenerator::CreateCustomRulesMakefile( ccg.GetDepends().begin(); d != ccg.GetDepends().end(); ++d) { std::string dep; - if (this->CurrentLocalGenerator->GetRealDependency(d->c_str(), - configName, dep)) { + if (this->CurrentLocalGenerator->GetRealDependency(*d, configName, + dep)) { makefileStream << "\\\n" << this->ConvertToRelativeForMake(dep.c_str()); } @@ -1662,7 +1661,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } if (!extraLinkOptionsVar.empty()) { this->CurrentLocalGenerator->AddConfigVariableFlags( - extraLinkOptions, extraLinkOptionsVar.c_str(), configName); + extraLinkOptions, extraLinkOptionsVar, configName); } if (gtgt->GetType() == cmState::OBJECT_LIBRARY || @@ -1678,7 +1677,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, if (!configName.empty()) { std::string linkFlagsVar = "LINK_FLAGS_"; linkFlagsVar += cmSystemTools::UpperCase(configName); - if (const char* linkFlags = gtgt->GetProperty(linkFlagsVar.c_str())) { + if (const char* linkFlags = gtgt->GetProperty(linkFlagsVar)) { this->CurrentLocalGenerator->AppendFlags(extraLinkOptions, linkFlags); } } @@ -1916,7 +1915,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, configName); for (std::vector<std::string>::iterator i = includes.begin(); i != includes.end(); ++i) { - if (this->NameResolvesToFramework(i->c_str())) { + if (this->NameResolvesToFramework(*i)) { std::string frameworkDir = *i; frameworkDir += "/../"; frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir); @@ -2165,7 +2164,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, std::string processed = ge.Parse(gtgt->GetProperty(*i)) ->Evaluate(this->CurrentLocalGenerator, configName); - buildSettings->AddAttribute(attribute.c_str(), + buildSettings->AddAttribute(attribute, this->CreateString(processed)); } } @@ -2195,7 +2194,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXAggregateTarget); - target->SetComment(gtgt->GetName().c_str()); + target->SetComment(gtgt->GetName()); cmXCodeObject* buildPhases = this->CreateObject(cmXCodeObject::OBJECT_LIST); std::vector<cmXCodeObject*> emptyContentVector; this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0, @@ -2233,7 +2232,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( } } - target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()).c_str()); + target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId())); return target; } @@ -2257,7 +2256,7 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, comment += " \""; comment += gtgt->GetName(); comment += "\""; - configlist->SetComment(comment.c_str()); + configlist->SetComment(comment); target->AddAttribute("buildConfigurationList", this->CreateObjectReference(configlist)); for (unsigned int i = 0; i < configVector.size(); ++i) { @@ -2266,9 +2265,9 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, buildConfigurations->AddObject(config); cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); - this->CreateBuildSettings(gtgt, buildSettings, configVector[i].c_str()); + this->CreateBuildSettings(gtgt, buildSettings, configVector[i]); config->AddAttribute("name", this->CreateString(configVector[i])); - config->SetComment(configVector[i].c_str()); + config->SetComment(configVector[i]); config->AddAttribute("buildSettings", buildSettings); } if (!configVector.empty()) { @@ -2367,7 +2366,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); defConfig = this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - this->CreateBuildSettings(gtgt, buildSettings, defConfig.c_str()); + this->CreateBuildSettings(gtgt, buildSettings, defConfig); target->AddAttribute("buildSettings", buildSettings); } cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST); @@ -2385,7 +2384,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( fullName += gtgt->GetName(); fullName += ".a"; } else { - fullName = gtgt->GetFullName(defConfig.c_str()); + fullName = gtgt->GetFullName(defConfig); } fileRef->AddAttribute("path", this->CreateString(fullName)); if (this->XcodeVersion == 15) { @@ -2393,7 +2392,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( } fileRef->AddAttribute("sourceTree", this->CreateString("BUILT_PRODUCTS_DIR")); - fileRef->SetComment(gtgt->GetName().c_str()); + fileRef->SetComment(gtgt->GetName()); target->AddAttribute("productReference", this->CreateObjectReference(fileRef)); if (const char* productType = this->GetTargetProductType(gtgt)) { @@ -2401,7 +2400,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( } target->SetTarget(gtgt); this->XCodeObjectMap[gtgt] = target; - target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()).c_str()); + target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId())); return target; } @@ -2426,15 +2425,14 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name, std::string guidStoreName = name; guidStoreName += "_GUID_CMAKE"; const char* storedGUID = - this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); + this->CMakeInstance->GetCacheDefinition(guidStoreName); if (storedGUID) { return storedGUID; } - this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), id.c_str(), - "Stored Xcode object GUID", - cmState::INTERNAL); + this->CMakeInstance->AddCacheEntry( + guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL); return id; } @@ -2482,7 +2480,7 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings, std::string oldValue = attr->GetString(); oldValue += " "; oldValue += value; - attr->SetString(oldValue.c_str()); + attr->SetString(oldValue); } } } @@ -2582,7 +2580,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) std::vector<std::string> const& libDeps = cli.GetDepends(); for (std::vector<std::string>::const_iterator j = libDeps.begin(); j != libDeps.end(); ++j) { - target->AddDependLibrary(configName, j->c_str()); + target->AddDependLibrary(configName, *j); } } @@ -2891,8 +2889,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( std::string project_id = "PROJECT_"; project_id += root->GetProjectName(); this->RootObject->SetId( - this->GetOrCreateId(project_id.c_str(), this->RootObject->GetId()) - .c_str()); + this->GetOrCreateId(project_id.c_str(), this->RootObject->GetId())); group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); this->RootObject->AddAttribute("mainGroup", @@ -2963,7 +2960,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( comment += " \""; comment += this->CurrentProject; comment += "\""; - configlist->SetComment(comment.c_str()); + configlist->SetComment(comment); configlist->AddAttribute("defaultConfigurationIsVisible", this->CreateString("0")); configlist->AddAttribute("defaultConfigurationName", @@ -3373,8 +3370,7 @@ std::string cmGlobalXCodeGenerator::LookupFlags( std::string varName = varNamePrefix; varName += varNameLang; varName += varNameSuffix; - if (const char* varValue = - this->CurrentMakefile->GetDefinition(varName.c_str())) { + if (const char* varValue = this->CurrentMakefile->GetDefinition(varName)) { if (*varValue) { return varValue; } diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 2824f7e..e88e048 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -98,7 +98,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, { \ const char* value = mf->GetDefinition(cmakeDefinition); \ if (value) { \ - var = value; \ + (var) = value; \ } \ } @@ -111,7 +111,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, { \ const char* value = mf->GetDefinition(cmakeDefinition); \ if (value) { \ - var = mf->IsOn(cmakeDefinition); \ + (var) = mf->IsOn(cmakeDefinition); \ } \ } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cecf7b7..694a9f6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1373,7 +1373,7 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target, } // Add preprocessor definitions for this target and configuration. - this->AddCompileDefinitions(defines, target, config, lang.c_str()); + this->AddCompileDefinitions(defines, target, config, lang); } std::string cmLocalGenerator::GetTargetFortranFlags( diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 7688c59..3402191 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -86,9 +86,10 @@ static bool isPolicyNewerThan(cmPolicies::PolicyID id, unsigned int majorV, switch (id) { #define POLICY_CASE(ID, V_MAJOR, V_MINOR, V_PATCH) \ case cmPolicies::ID: \ - return ( \ - majorV < V_MAJOR || (majorV == V_MAJOR && minorV + 1 < V_MINOR + 1) || \ - (majorV == V_MAJOR && minorV == V_MINOR && patchV + 1 < V_PATCH + 1)); + return (majorV < (V_MAJOR) || \ + (majorV == (V_MAJOR) && minorV + 1 < (V_MINOR) + 1) || \ + (majorV == (V_MAJOR) && minorV == (V_MINOR) && \ + patchV + 1 < (V_PATCH) + 1)); CM_FOR_EACH_POLICY_ID_VERSION(POLICY_CASE) #undef POLICY_CASE case cmPolicies::CMPCOUNT: diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index be0ee50..7da9975 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1484,7 +1484,7 @@ void list_item_verbose(FILE* out, struct archive_entry* entry) /* Format the time using 'ls -l' conventions. */ tim = archive_entry_mtime(entry); -#define HALF_YEAR (time_t)365 * 86400 / 2 +#define HALF_YEAR ((time_t)365 * 86400 / 2) #if defined(_WIN32) && !defined(__CYGWIN__) /* Windows' strftime function does not support %e format. */ #define DAY_FMT "%d" diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx index 7c53a3d..9878912 100644 --- a/Source/cmXMLParser.cxx +++ b/Source/cmXMLParser.cxx @@ -20,10 +20,10 @@ cmXMLParser::cmXMLParser() { - this->Parser = 0; + this->Parser = CM_NULLPTR; this->ParseError = 0; - this->ReportCallback = 0; - this->ReportCallbackData = 0; + this->ReportCallback = CM_NULLPTR; + this->ReportCallbackData = CM_NULLPTR; } cmXMLParser::~cmXMLParser() @@ -64,7 +64,7 @@ int cmXMLParser::InitializeParser() } // Create the expat XML parser. - this->Parser = XML_ParserCreate(0); + this->Parser = XML_ParserCreate(CM_NULLPTR); XML_SetElementHandler(static_cast<XML_Parser>(this->Parser), &cmXMLParserStartElement, &cmXMLParserEndElement); XML_SetCharacterDataHandler(static_cast<XML_Parser>(this->Parser), @@ -108,7 +108,7 @@ int cmXMLParser::CleanupParser() // Clean up the parser. XML_ParserFree(static_cast<XML_Parser>(this->Parser)); - this->Parser = 0; + this->Parser = CM_NULLPTR; return result; } @@ -165,7 +165,7 @@ const char* cmXMLParser::FindAttribute(const char** atts, } } } - return 0; + return CM_NULLPTR; } void cmXMLParserStartElement(void* parser, const char* name, const char** atts) diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 529c830..0bf0a7c 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -148,7 +148,8 @@ int main() it != end; ++it) { std::vector<std::string> command; cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); - if (!cmSystemTools::RunSingleCommand(command, 0, 0, 0, + if (!cmSystemTools::RunSingleCommand(command, CM_NULLPTR, CM_NULLPTR, + CM_NULLPTR, it->at("directory").c_str())) { std::cout << "ERROR: Failed to run command \"" << command[0] << "\"" << std::endl; diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx index a31cc42..b419b9e 100644 --- a/Tests/CMakeLib/testGeneratedFileStream.cxx +++ b/Tests/CMakeLib/testGeneratedFileStream.cxx @@ -16,7 +16,7 @@ #include <string> #define cmFailed(m1, m2) \ - std::cout << "FAILED: " << m1 << m2 << "\n"; \ + std::cout << "FAILED: " << (m1) << (m2) << "\n"; \ failed = 1 int testGeneratedFileStream(int /*unused*/, char* /*unused*/ []) diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index 8e8d4c4..e834b93 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -14,9 +14,9 @@ #include <iostream> #include <string> -#define cmPassed(m) std::cout << "Passed: " << m << "\n" +#define cmPassed(m) std::cout << "Passed: " << (m) << "\n" #define cmFailed(m) \ - std::cout << "FAILED: " << m << "\n"; \ + std::cout << "FAILED: " << (m) << "\n"; \ failed = 1 int testSystemTools(int /*unused*/, char* /*unused*/ []) diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 356880c..c4aaf17 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -27,7 +27,7 @@ static test_pair const pairs[] = { { "angles <>", "angles <>" }, { "ampersand &", "ampersand &" }, { "bad-byte \x80", "bad-byte [NON-UTF-8-BYTE-0x80]" }, - { 0, 0 } + { CM_NULLPTR, CM_NULLPTR } }; int testXMLSafe(int /*unused*/, char* /*unused*/ []) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d6c96e1..8293286 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -485,7 +485,6 @@ if(BUILD_TESTING) ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData") - ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader) ADD_TEST_MACRO(Module.FindDependency FindDependency) ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 323a36b..fa3d0f9 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -141,6 +141,9 @@ add_RunCMake_test(DisallowedCommands) add_RunCMake_test(ExternalData) add_RunCMake_test(FeatureSummary) add_RunCMake_test(FPHSA) +if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom") + add_RunCMake_test(GenerateExportHeader) +endif() add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorPlatform) add_RunCMake_test(GeneratorToolset) diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake new file mode 100644 index 0000000..dd72cf7 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "long_filenames_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt$") diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake new file mode 100644 index 0000000..0c1d77e --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake @@ -0,0 +1,7 @@ +function(get_test_prerequirements found_var) + find_program(FAKEROOT_EXECUTABLE NAMES fakeroot) + + if(FAKEROOT_EXECUTABLE) + set(${found_var} true PARENT_SCOPE) + endif() +endfunction() diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake new file mode 100644 index 0000000..0452343 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake @@ -0,0 +1,26 @@ +# create structure required by non root dpkg install +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/updates") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "") + +# some programs used by fakeroot require sbin in path so we should not +# leave this to chance (programs: ldconfig and start-stop-daemon) +set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin") + +execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE} + -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir + --admindir=${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir + --log=${CMAKE_CURRENT_BINARY_DIR}/root_dir/dpkg.log + ${FOUND_FILE_1} + RESULT_VARIABLE install_result_ + ERROR_VARIABLE install_error_ + OUTPUT_QUIET + ) + +if(install_result_) + message(FATAL_ERROR "LONG_FILENAMES package error - result:" + " '${install_result_}'; text: '${install_error_}'") +endif() diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake new file mode 100644 index 0000000..39a6be4 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake @@ -0,0 +1,3 @@ +set(CPACK_PACKAGE_CONTACT "someone") +set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") +set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar") diff --git a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake index 197b99d..cb9a277 100644 --- a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake @@ -5,4 +5,11 @@ function(get_test_prerequirements found_var config_file) file(WRITE "${config_file}" "set(DPKG_EXECUTABLE \"${DPKG_EXECUTABLE}\")") set(${found_var} true PARENT_SCOPE) endif() + + # optional tool for some tests + find_program(FAKEROOT_EXECUTABLE fakeroot) + if(FAKEROOT_EXECUTABLE) + file(APPEND "${config_file}" + "\nset(FAKEROOT_EXECUTABLE \"${FAKEROOT_EXECUTABLE}\")") + endif() endfunction() diff --git a/Tests/RunCMake/CPack/LONG_FILENAMES.cmake b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake new file mode 100644 index 0000000..3242aef --- /dev/null +++ b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake @@ -0,0 +1,10 @@ +set(LONG_FILENAME + "${CMAKE_CURRENT_BINARY_DIR}/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt") + +file(WRITE + "${LONG_FILENAME}" + "long_filename_test") + +install(FILES ${LONG_FILENAME} DESTINATION foo) + +set(CPACK_PACKAGE_NAME "long_filenames") diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 44586d7..a3029cf 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -17,3 +17,4 @@ run_cpack_test(INSTALL_SCRIPTS "RPM" false) run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) run_cpack_test(DEBUGINFO "RPM" true) +run_cpack_test(LONG_FILENAMES "DEB" false) diff --git a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt new file mode 100644 index 0000000..dc92486 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.6) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index 56f0f28..ee0871b 100644 --- a/Tests/Module/GenerateExportHeader/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -1,23 +1,8 @@ -cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) -cmake_policy(SET CMP0054 NEW) +# Test add_compiler_export_flags without deprecation warning. +set(CMAKE_WARN_DEPRECATED OFF) project(GenerateExportHeader) -# Prevent timeout on Watcom by not running the tests. -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom) - file(WRITE - "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - "int main() { return 0; } - " - ) - - add_executable( - GenerateExportHeader - "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - ) - return() -endif() - include(CheckCXXCompilerFlag) set( CMAKE_INCLUDE_CURRENT_DIR ON ) @@ -78,17 +63,18 @@ add_subdirectory(lib_shared_and_static) add_compiler_export_flags() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}) -message("#### COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) -message("#### COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) -message("#### WIN32: " ${WIN32}) -message("#### HAS_WERROR_FLAG: " ${HAS_WERROR_FLAG}) +message(STATUS "COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) +message(STATUS "COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) +message(STATUS "WIN32: " ${WIN32}) +message(STATUS "HAS_WERROR_FLAG: " ${HAS_WERROR_FLAG}) set(link_libraries) macro(macro_add_test_library name) add_subdirectory(${name}) include_directories(${name} - ${${name}_BINARY_DIR} # For the export header. + ${CMAKE_CURRENT_BINARY_DIR}/${name} # For the export header. ) list(APPEND link_libraries ${name}) endmacro() @@ -131,7 +117,7 @@ elseif(COMPILER_HAS_DEPRECATED) else() set(_platform Empty) endif() -message("#### Testing reference: ${_platform}") +message(STATUS "Testing reference: ${_platform}") target_compile_definitions(GenerateExportHeader PRIVATE "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\"" diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake new file mode 100644 index 0000000..e534c1f --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake @@ -0,0 +1,17 @@ +include(RunCMake) + +function(run_GEH) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GEH-build) + set(RunCMake_TEST_NO_CLEAN 1) + if(RunCMake_GENERATOR MATCHES "Make|Ninja") + set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + endif() + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(GEH) + run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader) +endfunction() + +run_GEH() diff --git a/Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt index 9f8c8ef..77c18e0 100644 --- a/Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt @@ -1,5 +1,3 @@ -project(c_identifier) - set(c_identifier_lib_SRCS c_identifier_class.cpp ) diff --git a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.cpp index d252c8e..d252c8e 100644 --- a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.cpp diff --git a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.h index 741efdc..741efdc 100644 --- a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.h diff --git a/Tests/Module/GenerateExportHeader/c_identifier/main.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp index 891bc42..887d777 100644 --- a/Tests/Module/GenerateExportHeader/c_identifier/main.cpp +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp @@ -1,7 +1,7 @@ #include "c_identifier_class.h" -int main(int argc, char** argv) +int main() { CIdentifierClass cic; return cic.someMethod(); diff --git a/Tests/Module/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index 26bea7e..26bea7e 100644 --- a/Tests/Module/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt index a057746..ff81f35 100644 --- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(lib_shared_and_static) - include(GenerateExportHeader) set(CMAKE_CXX_VISIBILITY_PRESET hidden) @@ -33,6 +28,6 @@ generate_export_header(shared_variant CUSTOM_CONTENT_FROM_VARIABLE MY_CUSTOM_CONTENT ) -set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) +target_compile_definitions(static_variant PUBLIC MYPREFIX_LIBSHARED_AND_STATIC_STATIC_DEFINE) export(TARGETS shared_variant static_variant FILE Targets.cmake) diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp index 846c207..846c207 100644 --- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h index ea672fe..ea672fe 100644 --- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h diff --git a/Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt index e20adb1..c4a761c 100644 --- a/Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(libshared) - include(GenerateExportHeader) add_compiler_export_flags() diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp index ad6d356..ad6d356 100644 --- a/Tests/Module/GenerateExportHeader/libshared/libshared.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h index bd9f2e3..bd9f2e3 100644 --- a/Tests/Module/GenerateExportHeader/libshared/libshared.h +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h diff --git a/Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt index b2db3ea..0fd136c 100644 --- a/Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(libstatic) - set(CMAKE_INCLUDE_CURRENT_DIR ON) include(GenerateExportHeader) diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp index 89381af..89381af 100644 --- a/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h index 6072d9b..6072d9b 100644 --- a/Tests/Module/GenerateExportHeader/libstatic/libstatic.h +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt index aeeb13a..7822d9c 100644 --- a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt @@ -1,7 +1,3 @@ -cmake_minimum_required(VERSION 2.8) - -project(nodeprecated) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_defined) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_not_defined) @@ -23,4 +19,4 @@ try_compile(Result ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_defined_build OUTPUT_VARIABLE Out ) -test_fail(Result "Built even with no-deprecated define")
\ No newline at end of file +test_fail(Result "Built even with no-deprecated define") diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in index d8dc482..90cfa12 100644 --- a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.6) project(nodeprecated_test) diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp index eec46d3..f90d098 100644 --- a/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp @@ -1,7 +1,7 @@ #include "someclass.h" -int main(int, char**) +int main() { SomeClass sc; sc.someMethod(); diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.cpp index 81dce62..81dce62 100644 --- a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.cpp diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.h b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.h index 312a177..312a177 100644 --- a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.h +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.h diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h index e8af0a5..e8af0a5 100644 --- a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h index 598bd71..598bd71 100644 --- a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h index cc20e09..cc20e09 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h index 4aaa848..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h index 053ad18..053ad18 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h index 4aaa848..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h index 808ff01..808ff01 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h index 4aaa848..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h index cc20e09..cc20e09 100644 --- a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h index 4aaa848..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h index 4e675af..4e675af 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h index 4d5ed4e..4d5ed4e 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h index 84340e3..84340e3 100644 --- a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h index 598bd71..598bd71 100644 --- a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h +++ b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index a9ef62b..a7080fc 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -126,7 +126,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '^Utilities/(KW|cm).*/' | # Exclude reference content. - egrep -z -v '^Tests/Module/GenerateExportHeader/reference/' | + egrep -z -v '^Tests/RunCMake/GenerateExportHeader/reference/' | # Exclude manually-formatted sources (e.g. with long lines). egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' | |