summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-05-14 19:22:53 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-05-14 19:22:53 (GMT)
commit3d4c7887378bb3f0d486f7ec8166161f0b639c06 (patch)
tree0d65d17ad789d459ffe83f8a2c38affa1492eb2d
parent401922e04ba57d5672abf1cb112f79018e0e8f74 (diff)
downloadCMake-3d4c7887378bb3f0d486f7ec8166161f0b639c06.zip
CMake-3d4c7887378bb3f0d486f7ec8166161f0b639c06.tar.gz
CMake-3d4c7887378bb3f0d486f7ec8166161f0b639c06.tar.bz2
ENH: merge from main tree
-rw-r--r--CMakeLists.txt6
-rw-r--r--Modules/FindJPEG.cmake19
-rw-r--r--Modules/FindKDE4.cmake33
-rw-r--r--Modules/FindQt4.cmake11
-rw-r--r--Source/CPack/cmCPackGenericGenerator.cxx34
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx9
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackTarCompressGenerator.cxx3
-rw-r--r--Source/CPack/cpack.cxx3
-rw-r--r--Source/cmGlobalGenerator.cxx8
-rw-r--r--Source/cmGlobalMSYSMakefileGenerator.h4
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx7
-rw-r--r--Source/cmLinkDirectoriesCommand.cxx3
-rw-r--r--Source/cmLinkLibrariesCommand.cxx6
-rw-r--r--Source/cmListCommand.cxx18
-rw-r--r--Source/cmListFileCache.cxx6
-rw-r--r--Source/cmLoadCacheCommand.cxx3
-rw-r--r--Source/cmLoadCommandCommand.h6
-rw-r--r--Source/cmLocalGenerator.cxx171
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx150
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx165
-rw-r--r--Source/cmLocalVisualStudio7Generator.h6
-rw-r--r--Source/cmMacroCommand.cxx4
-rw-r--r--Source/cmMakeDepend.h3
-rw-r--r--Source/cmMakefile.cxx162
-rw-r--r--Source/cmMakefile.h6
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx36
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx52
-rw-r--r--Source/cmMakefileTargetGenerator.cxx47
-rw-r--r--Source/cmMarkAsAdvancedCommand.cxx6
-rw-r--r--Source/cmMathCommand.h3
-rw-r--r--Source/cmObject.h4
-rw-r--r--Source/cmOptionCommand.cxx7
-rw-r--r--Source/cmOrderLinkDirectories.cxx62
-rw-r--r--Source/cmOrderLinkDirectories.h3
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx3
-rw-r--r--Source/cmProjectCommand.cxx6
-rw-r--r--Source/cmQTWrapCPPCommand.cxx15
-rw-r--r--Source/cmQTWrapUICommand.cxx15
-rw-r--r--Source/cmRemoveDefinitionsCommand.cxx3
-rw-r--r--Source/cmSeparateArgumentsCommand.cxx3
-rw-r--r--Source/cmSeparateArgumentsCommand.h3
-rw-r--r--Source/cmSetDirectoryPropertiesCommand.cxx9
-rw-r--r--Source/cmSetSourceFilesPropertiesCommand.h9
-rw-r--r--Source/cmSetTargetPropertiesCommand.cxx9
-rw-r--r--Source/cmSetTargetPropertiesCommand.h5
-rw-r--r--Source/cmSetTestsPropertiesCommand.cxx9
-rw-r--r--Source/cmSetTestsPropertiesCommand.h8
-rw-r--r--Source/cmSiteNameCommand.cxx6
-rw-r--r--Source/cmSourceFile.cxx4
-rw-r--r--Source/cmSourceFile.h3
-rw-r--r--Source/cmSourceGroupCommand.h3
-rw-r--r--Source/cmStringCommand.cxx3
-rw-r--r--Source/cmSubdirCommand.cxx3
-rw-r--r--Source/cmSubdirCommand.h4
-rw-r--r--Source/cmSystemTools.cxx7
-rw-r--r--Source/cmSystemTools.h3
-rw-r--r--Source/cmTarget.cxx28
-rw-r--r--Source/cmTarget.h12
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx3
-rw-r--r--Source/cmTryCompileCommand.cxx3
-rw-r--r--Source/cmTryCompileCommand.h13
-rw-r--r--Source/cmUseMangledMesaCommand.cxx3
-rw-r--r--Source/cmUtilitySourceCommand.cxx3
-rw-r--r--Source/cmVTKMakeInstantiatorCommand.cxx18
-rw-r--r--Source/cmVTKWrapJavaCommand.cxx10
-rw-r--r--Source/cmVTKWrapPythonCommand.cxx17
-rw-r--r--Source/cmVTKWrapTclCommand.cxx65
-rw-r--r--Source/cmWin32ProcessExecution.h6
-rw-r--r--Source/cmWriteFileCommand.cxx3
-rw-r--r--Source/cmXCode21Object.cxx6
-rw-r--r--Source/cmXCode21Object.h6
-rw-r--r--Source/cmXCodeObject.cxx9
-rw-r--r--Source/cmXCodeObject.h9
-rw-r--r--Source/cmXMLParser.h27
-rw-r--r--Source/cmake.cxx33
-rw-r--r--Source/cmake.h12
-rw-r--r--Source/cmakemain.cxx3
-rw-r--r--Tests/Complex/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt2
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt2
82 files changed, 952 insertions, 551 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f206559..b771dcb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -247,13 +247,13 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME
"cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
IF(NOT DEFINED CPACK_SYSTEM_NAME)
- SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
+ SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
IF(${CPACK_SYSTEM_NAME} MATCHES Windows)
IF(CMAKE_CL_64)
- SET(CPACK_SYSTEM_NAME win64)
+ SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
ELSE(CMAKE_CL_64)
- SET(CPACK_SYSTEM_NAME win32)
+ SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
ENDIF(CMAKE_CL_64)
ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows)
IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index c403fb6..b5abc0b 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -18,12 +18,23 @@ FIND_LIBRARY(JPEG_LIBRARY
PATHS /usr/lib /usr/local/lib
)
-IF (JPEG_LIBRARY)
- IF (JPEG_INCLUDE_DIR)
+IF (JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
SET(JPEG_LIBRARIES ${JPEG_LIBRARY})
SET(JPEG_FOUND "YES")
- ENDIF (JPEG_INCLUDE_DIR)
-ENDIF (JPEG_LIBRARY)
+ELSE (JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
+ SET(JPEG_FOUND "NO")
+ENDIF (JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
+
+
+IF (JPEG_FOUND)
+ IF (NOT JPEG_FIND_QUIETLY)
+ MESSAGE(STATUS "Found JPEG: ${JPEG_LIBRARIES}")
+ ENDIF (NOT JPEG_FIND_QUIETLY)
+ELSE (JPEG_FOUND)
+ IF (JPEG_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find JPEG library")
+ ENDIF (JPEG_FIND_REQUIRED)
+ENDIF (JPEG_FOUND)
# Deprecated declarations.
SET (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} )
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake
index 17affad..211947e 100644
--- a/Modules/FindKDE4.cmake
+++ b/Modules/FindKDE4.cmake
@@ -10,18 +10,15 @@
#
# Author: Alexander Neundorf <neundorf@kde.org>
+FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
+
# First try to find kde-config
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde-config
PATHS
${CMAKE_INSTALL_PREFIX}/bin
- $ENV{KDEDIR}/bin
+ ${_KDEDIRS}
/opt/kde4/bin
- /opt/kde
- /bin
- /usr/bin
- /usr/local/bin
- NO_SYSTEM_PATH
- NO_CMAKE_SYSTEM_PATH
+ NO_DEFAULT_PATH
)
@@ -33,14 +30,7 @@ IF (KDE4_KDECONFIG_EXECUTABLE)
# then ask kde-config for the kde data dirs
EXEC_PROGRAM(${KDE4_KDECONFIG_EXECUTABLE} ARGS --path data OUTPUT_VARIABLE _data_DIR )
-
- IF(WIN32)
- # cmake can't handle paths with '\' correct :-(
- STRING(REGEX REPLACE "\\\\" "/" _data_DIR "${_data_DIR}")
- ELSE(WIN32)
- # replace the ":" with ";" so that it becomes a valid cmake list
- STRING(REGEX REPLACE ":" ";" _data_DIR "${_data_DIR}")
- ENDIF(WIN32)
+ FILE(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
# then check the data dirs for FindKDE4Internal.cmake
FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake ${_data_DIR})
@@ -48,7 +38,7 @@ IF (KDE4_KDECONFIG_EXECUTABLE)
# if it has been found...
IF (KDE4_DATA_DIR)
- SET(CMAKE_MODULE_PATH ${KDE4_DATA_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
+ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules)
IF (KDE4_FIND_QUIETLY)
SET(_quiet QUIET)
@@ -61,13 +51,14 @@ IF (KDE4_KDECONFIG_EXECUTABLE)
# use FindKDE4Internal.cmake to do the rest
FIND_PACKAGE(KDE4Internal ${_req} ${_quiet})
ELSE (KDE4_DATA_DIR)
+ IF (KDE4_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}")
+ ENDIF (KDE4_FIND_REQUIRED)
ENDIF (KDE4_DATA_DIR)
+ELSE (KDE4_KDECONFIG_EXECUTABLE)
+ IF (KDE4_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde-config")
+ ENDIF (KDE4_FIND_REQUIRED)
ENDIF (KDE4_KDECONFIG_EXECUTABLE)
-
-IF (KDE4_FIND_REQUIRED AND NOT KDE4_FOUND)
- MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4")
-ENDIF (KDE4_FIND_REQUIRED AND NOT KDE4_FOUND)
-
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index e5db44b..8f20d48 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -176,7 +176,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake-qt4 PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
$ENV{QTDIR}/bin
-)
+ )
SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
@@ -642,24 +642,25 @@ IF (QT4_QMAKE_FOUND)
# find moc and uic using qmake
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmpQmake/tmp.pro
- "message("MOC <$$QMAKE_MOC>")
- message("UIC <$$QMAKE_UIC>")
+ "message(MOC<$$QMAKE_MOC>)
+ message(UIC<$$QMAKE_UIC>)
")
EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmpQmake
OUTPUT_VARIABLE _moc_OUTPUT
ERROR_VARIABLE _moc_OUTPUT )
-
FILE(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmpQmake")
STRING(REGEX REPLACE ".*MOC<([^>]+).*" "\\1" QT_MOC_EXECUTABLE_INTERNAL "${_moc_OUTPUT}" )
STRING(REGEX REPLACE ".*UIC<([^>]+).*" "\\1" QT_UIC_EXECUTABLE_INTERNAL "${_moc_OUTPUT}" )
+ FILE(TO_CMAKE_PATH ${QT_MOC_EXECUTABLE_INTERNAL} QT_MOC_EXECUTABLE_INTERNAL)
+ FILE(TO_CMAKE_PATH ${QT_UIC_EXECUTABLE_INTERNAL} QT_UIC_EXECUTABLE_INTERNAL)
+
SET(QT_MOC_EXECUTABLE ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
SET(QT_UIC_EXECUTABLE ${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
-
FIND_PROGRAM(QT_UIC3_EXECUTABLE
NAMES uic3
PATHS ${QT_BINARY_DIR}
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx
index 4d34cd3..846226c 100644
--- a/Source/CPack/cmCPackGenericGenerator.cxx
+++ b/Source/CPack/cmCPackGenericGenerator.cxx
@@ -72,11 +72,13 @@ int cmCPackGenericGenerator::PrepareNames()
this->SetOptionIfNotSet("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str());
this->SetOptionIfNotSet("CPACK_OUTPUT_FILE_NAME", outName.c_str());
this->SetOptionIfNotSet("CPACK_OUTPUT_FILE_PATH", destFile.c_str());
- this->SetOptionIfNotSet("CPACK_TEMPORARY_PACKAGE_FILE_NAME", outFile.c_str());
+ this->SetOptionIfNotSet("CPACK_TEMPORARY_PACKAGE_FILE_NAME",
+ outFile.c_str());
this->SetOptionIfNotSet("CPACK_INSTALL_DIRECTORY", this->GetInstallPath());
this->SetOptionIfNotSet("CPACK_NATIVE_INSTALL_DIRECTORY",
cmsys::SystemTools::ConvertToOutputPath(this->GetInstallPath()).c_str());
- this->SetOptionIfNotSet("CPACK_TEMPORARY_INSTALL_DIRECTORY", installPrefix.c_str());
+ this->SetOptionIfNotSet("CPACK_TEMPORARY_INSTALL_DIRECTORY",
+ installPrefix.c_str());
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
@@ -138,7 +140,8 @@ int cmCPackGenericGenerator::InstallProject()
if ( cpackIgnoreFiles )
{
std::vector<std::string> ignoreFilesRegexString;
- cmSystemTools::ExpandListArgument(cpackIgnoreFiles,ignoreFilesRegexString);
+ cmSystemTools::ExpandListArgument(cpackIgnoreFiles,
+ ignoreFilesRegexString);
std::vector<std::string>::iterator it;
for ( it = ignoreFilesRegexString.begin();
it != ignoreFilesRegexString.end();
@@ -282,14 +285,16 @@ int cmCPackGenericGenerator::InstallProject()
= this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS");
const char* cmakeGenerator
= this->GetOption("CPACK_CMAKE_GENERATOR");
- std::string currentWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
+ std::string currentWorkingDirectory =
+ cmSystemTools::GetCurrentWorkingDirectory();
if ( cmakeProjects && *cmakeProjects )
{
if ( !cmakeGenerator )
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "CPACK_INSTALL_CMAKE_PROJECTS is specified, but CPACK_CMAKE_GENERATOR "
- "is not. CPACK_CMAKE_GENERATOR is required to install the project."
+ "CPACK_INSTALL_CMAKE_PROJECTS is specified, but "
+ "CPACK_CMAKE_GENERATOR is not. CPACK_CMAKE_GENERATOR "
+ "is required to install the project."
<< std::endl);
return 0;
}
@@ -348,8 +353,12 @@ int cmCPackGenericGenerator::InstallProject()
"- Run preinstall target for: " << installProjectName << std::endl);
std::string output;
int retVal = 1;
- bool resB = cmSystemTools::RunSingleCommand(buildCommand.c_str(), &output,
- &retVal, installDirectory.c_str(), this->GeneratorVerbose, 0);
+ bool resB =
+ cmSystemTools::RunSingleCommand(buildCommand.c_str(),
+ &output,
+ &retVal,
+ installDirectory.c_str(),
+ this->GeneratorVerbose, 0);
if ( !resB || retVal )
{
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
@@ -394,7 +403,8 @@ int cmCPackGenericGenerator::InstallProject()
= cmSystemTools::LowerCase(installComponent);
if ( installComponentLowerCase != "all" )
{
- mf->AddDefinition("CMAKE_INSTALL_COMPONENT", installComponent.c_str());
+ mf->AddDefinition("CMAKE_INSTALL_COMPONENT",
+ installComponent.c_str());
}
res = mf->ReadListFile(0, installFile.c_str());
@@ -469,8 +479,10 @@ int cmCPackGenericGenerator::InstallProject()
stripCommand += fileName + "\"";
int retVal = 1;
std::string output;
- bool resB = cmSystemTools::RunSingleCommand(stripCommand.c_str(), &output,
- &retVal, 0, this->GeneratorVerbose, 0);
+ bool resB =
+ cmSystemTools::RunSingleCommand(stripCommand.c_str(), &output,
+ &retVal, 0,
+ this->GeneratorVerbose, 0);
if ( !resB || retVal )
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 5f2541f..bac5d74 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -96,11 +96,13 @@ int cmCPackNSISGenerator::CompressFiles(const char* outFileName,
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: "
<< dstr.str().c_str() << std::endl);
- this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str());
+ this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES",
+ dstr.str().c_str());
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << nsisInFileName
<< " to " << nsisFileName << std::endl);
- this->ConfigureFile(nsisInInstallOptions.c_str(), nsisInstallOptions.c_str());
+ this->ConfigureFile(nsisInInstallOptions.c_str(),
+ nsisInstallOptions.c_str());
this->ConfigureFile(nsisInFileName.c_str(), nsisFileName.c_str());
std::string nsisCmd = "\"";
nsisCmd += this->GetOption("CPACK_INSTALLER_PROGRAM");
@@ -227,7 +229,8 @@ int cmCPackNSISGenerator::InitializeInternal()
<< ".lnk\"" << std::endl;
}
this->SetOptionIfNotSet("CPACK_NSIS_CREATE_ICONS", str.str().c_str());
- this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", deleteStr.str().c_str());
+ this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS",
+ deleteStr.str().c_str());
}
return this->Superclass::InitializeInternal();
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index dff1413..2413000 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -221,7 +221,8 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
<< std::endl);
return 0;
}
- this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", pkgPath.c_str());
+ this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
+ pkgPath.c_str());
return this->Superclass::InitializeInternal();
}
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 5044d3a..1766970 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -92,7 +92,8 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
{
licenseText += line + "\n";
}
- this->SetOptionIfNotSet("CPACK_RESOURCE_FILE_LICENSE_CONTENT", licenseText.c_str());
+ this->SetOptionIfNotSet("CPACK_RESOURCE_FILE_LICENSE_CONTENT",
+ licenseText.c_str());
const char headerLengthTag[] = "###CPACK_HEADER_LENGTH###";
@@ -120,7 +121,8 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
++ptr;
}
counter ++;
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "Number of lines: " << counter << std::endl);
+ cmCPackLogger(cmCPackLog::LOG_DEBUG,
+ "Number of lines: " << counter << std::endl);
char buffer[1024];
sprintf(buffer, "%d", counter);
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx
index 59527cd..b911005 100644
--- a/Source/CPack/cmCPackTarCompressGenerator.cxx
+++ b/Source/CPack/cmCPackTarCompressGenerator.cxx
@@ -74,7 +74,8 @@ int cmCPackTarCompressGenerator::CompressFiles(const char* outFileName,
packageDirFileName += ".tar";
std::string output;
int retVal = -1;
- if ( !this->Superclass::CompressFiles(packageDirFileName.c_str(), toplevel, files) )
+ if ( !this->Superclass::CompressFiles(packageDirFileName.c_str(),
+ toplevel, files) )
{
return 0;
}
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index f421c83..49f6a70 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -245,7 +245,8 @@ int main (int argc, char *argv[])
{
if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) )
{
- cpackConfigFile = cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
+ cpackConfigFile =
+ cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
if ( !mf->ReadListFile(0, cpackConfigFile.c_str()) )
{
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c3c54e7..ca1c126 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1363,6 +1363,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
singleLine.erase(singleLine.begin(), singleLine.end());
depends.erase(depends.begin(), depends.end());
singleLine.push_back(this->GetCMakeInstance()->GetCTestCommand());
+ if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.')
+ {
+ singleLine.push_back("-C");
+ singleLine.push_back(mf->GetDefinition("CMAKE_CFG_INTDIR"));
+ }
singleLine.push_back("--force-new-ctest-process");
cpackCommandLines.push_back(singleLine);
(*targets)[this->GetTestTargetName()]
@@ -1410,7 +1415,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
const char* rebuildCacheTargetName = this->GetRebuildCacheTargetName();
if ( rebuildCacheTargetName )
{
- cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end());
+ cpackCommandLines.erase(cpackCommandLines.begin(),
+ cpackCommandLines.end());
singleLine.erase(singleLine.begin(), singleLine.end());
depends.erase(depends.begin(), depends.end());
singleLine.push_back(cmakeCommand);
diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h
index 80986b1..9baecf2 100644
--- a/Source/cmGlobalMSYSMakefileGenerator.h
+++ b/Source/cmGlobalMSYSMakefileGenerator.h
@@ -28,7 +28,9 @@ class cmGlobalMSYSMakefileGenerator : public cmGlobalUnixMakefileGenerator3
{
public:
cmGlobalMSYSMakefileGenerator();
- static cmGlobalGenerator* New() { return new cmGlobalMSYSMakefileGenerator; }
+ static cmGlobalGenerator* New() {
+ return new cmGlobalMSYSMakefileGenerator; }
+
///! Get the name for the generator.
virtual const char* GetName() const {
return cmGlobalMSYSMakefileGenerator::GetActualName();}
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index 9dc2a25..b493eb3 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -49,6 +49,13 @@ bool cmIncludeDirectoryCommand
}
std::string unixPath = *i;
cmSystemTools::ConvertToUnixSlashes(unixPath);
+ if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))
+ {
+ std::string tmp = this->Makefile->GetStartDirectory();
+ tmp += "/";
+ tmp += unixPath;
+ unixPath = tmp;
+ }
this->Makefile->AddIncludeDirectory(unixPath.c_str(), before);
}
return true;
diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx
index 90f54b61..5eeb5bb 100644
--- a/Source/cmLinkDirectoriesCommand.cxx
+++ b/Source/cmLinkDirectoriesCommand.cxx
@@ -17,7 +17,8 @@
#include "cmLinkDirectoriesCommand.h"
// cmLinkDirectoriesCommand
-bool cmLinkDirectoriesCommand::InitialPass(std::vector<std::string> const& args)
+bool cmLinkDirectoriesCommand
+::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx
index 37d7b08..94f0051 100644
--- a/Source/cmLinkLibrariesCommand.cxx
+++ b/Source/cmLinkLibrariesCommand.cxx
@@ -33,7 +33,8 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
++i;
if(i == args.end())
{
- this->SetError("The \"debug\" argument must be followed by a library");
+ this->SetError("The \"debug\" argument must be followed by "
+ "a library");
return false;
}
this->Makefile->AddLinkLibrary(i->c_str(),
@@ -44,7 +45,8 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args)
++i;
if(i == args.end())
{
- this->SetError("The \"optimized\" argument must be followed by a library");
+ this->SetError("The \"optimized\" argument must be followed by "
+ "a library");
return false;
}
this->Makefile->AddLinkLibrary(i->c_str(),
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 6516f20..1a1a9d8 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -153,7 +153,9 @@ bool cmListCommand::HandleGetCommand(std::vector<std::string> const& args)
if ( item < 0 || nitem <= (size_t)item )
{
cmOStringStream str;
- str << "index: " << item << " out of range (-" << varArgsExpanded.size() << ", " << varArgsExpanded.size()-1 << ")";
+ str << "index: " << item << " out of range (-"
+ << varArgsExpanded.size() << ", "
+ << varArgsExpanded.size()-1 << ")";
this->SetError(str.str().c_str());
return false;
}
@@ -221,7 +223,9 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args)
if ( item < 0 || nitem <= (size_t)item )
{
cmOStringStream str;
- str << "index: " << item << " out of range (-" << varArgsExpanded.size() << ", " << varArgsExpanded.size()-1 << ")";
+ str << "index: " << item << " out of range (-"
+ << varArgsExpanded.size() << ", "
+ << varArgsExpanded.size()-1 << ")";
this->SetError(str.str().c_str());
return false;
}
@@ -293,11 +297,13 @@ bool cmListCommand::HandleRemoveCommand(std::vector<std::string> const& args)
}
//----------------------------------------------------------------------------
-bool cmListCommand::HandleRemoveItemCommand(std::vector<std::string> const& args)
+bool cmListCommand
+::HandleRemoveItemCommand(std::vector<std::string> const& args)
{
if(args.size() < 3)
{
- this->SetError("sub-command REMOVE_ITEM requires at least two arguments.");
+ this->SetError("sub-command REMOVE_ITEM requires at least "
+ "two arguments.");
return false;
}
@@ -322,7 +328,9 @@ bool cmListCommand::HandleRemoveItemCommand(std::vector<std::string> const& args
if ( item < 0 || nitem <= (size_t)item )
{
cmOStringStream str;
- str << "index: " << item << " out of range (-" << varArgsExpanded.size() << ", " << varArgsExpanded.size()-1 << ")";
+ str << "index: " << item << " out of range (-"
+ << varArgsExpanded.size() << ", "
+ << varArgsExpanded.size()-1 << ")";
this->SetError(str.str().c_str());
return false;
}
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index d520d4a..9457a0c 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -44,7 +44,8 @@ bool cmListFile::ParseFile(const char* filename, bool requireProjectCommand)
if(!cmListFileLexer_SetFileName(lexer, filename))
{
cmListFileLexer_Delete(lexer);
- cmSystemTools::Error("cmListFileCache: error can not open file ", filename);
+ cmSystemTools::Error("cmListFileCache: error can not open file ",
+ filename);
return false;
}
@@ -190,7 +191,8 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
// Error.
cmOStringStream error;
error << "Error in cmake code at\n"
- << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) << ":\n"
+ << filename << ":" << cmListFileLexer_GetCurrentLine(lexer)
+ << ":\n"
<< "Parse error. Function missing ending \")\". "
<< "Instead found "
<< cmListFileLexer_GetTypeAsString(lexer, token->type)
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index 1cd8abc..062a7a6 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -205,7 +205,8 @@ bool cmLoadCacheCommand::ParseEntry(const char* entry, std::string& var,
// input line is: key:type=value
cmsys::RegularExpression reg("^([^:]*):([^=]*)=(.*[^\t ]|[\t ]*)[\t ]*$");
// input line is: "key":type=value
- cmsys::RegularExpression regQuoted("^\"([^\"]*)\":([^=]*)=(.*[^\t ]|[\t ]*)[\t ]*$");
+ cmsys::RegularExpression
+ regQuoted("^\"([^\"]*)\":([^=]*)=(.*[^\t ]|[\t ]*)[\t ]*$");
bool flag = false;
if(regQuoted.find(entry))
{
diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h
index 1ffb225..76aca9e 100644
--- a/Source/cmLoadCommandCommand.h
+++ b/Source/cmLoadCommandCommand.h
@@ -63,9 +63,9 @@ public:
" LOAD_COMMAND(COMMAND_NAME <loc1> [loc2 ...])\n"
"The given locations are searched for a library whose name is "
"cmCOMMAND_NAME. If found, it is loaded as a module and the command "
- "is added to the set of available CMake commands. Usually, TRY_COMPILE "
- "is used before this command to compile the module. If the command "
- "is successfully loaded a variable named\n"
+ "is added to the set of available CMake commands. Usually, "
+ "TRY_COMPILE is used before this command to compile the module. "
+ "If the command is successfully loaded a variable named\n"
" CMAKE_LOADED_COMMAND_<COMMAND_NAME>\n"
"will be set to the full path of the module that was loaded. "
"Otherwise the variable will not be set.";
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 8a65684..8021765 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -94,12 +94,16 @@ void cmLocalGenerator::SetupPathConversions()
outdir =
cmSystemTools::CollapseFullPath(this->Makefile->GetStartDirectory());
cmSystemTools::SplitPath(outdir.c_str(), this->StartDirectoryComponents);
- outdir =
- cmSystemTools::CollapseFullPath(this->Makefile->GetHomeOutputDirectory());
- cmSystemTools::SplitPath(outdir.c_str(), this->HomeOutputDirectoryComponents);
- outdir =
- cmSystemTools::CollapseFullPath(this->Makefile->GetStartOutputDirectory());
-cmSystemTools::SplitPath(outdir.c_str(), this->StartOutputDirectoryComponents);
+
+ outdir = cmSystemTools::CollapseFullPath
+ (this->Makefile->GetHomeOutputDirectory());
+ cmSystemTools::SplitPath(outdir.c_str(),
+ this->HomeOutputDirectoryComponents);
+
+ outdir = cmSystemTools::CollapseFullPath
+ (this->Makefile->GetStartOutputDirectory());
+ cmSystemTools::SplitPath(outdir.c_str(),
+ this->StartOutputDirectoryComponents);
}
@@ -139,17 +143,23 @@ void cmLocalGenerator::GenerateTestFiles()
fout.SetCopyIfDifferent(true);
fout << "# CMake generated Testfile for " << std::endl
- << "# Source directory: " << this->Makefile->GetStartDirectory() << std::endl
- << "# Build directory: " << this->Makefile->GetStartOutputDirectory() << std::endl
+ << "# Source directory: "
+ << this->Makefile->GetStartDirectory() << std::endl
+ << "# Build directory: "
+ << this->Makefile->GetStartOutputDirectory() << std::endl
<< "# " << std::endl
- << "# This file replicates the SUBDIRS() and ADD_TEST() commands from the source" << std::endl
- << "# tree CMakeLists.txt file, skipping any SUBDIRS() or ADD_TEST() commands" << std::endl
- << "# that are excluded by CMake control structures, i.e. IF() commands." << std::endl
+ << "# This file replicates the SUBDIRS() and ADD_TEST() commands "
+ << "from the source" << std::endl
+ << "# tree CMakeLists.txt file, skipping any SUBDIRS() or "
+ << "ADD_TEST() commands" << std::endl
+ << "# that are excluded by CMake control structures, i.e. IF() "
+ << "commands." << std::endl
<< "#" << std::endl
<< "# The next line is critical for Dart to work" << std::endl
<< "# Duh :-)" << std::endl << std::endl;
- const char* testIncludeFile = this->Makefile->GetProperty("TEST_INCLUDE_FILE");
+ const char* testIncludeFile =
+ this->Makefile->GetProperty("TEST_INCLUDE_FILE");
if ( testIncludeFile )
{
fout << "INCLUDE(\"" << testIncludeFile << "\")" << std::endl;
@@ -170,7 +180,8 @@ void cmLocalGenerator::GenerateTestFiles()
// Just double-quote all arguments so they are re-parsed
// correctly by the test system.
fout << " \"";
- for(std::string::const_iterator c = argit->begin(); c != argit->end(); ++c)
+ for(std::string::const_iterator c = argit->begin();
+ c != argit->end(); ++c)
{
// Escape quotes within arguments. We should escape
// backslashes too but we cannot because it makes the result
@@ -233,7 +244,8 @@ void cmLocalGenerator::GenerateTestFiles()
outDir += "/";
for(i = 0; i < this->Children.size(); ++i)
{
- std::string binP = this->Children[i]->GetMakefile()->GetStartOutputDirectory();
+ std::string binP =
+ this->Children[i]->GetMakefile()->GetStartOutputDirectory();
cmSystemTools::ReplaceString(binP, outDir.c_str(), "");
if ( i > 0 )
{
@@ -279,7 +291,8 @@ void cmLocalGenerator::GenerateInstallRules()
// Compute the set of configurations.
std::vector<std::string> configurationTypes;
- if(const char* types = this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
+ if(const char* types =
+ this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
{
cmSystemTools::ExpandListArgument(types, configurationTypes);
}
@@ -336,7 +349,8 @@ void cmLocalGenerator::GenerateInstallRules()
<< "IF(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl
<< " SET(CMAKE_INSTALL_PREFIX \"" << prefix << "\")" << std::endl
<< "ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl
- << "STRING(REGEX REPLACE \"/$\" \"\" CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")" << std::endl
+ << "STRING(REGEX REPLACE \"/$\" \"\" CMAKE_INSTALL_PREFIX "
+ << "\"${CMAKE_INSTALL_PREFIX}\")" << std::endl
<< std::endl;
// Write support code for generating per-configuration install rules.
@@ -349,7 +363,8 @@ void cmLocalGenerator::GenerateInstallRules()
" ELSE(BUILD_TYPE)\n"
" SET(CMAKE_INSTALL_CONFIG_NAME \"" << default_config << "\")\n"
" ENDIF(BUILD_TYPE)\n"
- " MESSAGE(STATUS \"Install configuration: \\\"${CMAKE_INSTALL_CONFIG_NAME}\\\"\")\n"
+ " MESSAGE(STATUS \"Install configuration: "
+ "\\\"${CMAKE_INSTALL_CONFIG_NAME}\\\"\")\n"
"ENDIF(NOT CMAKE_INSTALL_CONFIG_NAME)\n"
"\n";
@@ -369,7 +384,8 @@ void cmLocalGenerator::GenerateInstallRules()
// Ask each install generator to write its code.
std::vector<cmInstallGenerator*> const& installers =
this->Makefile->GetInstallGenerators();
- for(std::vector<cmInstallGenerator*>::const_iterator gi = installers.begin();
+ for(std::vector<cmInstallGenerator*>::const_iterator
+ gi = installers.begin();
gi != installers.end(); ++gi)
{
(*gi)->Generate(fout, config, configurationTypes);
@@ -574,7 +590,8 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target)
ofname += "/";
ofname += (*i)->GetSourceName() + outExt;
objVector.push_back(ofname);
- this->AddCustomCommandToCreateObject(ofname.c_str(), llang, *(*i), target);
+ this->AddCustomCommandToCreateObject(ofname.c_str(),
+ llang, *(*i), target);
objs += this->Convert(ofname.c_str(),START_OUTPUT,MAKEFILE);
objs += " ";
}
@@ -637,11 +654,13 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target)
comment.c_str(),
this->Makefile->GetStartOutputDirectory()
);
- target.GetSourceFiles().push_back(this->Makefile->GetSource(targetFullPath.c_str()));
+ target.GetSourceFiles().push_back
+ (this->Makefile->GetSource(targetFullPath.c_str()));
}
-void cmLocalGenerator::CreateCustomTargetsAndCommands(std::set<cmStdString> const& lang)
+void cmLocalGenerator
+::CreateCustomTargetsAndCommands(std::set<cmStdString> const& lang)
{
cmTargets &tgts = this->Makefile->GetTargets();
for(cmTargets::iterator l = tgts.begin();
@@ -655,10 +674,12 @@ void cmLocalGenerator::CreateCustomTargetsAndCommands(std::set<cmStdString> cons
case cmTarget::MODULE_LIBRARY:
case cmTarget::EXECUTABLE:
{
- const char* llang = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* llang =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!llang)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -680,8 +701,6 @@ void cmLocalGenerator::CreateCustomTargetsAndCommands(std::set<cmStdString> cons
}
}
-
-
// List of variables that are replaced when
// rules are expanced. These variables are
// replaced in the form <var> with GetSafeDefinition(var).
@@ -863,12 +882,14 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
}
if(actualReplace == variable)
{
- std::string replace = this->Makefile->GetSafeDefinition(variable.c_str());
+ std::string replace =
+ this->Makefile->GetSafeDefinition(variable.c_str());
// if the variable is not a FLAG then treat it like a path
if(variable.find("_FLAG") == variable.npos)
{
std::string ret = this->ConvertToOutputForExisting(replace.c_str());
- // if there is a required first argument to the compiler add it to the compiler string
+ // if there is a required first argument to the compiler add it
+ // to the compiler string
if(compilerArg1)
{
ret += " ";
@@ -978,15 +999,16 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
{
quotePaths = true;
}
- bool repeatFlag = true; // should the include flag be repeated like ie. -IA -IB
+ bool repeatFlag = true;
+ // should the include flag be repeated like ie. -IA -IB
if(!sep)
{
sep = " ";
}
else
{
- // if there is a separator then the flag is not repeated but is only given once
- // i.e. -classpath a:b:c
+ // if there is a separator then the flag is not repeated but is only
+ // given once i.e. -classpath a:b:c
repeatFlag = false;
}
bool flagUsed = false;
@@ -1001,7 +1023,9 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
if(emitted.insert(frameworkDir).second)
{
- includeFlags << "-F" << this->ConvertToOutputForExisting(frameworkDir.c_str()) << " ";
+ includeFlags
+ << "-F"
+ << this->ConvertToOutputForExisting(frameworkDir.c_str()) << " ";
}
continue;
}
@@ -1081,14 +1105,16 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
this->Makefile->GetDefinition("VTK_SOURCE_DIR");
if(vtkSourceDir)
{
- const char* vtk_major = this->Makefile->GetDefinition("VTK_MAJOR_VERSION");
- const char* vtk_minor = this->Makefile->GetDefinition("VTK_MINOR_VERSION");
+ const char* vtk_major =
+ this->Makefile->GetDefinition("VTK_MAJOR_VERSION");
+ const char* vtk_minor =
+ this->Makefile->GetDefinition("VTK_MINOR_VERSION");
vtk_major = vtk_major? vtk_major : "4";
vtk_minor = vtk_minor? vtk_minor : "4";
int vmajor = 0;
int vminor = 0;
- if(sscanf(vtk_major, "%d", &vmajor) && sscanf(vtk_minor, "%d", &vminor) &&
- vmajor == 4 && vminor <= 4)
+ if(sscanf(vtk_major, "%d", &vmajor) &&
+ sscanf(vtk_minor, "%d", &vminor) && vmajor == 4 && vminor <= 4)
{
includeSourceDir = true;
}
@@ -1116,8 +1142,8 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
// This can cause problems with certain standard library
// implementations because the wrong headers may be found first.
emitted.insert("/usr/include");
- if(const char* implicitIncludes =
- this->Makefile->GetDefinition("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
+ if(const char* implicitIncludes = this->Makefile->GetDefinition
+ ("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
{
std::vector<std::string> implicitIncludeVec;
cmSystemTools::ExpandListArgument(implicitIncludes, implicitIncludeVec);
@@ -1128,7 +1154,8 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
}
// Get the project-specified include directories.
- std::vector<std::string>& includes = this->Makefile->GetIncludeDirectories();
+ std::vector<std::string>& includes =
+ this->Makefile->GetIncludeDirectories();
// Support putting all the in-project include directories first if
// it is requested by the project.
@@ -1170,15 +1197,18 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
std::string& linkFlags,
cmTarget& target)
{
- std::string buildType = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
+ std::string buildType =
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
buildType = cmSystemTools::UpperCase(buildType);
- const char* libraryLinkVariable = "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
+ const char* libraryLinkVariable =
+ "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
switch(target.GetType())
{
case cmTarget::STATIC_LIBRARY:
{
- const char* targetLinkFlags = target.GetProperty("STATIC_LIBRARY_FLAGS");
+ const char* targetLinkFlags =
+ target.GetProperty("STATIC_LIBRARY_FLAGS");
if(targetLinkFlags)
{
linkFlags += targetLinkFlags;
@@ -1200,7 +1230,8 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
linkFlags += this->Makefile->GetSafeDefinition(build.c_str());
linkFlags += " ";
}
- if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW")))
+ if(this->Makefile->IsOn("WIN32") &&
+ !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW")))
{
const std::vector<cmSourceFile*>& sources = target.GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
@@ -1208,8 +1239,10 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
{
if((*i)->GetSourceExtension() == "def")
{
- linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
- linkFlags += this->Convert((*i)->GetFullPath().c_str(),START_OUTPUT,MAKEFILE);
+ linkFlags +=
+ this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
+ linkFlags += this->Convert((*i)->GetFullPath().c_str(),
+ START_OUTPUT,MAKEFILE);
linkFlags += " ";
}
}
@@ -1235,7 +1268,8 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
break;
case cmTarget::EXECUTABLE:
{
- linkFlags += this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
+ linkFlags +=
+ this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
linkFlags += " ";
if(buildType.size())
{
@@ -1244,10 +1278,12 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
linkFlags += this->Makefile->GetSafeDefinition(build.c_str());
linkFlags += " ";
}
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -1264,21 +1300,24 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
cmOStringStream linklibs;
this->OutputLinkLibraries(linklibs, target, false);
linkLibs = linklibs.str();
- if(cmSystemTools::IsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS")))
+ if(cmSystemTools::IsOn
+ (this->Makefile->GetDefinition("BUILD_SHARED_LIBS")))
{
- std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + linkLanguage
- + std::string("_FLAGS");
+ std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_")
+ + linkLanguage + std::string("_FLAGS");
linkFlags += this->Makefile->GetSafeDefinition(sFlagVar.c_str());
linkFlags += " ";
}
if ( target.GetPropertyAsBool("WIN32_EXECUTABLE") )
{
- linkFlags += this->Makefile->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE");
+ linkFlags +=
+ this->Makefile->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE");
linkFlags += " ";
}
else
{
- linkFlags += this->Makefile->GetSafeDefinition("CMAKE_CREATE_CONSOLE_EXE");
+ linkFlags +=
+ this->Makefile->GetSafeDefinition("CMAKE_CREATE_CONSOLE_EXE");
linkFlags += " ";
}
const char* targetLinkFlags = target.GetProperty("LINK_FLAGS");
@@ -1323,7 +1362,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
std::string runtimeSep;
const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
- const char* linkLanguage = tgt.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ tgt.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
cmSystemTools::
@@ -1348,8 +1388,10 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
// Some search paths should never be emitted
emitted.insert("");
emitted.insert("/usr/lib");
- std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
- std::string libLinkFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG");
+ std::string libPathFlag =
+ this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
+ std::string libLinkFlag =
+ this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG");
// collect all the flags needed for linking libraries
std::string linkLibs;
@@ -1466,8 +1508,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
}
//----------------------------------------------------------------------------
-void
-cmLocalGenerator::ComputeLinkInformation(cmTarget& target,
+void cmLocalGenerator
+::ComputeLinkInformation(cmTarget& target,
const char* config,
std::vector<cmStdString>& outLibs,
std::vector<cmStdString>& outDirs,
@@ -1779,7 +1821,8 @@ cmLocalGenerator::ConstructScript(const cmCustomCommandLines& commandLines,
// if CMAKE_MSVCIDE_RUN_PATH is set.
if(this->Makefile->GetDefinition("MSVC_IDE"))
{
- const char* extraPath = this->Makefile->GetDefinition("CMAKE_MSVCIDE_RUN_PATH");
+ const char* extraPath =
+ this->Makefile->GetDefinition("CMAKE_MSVCIDE_RUN_PATH");
if(extraPath)
{
script += "set PATH=";
@@ -1863,22 +1906,26 @@ std::string cmLocalGenerator::Convert(const char* source,
case HOME:
//result = cmSystemTools::CollapseFullPath(result.c_str());
result = this->GlobalGenerator->
- ConvertToRelativePath(this->HomeDirectoryComponents, result.c_str());
+ ConvertToRelativePath(this->HomeDirectoryComponents,
+ result.c_str());
break;
case START:
//result = cmSystemTools::CollapseFullPath(result.c_str());
result = this->GlobalGenerator->
- ConvertToRelativePath(this->StartDirectoryComponents, result.c_str());
+ ConvertToRelativePath(this->StartDirectoryComponents,
+ result.c_str());
break;
case HOME_OUTPUT:
//result = cmSystemTools::CollapseFullPath(result.c_str());
result = this->GlobalGenerator->
- ConvertToRelativePath(this->HomeOutputDirectoryComponents, result.c_str());
+ ConvertToRelativePath(this->HomeOutputDirectoryComponents,
+ result.c_str());
break;
case START_OUTPUT:
//result = cmSystemTools::CollapseFullPath(result.c_str());
result = this->GlobalGenerator->
- ConvertToRelativePath(this->StartOutputDirectoryComponents, result.c_str());
+ ConvertToRelativePath(this->StartOutputDirectoryComponents,
+ result.c_str());
break;
case FULL:
result = cmSystemTools::CollapseFullPath(result.c_str());
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 5b4ad7e..fc89ebd 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -48,7 +48,8 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
if(strcmp(this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeDirectory()) != 0)
{
- if(!cmSystemTools::MakeDirectory(this->Makefile->GetStartOutputDirectory()))
+ if(!cmSystemTools::MakeDirectory
+ (this->Makefile->GetStartOutputDirectory()))
{
cmSystemTools::Error("Error creating directory ",
this->Makefile->GetStartOutputDirectory());
@@ -178,7 +179,8 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
}
}
-void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname, cmTarget &target)
+void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname,
+ cmTarget &target)
{
// add to the list of projects
std::string pname = lname;
@@ -209,7 +211,8 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
{
std::string dspname = tgt.GetName();
dspname += ".dsp.cmake";
- const char* dsprule = this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
+ const char* dsprule =
+ this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
cmCustomCommandLine commandLine;
commandLine.push_back(dsprule);
std::string makefileIn = this->Makefile->GetStartDirectory();
@@ -219,8 +222,8 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
comment += makefileIn;
std::string args;
args = "-H";
- args +=
- this->Convert(this->Makefile->GetHomeDirectory(),START_OUTPUT, SHELL, true);
+ args += this->Convert(this->Makefile->GetHomeDirectory(),
+ START_OUTPUT, SHELL, true);
commandLine.push_back(args);
args = "-B";
args +=
@@ -329,8 +332,8 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
{
// Add the file to the list of sources.
std::string source = (*i)->GetFullPath();
- cmSourceGroup& sourceGroup = this->Makefile->FindSourceGroup(source.c_str(),
- sourceGroups);
+ cmSourceGroup& sourceGroup =
+ this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
sourceGroup.AssignSource(*i);
// while we are at it, if it is a .rule file then for visual studio 6 we
// must generate it
@@ -341,7 +344,8 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
cmSystemTools::ReplaceString(source, "$(IntDir)/", "");
#if defined(_WIN32) || defined(__CYGWIN__)
std::ofstream fout(source.c_str(),
- std::ios::binary | std::ios::out | std::ios::trunc);
+ std::ios::binary | std::ios::out
+ | std::ios::trunc);
#else
std::ofstream fout(source.c_str(),
std::ios::out | std::ios::trunc);
@@ -371,7 +375,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
this->WriteDSPFooter(fout);
}
-void cmLocalVisualStudio6Generator::WriteGroup(const cmSourceGroup *sg, cmTarget target, std::ostream &fout, const char *libName)
+void cmLocalVisualStudio6Generator
+::WriteGroup(const cmSourceGroup *sg, cmTarget target,
+ std::ostream &fout, const char *libName)
{
const std::vector<const cmSourceFile *> &sourceFiles =
sg->GetSourceFiles();
@@ -405,8 +411,8 @@ void cmLocalVisualStudio6Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
compileFlags += cflags;
}
- const char* lang =
- this->GlobalGenerator->GetLanguageFromExtension((*sf)->GetSourceExtension().c_str());
+ const char* lang = this->GlobalGenerator->
+ GetLanguageFromExtension((*sf)->GetSourceExtension().c_str());
if(lang && strcmp(lang, "CXX") == 0)
{
// force a C++ file type
@@ -461,7 +467,8 @@ void cmLocalVisualStudio6Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
else if(compileFlags.size())
{
for(std::vector<std::string>::iterator i
- = this->Configurations.begin(); i != this->Configurations.end(); ++i)
+ = this->Configurations.begin();
+ i != this->Configurations.end(); ++i)
{
if (i == this->Configurations.begin())
{
@@ -580,7 +587,8 @@ cmLocalVisualStudio6Generator
fout << "\n\n";
if(outputs.empty())
{
- fout << source << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t";
+ fout << source
+ << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t";
fout << command << "\n\n";
}
else
@@ -623,7 +631,8 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
cmTarget& target)
{
std::string root= this->Makefile->GetRequiredDefinition("CMAKE_ROOT");
- const char *def= this->Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY");
+ const char *def=
+ this->Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY");
if( def)
{
@@ -683,7 +692,8 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
}
// reset this->Configurations
- this->Configurations.erase(this->Configurations.begin(), this->Configurations.end());
+ this->Configurations.erase(this->Configurations.begin(),
+ this->Configurations.end());
// now add all the configurations possible
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
@@ -761,7 +771,8 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
// Write the post-build rules. Make sure no continuation character
// is put on the last line.
- int postbuild_total = static_cast<int>(target.GetPostBuildCommands().size());
+ int postbuild_total =
+ static_cast<int>(target.GetPostBuildCommands().size());
int postbuild_count = 0;
const char* postbuild_newline = "\\\n\t";
if(postbuild_total > 0)
@@ -859,7 +870,8 @@ void cmLocalVisualStudio6Generator
lpath = ".";
}
std::string lpathIntDir = libPath + "$(INTDIR)";
- lpathIntDir = this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str());
+ lpathIntDir =
+ this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str());
if(pathEmitted.insert(lpath).second)
{
libOptions += " /LIBPATH:";
@@ -891,7 +903,8 @@ void cmLocalVisualStudio6Generator
lpath = ".";
}
std::string lpathIntDir = exePath + "$(INTDIR)";
- lpathIntDir = this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str());
+ lpathIntDir =
+ this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str());
if(pathEmitted.insert(lpath).second)
{
@@ -931,7 +944,8 @@ void cmLocalVisualStudio6Generator
lpath = ".";
}
std::string lpathIntDir = path + "$(INTDIR)";
- lpathIntDir = this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str());
+ lpathIntDir =
+ this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str());
if(pathEmitted.insert(lpath).second)
{
libOptions += " /LIBPATH:";
@@ -975,8 +989,10 @@ void cmLocalVisualStudio6Generator
cmTarget* tgt = this->GlobalGenerator->FindTarget(0, j->first.c_str());
if(tgt)
{
- lib = cmSystemTools::GetFilenameWithoutExtension(tgt->GetFullName().c_str());
- libDebug = cmSystemTools::GetFilenameWithoutExtension(tgt->GetFullName("Debug").c_str());
+ lib = cmSystemTools::GetFilenameWithoutExtension
+ (tgt->GetFullName().c_str());
+ libDebug = cmSystemTools::GetFilenameWithoutExtension
+ (tgt->GetFullName("Debug").c_str());
lib += ".lib";
libDebug += ".lib";
}
@@ -991,7 +1007,8 @@ void cmLocalVisualStudio6Generator
}
}
lib = this->ConvertToOptionallyRelativeOutputPath(lib.c_str());
- libDebug = this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str());
+ libDebug =
+ this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str());
if (j->second == cmTarget::GENERAL)
{
@@ -1030,15 +1047,18 @@ void cmLocalVisualStudio6Generator
std::string extraLinkOptions;
if(target.GetType() == cmTarget::EXECUTABLE)
{
- extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
+ extraLinkOptions =
+ this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
}
if(target.GetType() == cmTarget::SHARED_LIBRARY)
{
- extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS");
+ extraLinkOptions =
+ this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS");
}
if(target.GetType() == cmTarget::MODULE_LIBRARY)
{
- extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS");
+ extraLinkOptions =
+ this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS");
}
// Get extra linker options for this target.
@@ -1053,10 +1073,12 @@ void cmLocalVisualStudio6Generator
target.GetType() <= cmTarget::MODULE_LIBRARY)
{
// Get the language to use for linking.
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -1077,7 +1099,8 @@ void cmLocalVisualStudio6Generator
}
// Compute the real name of the target.
- std::string outputName = "(OUTPUT_NAME is for libraries and executables only)";
+ std::string outputName =
+ "(OUTPUT_NAME is for libraries and executables only)";
std::string outputNameDebug = outputName;
std::string outputNameRelease = outputName;
std::string outputNameMinSizeRel = outputName;
@@ -1201,17 +1224,25 @@ void cmLocalVisualStudio6Generator
#endif
// Substitute the real output name into the template.
- cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG", outputNameDebug.c_str());
- cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE", outputNameRelease.c_str());
- cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL", outputNameMinSizeRel.c_str());
- cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO", outputNameRelWithDebInfo.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG",
+ outputNameDebug.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE",
+ outputNameRelease.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL",
+ outputNameMinSizeRel.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO",
+ outputNameRelWithDebInfo.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_NAME", outputName.c_str());
// Substitute the proper link information into the template.
- cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_DEBUG", optionsDebug.c_str());
- cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE", optionsRelease.c_str());
- cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL", optionsMinSizeRel.c_str());
- cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO", optionsRelWithDebInfo.c_str());
+ cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_DEBUG",
+ optionsDebug.c_str());
+ cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE",
+ optionsRelease.c_str());
+ cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL",
+ optionsMinSizeRel.c_str());
+ cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO",
+ optionsRelWithDebInfo.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES",
this->IncludeOptions.c_str());
@@ -1220,13 +1251,14 @@ void cmLocalVisualStudio6Generator
// are already quoted in the template file,
// we need to remove the quotes here, we still need
// to convert to output path for unix to win32 conversion
- cmSystemTools::ReplaceString(line, "LIBRARY_OUTPUT_PATH",
- removeQuotes(
- this->ConvertToOptionallyRelativeOutputPath(libPath.c_str())).c_str());
- cmSystemTools::ReplaceString(line, "EXECUTABLE_OUTPUT_PATH",
- removeQuotes(
- this->ConvertToOptionallyRelativeOutputPath(exePath.c_str())).c_str());
-
+ cmSystemTools::ReplaceString
+ (line, "LIBRARY_OUTPUT_PATH",
+ removeQuotes(this->ConvertToOptionallyRelativeOutputPath
+ (libPath.c_str())).c_str());
+ cmSystemTools::ReplaceString
+ (line, "EXECUTABLE_OUTPUT_PATH",
+ removeQuotes(this->ConvertToOptionallyRelativeOutputPath
+ (exePath.c_str())).c_str());
cmSystemTools::ReplaceString(line,
"EXTRA_DEFINES",
@@ -1244,10 +1276,12 @@ void cmLocalVisualStudio6Generator
if(target.GetType() >= cmTarget::EXECUTABLE &&
target.GetType() <= cmTarget::MODULE_LIBRARY)
{
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -1260,7 +1294,8 @@ void cmLocalVisualStudio6Generator
std::string flagVar = baseFlagVar + "_RELEASE";
flagsRelease = this->Makefile->GetSafeDefinition(flagVar.c_str());
flagsRelease += " -DCMAKE_INTDIR=\\\"Release\\\" ";
- if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELEASE"))
+ if(const char* targetLinkFlags =
+ target.GetProperty("LINK_FLAGS_RELEASE"))
{
flagsRelease += targetLinkFlags;
flagsRelease += " ";
@@ -1268,7 +1303,8 @@ void cmLocalVisualStudio6Generator
flagVar = baseFlagVar + "_MINSIZEREL";
flagsMinSize = this->Makefile->GetSafeDefinition(flagVar.c_str());
flagsMinSize += " -DCMAKE_INTDIR=\\\"MinSizeRel\\\" ";
- if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_MINSIZEREL"))
+ if(const char* targetLinkFlags =
+ target.GetProperty("LINK_FLAGS_MINSIZEREL"))
{
flagsMinSize += targetLinkFlags;
flagsMinSize += " ";
@@ -1286,7 +1322,8 @@ void cmLocalVisualStudio6Generator
flagVar = baseFlagVar + "_RELWITHDEBINFO";
flagsDebugRel = this->Makefile->GetSafeDefinition(flagVar.c_str());
flagsDebugRel += " -DCMAKE_INTDIR=\\\"RelWithDebInfo\\\" ";
- if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
+ if(const char* targetLinkFlags =
+ target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
{
flagsDebugRel += targetLinkFlags;
flagsDebugRel += " ";
@@ -1313,10 +1350,14 @@ void cmLocalVisualStudio6Generator
// There are not separate CXX and C template files, so we use the same
// variable names. The previous code sets up flags* variables to contain
// the correct C or CXX flags
- cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL", flagsMinSize.c_str());
- cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG", flagsDebug.c_str());
- cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELWITHDEBINFO", flagsDebugRel.c_str());
- cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE", flagsRelease.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL",
+ flagsMinSize.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG",
+ flagsDebug.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELWITHDEBINFO",
+ flagsDebugRel.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE",
+ flagsRelease.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS", flags.c_str());
fout << line.c_str() << std::endl;
}
@@ -1337,8 +1378,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFooter(std::ostream& fout)
}
}
-//-----------------------------------------------------------------------------
-void cmLocalVisualStudio6Generator::ComputeLinkOptions(cmTarget& target,
+//----------------------------------------------------------------------------
+void cmLocalVisualStudio6Generator
+::ComputeLinkOptions(cmTarget& target,
const char* configName,
const std::string extraOptions,
std::string& options)
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index b95c72b..290adad 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -54,7 +54,8 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
if(strcmp(this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeDirectory()) != 0)
{
- if(!cmSystemTools::MakeDirectory(this->Makefile->GetStartOutputDirectory()))
+ if(!cmSystemTools::MakeDirectory
+ (this->Makefile->GetStartOutputDirectory()))
{
cmSystemTools::Error("Error creating directory ",
this->Makefile->GetStartOutputDirectory());
@@ -78,7 +79,8 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
this->ExecutableOutputPath = "";
if (this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))
{
- this->ExecutableOutputPath = this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH");
+ this->ExecutableOutputPath =
+ this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH");
}
if(this->ExecutableOutputPath.size())
{
@@ -134,7 +136,8 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
}
}
-void cmLocalVisualStudio7Generator::CreateSingleVCProj(const char *lname, cmTarget &target)
+void cmLocalVisualStudio7Generator
+::CreateSingleVCProj(const char *lname, cmTarget &target)
{
// add to the list of projects
std::string pname = lname;
@@ -164,7 +167,8 @@ void cmLocalVisualStudio7Generator::AddVCProjBuildRule(cmTarget& tgt)
{
std::string dspname = tgt.GetName();
dspname += ".vcproj.cmake";
- const char* dsprule = this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
+ const char* dsprule =
+ this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
cmCustomCommandLine commandLine;
commandLine.push_back(dsprule);
std::string makefileIn = this->Makefile->GetStartDirectory();
@@ -174,8 +178,8 @@ void cmLocalVisualStudio7Generator::AddVCProjBuildRule(cmTarget& tgt)
comment += makefileIn;
std::string args;
args = "-H";
- args +=
- this->Convert(this->Makefile->GetHomeDirectory(), START_OUTPUT, SHELL, true);
+ args += this->Convert(this->Makefile->GetHomeDirectory(),
+ START_OUTPUT, SHELL, true);
commandLine.push_back(args);
args = "-B";
args +=
@@ -224,7 +228,9 @@ void cmLocalVisualStudio7Generator::WriteConfigurations(std::ostream& fout,
cmTarget &target)
{
std::vector<std::string> *configs =
- static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator)->GetConfigurations();
+ static_cast<cmGlobalVisualStudio7Generator *>
+ (this->GlobalGenerator)->GetConfigurations();
+
fout << "\t<Configurations>\n";
for( std::vector<std::string>::iterator i = configs->begin();
i != configs->end(); ++i)
@@ -243,14 +249,14 @@ struct cmVS7FlagTable
const char* value; // string value
};
-// fill the table here
-// currently the comment field is not used for anything other than documentation
-// NOTE: Make sure the longer commandFlag comes FIRST!
+// fill the table here currently the comment field is not used for
+// anything other than documentation NOTE: Make sure the longer
+// commandFlag comes FIRST!
cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
{
// option flags (some flags map to the same option)
{"BasicRuntimeChecks", "GZ", "Stack frame checks", "1"},
- {"BasicRuntimeChecks", "RTCsu", "Both stack and uninitialized checks ", "3"},
+ {"BasicRuntimeChecks", "RTCsu", "Both stack and uninitialized checks", "3"},
{"BasicRuntimeChecks", "RTCs", "Stack frame checks", "1"},
{"BasicRuntimeChecks", "RTCu", "Uninitialized Variables ", "2"},
{"BasicRuntimeChecks", "RTC1", "Both stack and uninitialized checks ", "3"},
@@ -299,11 +305,13 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
{"ExceptionHandling", "EHsc", "enable c++ exceptions", "TRUE"},
{"ExceptionHandling", "GX", "enable c++ exceptions", "TRUE"},
{"GlobalOptimizations", "Og", "Global Optimize", "TRUE"},
- {"ImproveFloatingPointConsistency", "Op", "ImproveFloatingPointConsistency", "TRUE"},
+ {"ImproveFloatingPointConsistency", "Op",
+ "ImproveFloatingPointConsistency", "TRUE"},
{"MinimalRebuild", "Gm", "minimal rebuild", "TRUE"},
{"OmitFramePointers", "Oy", "OmitFramePointers", "TRUE"},
{"OptimizeForWindowsApplication", "GA", "Optimize for windows", "TRUE"},
- {"RuntimeTypeInfo", "GR", "Turn on Run time type information for c++", "TRUE"},
+ {"RuntimeTypeInfo", "GR",
+ "Turn on Run time type information for c++", "TRUE"},
{"SmallerTypeCheck", "RTCc", "smaller type check", "TRUE"},
{"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "TRUE"},
{"WarnAsError", "WX", "Treat warnings as errors", "TRUE"},
@@ -379,10 +387,12 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
std::string flags;
if(strcmp(configType, "10") != 0)
{
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -446,16 +456,16 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
// now fill the flagMap from the command line flags, and
// if a flag is used, it will be removed from the flags string by
// this function call
- this->FillFlagMapFromCommandFlags(flagMap,
- &cmLocalVisualStudio7GeneratorFlagTable[0],
- flags);
+ this->FillFlagMapFromCommandFlags
+ (flagMap, &cmLocalVisualStudio7GeneratorFlagTable[0], flags);
std::string defineFlags = this->Makefile->GetDefineFlags();
+
// now check the define flags for flags other than -D and
// put them in the map, the -D flags will be left in the defineFlags
// variable as -D is not in the flagMap
- this->FillFlagMapFromCommandFlags(flagMap,
- &cmLocalVisualStudio7GeneratorFlagTable[0],
- defineFlags);
+ this->FillFlagMapFromCommandFlags
+ (flagMap, &cmLocalVisualStudio7GeneratorFlagTable[0], defineFlags);
+
// output remaining flags that were not mapped to anything
fout << this->EscapeForXML(flags.c_str()).c_str();
fout << " -DCMAKE_INTDIR=\\&quot;" << configName << "\\&quot;"
@@ -477,7 +487,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
}
if ( this->Makefile->GetDefinition("CMAKE_CXX_WARNING_LEVEL") )
{
- flagMap["WarningLevel"] = this->Makefile->GetDefinition("CMAKE_CXX_WARNING_LEVEL");
+ flagMap["WarningLevel"] =
+ this->Makefile->GetDefinition("CMAKE_CXX_WARNING_LEVEL");
}
// Now copy the flag map into the xml for the file
@@ -508,7 +519,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
fout << "\"\n";
fout << "\t\t\t\tAssemblerListingLocation=\"" << configName << "\"\n";
fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n";
- std::map<cmStdString, cmStdString>::iterator mi = flagMap.find("DebugInformationFormat");
+ std::map<cmStdString, cmStdString>::iterator mi =
+ flagMap.find("DebugInformationFormat");
if(mi != flagMap.end() && mi->second != "1")
{
fout << "\t\t\t\tProgramDatabaseFileName=\""
@@ -602,10 +614,12 @@ cmLocalVisualStudio7Generator
::GetBuildTypeLinkerFlags(std::string rootLinkerFlags, const char* configName)
{
std::string configTypeUpper = cmSystemTools::UpperCase(configName);
- std::string extraLinkOptionsBuildTypeDef = rootLinkerFlags + "_" + configTypeUpper;
+ std::string extraLinkOptionsBuildTypeDef =
+ rootLinkerFlags + "_" + configTypeUpper;
std::string extraLinkOptionsBuildType =
- this->Makefile->GetRequiredDefinition(extraLinkOptionsBuildTypeDef.c_str());
+ this->Makefile->GetRequiredDefinition
+ (extraLinkOptionsBuildTypeDef.c_str());
return extraLinkOptionsBuildType;
}
@@ -620,18 +634,24 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
std::string extraLinkOptions;
if(target.GetType() == cmTarget::EXECUTABLE)
{
- extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS") +
- std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName);
+ extraLinkOptions =
+ this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS")
+ + std::string(" ")
+ + GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName);
}
if(target.GetType() == cmTarget::SHARED_LIBRARY)
{
- extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS") +
- std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName);
+ extraLinkOptions =
+ this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS")
+ + std::string(" ")
+ + GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName);
}
if(target.GetType() == cmTarget::MODULE_LIBRARY)
{
- extraLinkOptions = this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS") +
- std::string(" ") + GetBuildTypeLinkerFlags("CMAKE_MODULE_LINKER_FLAGS", configName);
+ extraLinkOptions =
+ this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS")
+ + std::string(" ")
+ + GetBuildTypeLinkerFlags("CMAKE_MODULE_LINKER_FLAGS", configName);
}
const char* targetLinkFlags = target.GetProperty("LINK_FLAGS");
@@ -650,10 +670,10 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
extraLinkOptions += targetLinkFlags;
}
std::map<cmStdString, cmStdString> flagMap;
- this->
- FillFlagMapFromCommandFlags(flagMap,
- &cmLocalVisualStudio7GeneratorLinkFlagTable[0],
+ this->FillFlagMapFromCommandFlags
+ (flagMap, &cmLocalVisualStudio7GeneratorLinkFlagTable[0],
extraLinkOptions);
+
switch(target.GetType())
{
case cmTarget::STATIC_LIBRARY:
@@ -679,10 +699,12 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
this->ComputeLinkInformation(target, configName, linkLibs, linkDirs);
// Get the language to use for linking.
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -746,9 +768,11 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
temp = this->LibraryOutputPath;
temp += configName;
temp += "/";
- temp += cmSystemTools::GetFilenameWithoutLastExtension(targetFullName.c_str());
+ temp +=
+ cmSystemTools::GetFilenameWithoutLastExtension(targetFullName.c_str());
temp += ".lib";
- fout << "\t\t\t\tImportLibrary=\"" << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n";
+ fout << "\t\t\t\tImportLibrary=\""
+ << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n";
}
break;
case cmTarget::EXECUTABLE:
@@ -759,10 +783,12 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
this->ComputeLinkInformation(target, configName, linkLibs, linkDirs);
// Get the language to use for linking.
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* linkLanguage =
+ target.GetLinkerLanguage(this->GetGlobalGenerator());
if(!linkLanguage)
{
- cmSystemTools::Error("CMake can not determine linker language for target:",
+ cmSystemTools::Error
+ ("CMake can not determine linker language for target:",
target.GetName());
return;
}
@@ -775,7 +801,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
fout << "\t\t\t<Tool\n"
<< "\t\t\t\tName=\"VCLinkerTool\"\n"
- << "\t\t\t\tAdditionalOptions=\"/MACHINE:I386";
+ << "\t\t\t\tAdditionalOptions=\"";
if(extraLinkOptions.size())
{
fout << " " << cmLocalVisualStudio7Generator::EscapeForXML(
@@ -793,7 +819,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
temp += configName;
temp += "/";
temp += targetFullName;
- fout << "\t\t\t\tOutputFile=\"" << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
+ fout << "\t\t\t\tOutputFile=\""
+ << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
for(std::map<cmStdString, cmStdString>::iterator i = flagMap.begin();
i != flagMap.end(); ++i)
{
@@ -834,7 +861,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
}
}
-void cmLocalVisualStudio7Generator::OutputModuleDefinitionFile(std::ostream& fout,
+void cmLocalVisualStudio7Generator
+::OutputModuleDefinitionFile(std::ostream& fout,
cmTarget &target)
{
std::vector<cmSourceFile*> const& classes = target.GetSourceFiles();
@@ -998,8 +1026,10 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
this->WriteVCProjFooter(fout);
}
-void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget target,
- std::ostream &fout, const char *libName, std::vector<std::string> *configs)
+void cmLocalVisualStudio7Generator
+::WriteGroup(const cmSourceGroup *sg, cmTarget target,
+ std::ostream &fout, const char *libName,
+ std::vector<std::string> *configs)
{
const std::vector<const cmSourceFile *> &sourceFiles =
sg->GetSourceFiles();
@@ -1044,9 +1074,11 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
compileFlags += " ";
compileFlags += cflags;
}
- const char* lang =
- this->GlobalGenerator->GetLanguageFromExtension((*sf)->GetSourceExtension().c_str());
- const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator());
+ const char* lang = this->GlobalGenerator->GetLanguageFromExtension
+ ((*sf)->GetSourceExtension().c_str());
+ const char* linkLanguage = target.GetLinkerLanguage
+ (this->GetGlobalGenerator());
+
// if the source file does not match the linker language
// then force c or c++
if(linkLanguage && lang && strcmp(lang, linkLanguage) != 0)
@@ -1090,7 +1122,8 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
if (command)
{
// Construct the entire set of commands in one string.
- std::string script = this->ConstructScript(command->GetCommandLines(),
+ std::string script =
+ this->ConstructScript(command->GetCommandLines(),
command->GetWorkingDirectory());
std::string comment = this->ConstructComment(*command);
const char* flags = compileFlags.size() ? compileFlags.c_str(): 0;
@@ -1098,7 +1131,8 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
comment.c_str(), command->GetDepends(),
command->GetOutputs(), flags);
}
- else if(compileFlags.size() || additionalDeps.length() || objectName.size())
+ else if(compileFlags.size() || additionalDeps.length()
+ || objectName.size())
{
const char* aCompilerTool = "VCCLCompilerTool";
std::string ext = (*sf)->GetSourceExtension();
@@ -1119,7 +1153,8 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
i != configs->end(); ++i)
{
fout << "\t\t\t\t<FileConfiguration\n"
- << "\t\t\t\t\tName=\"" << *i << "|" << this->PlatformName << "\">\n"
+ << "\t\t\t\t\tName=\"" << *i
+ << "|" << this->PlatformName << "\">\n"
<< "\t\t\t\t\t<Tool\n"
<< "\t\t\t\t\tName=\"" << aCompilerTool << "\"\n";
if(compileFlags.size())
@@ -1171,7 +1206,9 @@ WriteCustomRule(std::ostream& fout,
// Write the rule for each configuration.
std::vector<std::string>::iterator i;
std::vector<std::string> *configs =
- static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator)->GetConfigurations();
+ static_cast<cmGlobalVisualStudio7Generator *>
+ (this->GlobalGenerator)->GetConfigurations();
+
for(i = configs->begin(); i != configs->end(); ++i)
{
fout << "\t\t\t\t<FileConfiguration\n";
@@ -1185,8 +1222,10 @@ WriteCustomRule(std::ostream& fout,
}
fout << "\t\t\t\t\t<Tool\n"
<< "\t\t\t\t\tName=\"VCCustomBuildTool\"\n"
- << "\t\t\t\t\tDescription=\"" << this->EscapeForXML(comment) << "\"\n"
- << "\t\t\t\t\tCommandLine=\"" << this->EscapeForXML(command) << "\"\n"
+ << "\t\t\t\t\tDescription=\""
+ << this->EscapeForXML(comment) << "\"\n"
+ << "\t\t\t\t\tCommandLine=\""
+ << this->EscapeForXML(command) << "\"\n"
<< "\t\t\t\t\tAdditionalDependencies=\"";
// Write out the dependencies for the rule.
std::string temp;
@@ -1238,7 +1277,8 @@ void cmLocalVisualStudio7Generator::WriteVCProjEndGroup(std::ostream& fout)
// look for custom rules on a target and collect them together
-void cmLocalVisualStudio7Generator::OutputTargetRules(std::ostream& fout,
+void cmLocalVisualStudio7Generator
+::OutputTargetRules(std::ostream& fout,
cmTarget &target,
const char * /*libName*/)
{
@@ -1259,7 +1299,8 @@ void cmLocalVisualStudio7Generator::OutputTargetRules(std::ostream& fout,
fout << "\nCommandLine=\"";
init = true;
}
- std::string script = this->ConstructScript(cr->GetCommandLines(), cr->GetWorkingDirectory());
+ std::string script =
+ this->ConstructScript(cr->GetCommandLines(), cr->GetWorkingDirectory());
fout << this->EscapeForXML(script.c_str()).c_str();
}
if (init)
@@ -1302,7 +1343,8 @@ void cmLocalVisualStudio7Generator::OutputTargetRules(std::ostream& fout,
fout << "\nCommandLine=\"";
init = true;
}
- std::string script = this->ConstructScript(cr->GetCommandLines(), cr->GetWorkingDirectory());
+ std::string script =
+ this->ConstructScript(cr->GetCommandLines(), cr->GetWorkingDirectory());
fout << this->EscapeForXML(script.c_str()).c_str();
}
if (init)
@@ -1381,7 +1423,8 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const char* s)
return ret;
}
-std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(const char* path)
+std::string cmLocalVisualStudio7Generator
+::ConvertToXMLOutputPath(const char* path)
{
std::string ret = this->ConvertToOptionallyRelativeOutputPath(path);
cmSystemTools::ReplaceString(ret, "&", "&amp;");
@@ -1391,7 +1434,8 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath(const char* pa
return ret;
}
-std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle(const char* path)
+std::string cmLocalVisualStudio7Generator
+::ConvertToXMLOutputPathSingle(const char* path)
{
std::string ret = this->ConvertToOptionallyRelativeOutputPath(path);
cmSystemTools::ReplaceString(ret, "\"", "");
@@ -1426,7 +1470,8 @@ void cmLocalVisualStudio7Generator::ConfigureFinalPass()
}
//----------------------------------------------------------------------------
-std::string cmLocalVisualStudio7Generator::GetTargetDirectory(cmTarget& target)
+std::string cmLocalVisualStudio7Generator
+::GetTargetDirectory(cmTarget& target)
{
std::string dir;
dir += target.GetName();
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index d6cfe5a..22d5d0b 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -65,7 +65,8 @@ public:
void SetPlatformName(const char* n) { this->PlatformName = n;}
virtual void ConfigureFinalPass();
private:
- void FillFlagMapFromCommandFlags(std::map<cmStdString, cmStdString>& flagMap,
+ void FillFlagMapFromCommandFlags(std::map<cmStdString,
+ cmStdString>& flagMap,
cmVS7FlagTable* flagTable,
std::string& flags);
std::string GetBuildTypeLinkerFlags(std::string rootLinkerFlags,
@@ -111,7 +112,8 @@ private:
const std::vector<std::string>& outputs,
const char* extraFlags);
- void WriteGroup(const cmSourceGroup *sg, cmTarget target, std::ostream &fout,
+ void WriteGroup(const cmSourceGroup *sg,
+ cmTarget target, std::ostream &fout,
const char *libName, std::vector<std::string> *configs);
virtual std::string GetTargetDirectory(cmTarget&);
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index 62b1fe6..c8565a9 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -126,8 +126,8 @@ bool cmMacroHelperCommand::InvokeInitialPass
newLFF.Name = this->Functions[c].Name;
newLFF.FilePath = this->Functions[c].FilePath;
newLFF.Line = this->Functions[c].Line;
- const char* def =
- this->Makefile->GetDefinition("CMAKE_MACRO_REPORT_DEFINITION_LOCATION");
+ const char* def = this->Makefile->GetDefinition
+ ("CMAKE_MACRO_REPORT_DEFINITION_LOCATION");
bool macroReportLocation = false;
if(def && !cmSystemTools::IsOff(def))
{
diff --git a/Source/cmMakeDepend.h b/Source/cmMakeDepend.h
index 8426dfa..1c91663 100644
--- a/Source/cmMakeDepend.h
+++ b/Source/cmMakeDepend.h
@@ -163,7 +163,8 @@ protected:
typedef std::map<cmStdString, cmStdString> FileToPathMapType;
typedef std::map<cmStdString, FileToPathMapType>
DirectoryToFileToPathMapType;
- typedef std::map<cmStdString, cmDependInformation*> DependInformationMapType;
+ typedef std::map<cmStdString, cmDependInformation*>
+ DependInformationMapType;
DependInformationMapType DependInformationMap;
DirectoryToFileToPathMapType DirectoryToFileToPathMap;
};
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 940cd05..866911d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -73,9 +73,11 @@ cmMakefile::cmMakefile()
#if defined(CMAKE_BUILD_WITH_CMAKE)
this->AddSourceGroup("", "^.*$");
- this->AddSourceGroup("Source Files",
+ this->AddSourceGroup
+ ("Source Files",
"\\.(C|M|c|c\\+\\+|cc|cpp|cxx|m|mm|rc|def|r|odl|idl|hpj|bat)$");
- this->AddSourceGroup("Header Files", "\\.(h|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
+ this->AddSourceGroup("Header Files",
+ "\\.(h|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
this->AddSourceGroup("CMake Rules", "\\.rule$");
this->AddSourceGroup("Resources", "\\.plist$");
#endif
@@ -168,7 +170,8 @@ cmMakefile::~cmMakefile()
this->FunctionBlockers.clear();
}
-void cmMakefile::PrintStringVector(const char* s, const std::vector<std::string>& v) const
+void cmMakefile::PrintStringVector(const char* s,
+ const std::vector<std::string>& v) const
{
std::cout << s << ": ( \n";
for(std::vector<std::string>::const_iterator i = v.begin();
@@ -179,11 +182,13 @@ void cmMakefile::PrintStringVector(const char* s, const std::vector<std::string>
std::cout << " )\n";
}
-void cmMakefile::PrintStringVector(const char* s, const std::vector<std::pair<cmStdString, bool> >& v) const
+void cmMakefile
+::PrintStringVector(const char* s,
+ const std::vector<std::pair<cmStdString, bool> >& v) const
{
std::cout << s << ": ( \n";
- for(std::vector<std::pair<cmStdString, bool> >::const_iterator i = v.begin();
- i != v.end(); ++i)
+ for(std::vector<std::pair<cmStdString, bool> >::const_iterator i
+ = v.begin(); i != v.end(); ++i)
{
std::cout << i->first.c_str() << " " << i->second;
}
@@ -212,12 +217,14 @@ void cmMakefile::Print()
this->cmStartDirectory.c_str() << std::endl;
std::cout << " this->cmHomeDirectory; " <<
this->cmHomeDirectory.c_str() << std::endl;
- std::cout << " this->ProjectName; " << this->ProjectName.c_str() << std::endl;
- this->PrintStringVector("this->IncludeDirectories;", this->IncludeDirectories);
+ std::cout << " this->ProjectName; "
+ << this->ProjectName.c_str() << std::endl;
+ this->PrintStringVector("this->IncludeDirectories;",
+ this->IncludeDirectories);
this->PrintStringVector("this->LinkDirectories", this->LinkDirectories);
#if defined(CMAKE_BUILD_WITH_CMAKE)
- for( std::vector<cmSourceGroup>::const_iterator i = this->SourceGroups.begin();
- i != this->SourceGroups.end(); ++i)
+ for( std::vector<cmSourceGroup>::const_iterator i =
+ this->SourceGroups.begin(); i != this->SourceGroups.end(); ++i)
{
std::cout << "Source Group: " << i->GetName() << std::endl;
}
@@ -238,6 +245,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff)
// No error.
return result;
}
+
std::string name = lff.Name;
// execute the command
cmCommand *rm =
@@ -288,12 +296,14 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff)
this->UsedCommands.push_back(usedCommand);
}
}
- else if ( this->GetCMakeInstance()->GetScriptMode() && !usedCommand->IsScriptable() )
+ else if ( this->GetCMakeInstance()->GetScriptMode()
+ && !usedCommand->IsScriptable() )
{
cmOStringStream error;
error << "Error in cmake code at\n"
<< lff.FilePath << ":" << lff.Line << ":\n"
- << "Command " << usedCommand->GetName() << " not scriptable" << std::endl;
+ << "Command " << usedCommand->GetName()
+ << " not scriptable" << std::endl;
cmSystemTools::Error(error.str().c_str());
result = false;
cmSystemTools::SetFatalErrorOccured();
@@ -323,7 +333,8 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff)
// Parse the given CMakeLists.txt file executing all commands
//
-bool cmMakefile::ReadListFile(const char* filename_in, const char *external_in)
+bool cmMakefile::ReadListFile(const char* filename_in,
+ const char *external_in)
{
std::string currentFile = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE");
this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename_in);
@@ -475,7 +486,11 @@ void cmMakefile::ConfigureFinalPass()
= this->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
if (oldValue && atof(oldValue) <= 1.2)
{
- cmSystemTools::Error("You have requested backwards compatibility with CMake version 1.2 or earlier. This version of CMake only supports backwards compatibility with CMake 1.4 or later. For compatibility with 1.2 or earlier please use CMake 2.0");
+ cmSystemTools::Error("You have requested backwards compatibility "
+ "with CMake version 1.2 or earlier. This version "
+ "of CMake only supports backwards compatibility "
+ "with CMake 1.4 or later. For compatibility with "
+ "1.2 or earlier please use CMake 2.0");
}
for (cmTargets::iterator l = this->Targets.begin();
l != this->Targets.end(); l++)
@@ -791,7 +806,8 @@ void cmMakefile::RemoveDefineFlag(const char* flag)
cmSystemTools::ReplaceString(this->DefineFlags, flag, " ");
}
-void cmMakefile::AddLinkLibrary(const char* lib, cmTarget::LinkLibraryType llt)
+void cmMakefile::AddLinkLibrary(const char* lib,
+ cmTarget::LinkLibraryType llt)
{
this->LinkLibraries.push_back(
std::pair<std::string, cmTarget::LinkLibraryType>(lib,llt));
@@ -814,7 +830,8 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target,
{
cmOStringStream e;
e << "Attempt to add link library " << lib
- << " which is not a library target to target " << tgt->GetType() << " " <<
+ << " which is not a library target to target "
+ << tgt->GetType() << " " <<
target << "\n";
cmSystemTools::Error(e.str().c_str());
}
@@ -841,7 +858,8 @@ void cmMakefile::AddLinkDirectoryForTarget(const char *target,
}
else
{
- cmSystemTools::Error("Attempt to add link directories to non-existant target: ",
+ cmSystemTools::Error
+ ("Attempt to add link directories to non-existant target: ",
target, " for directory ", d);
}
}
@@ -864,7 +882,8 @@ void cmMakefile::AddLinkDirectory(const char* dir)
std::string newdir = dir;
newdir = newdir.substr(0, newdir.size()-1);
if(std::find(this->LinkDirectories.begin(),
- this->LinkDirectories.end(), newdir.c_str()) == this->LinkDirectories.end())
+ this->LinkDirectories.end(),
+ newdir.c_str()) == this->LinkDirectories.end())
{
this->LinkDirectories.push_back(newdir);
}
@@ -872,7 +891,8 @@ void cmMakefile::AddLinkDirectory(const char* dir)
else
{
if(std::find(this->LinkDirectories.begin(),
- this->LinkDirectories.end(), dir) == this->LinkDirectories.end())
+ this->LinkDirectories.end(), dir)
+ == this->LinkDirectories.end())
{
this->LinkDirectories.push_back(dir);
}
@@ -916,7 +936,8 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
lg2->Configure();
}
-void cmMakefile::AddSubDirectory(const char* sub, bool topLevel, bool preorder)
+void cmMakefile::AddSubDirectory(const char* sub,
+ bool topLevel, bool preorder)
{
// the source path must be made full if it isn't already
std::string srcPath = sub;
@@ -946,14 +967,17 @@ void cmMakefile::AddSubDirectory(const char* srcPath, const char *binPath,
bool topLevel, bool preorder,
bool immediate)
{
- std::vector<cmLocalGenerator *>& children = this->LocalGenerator->GetChildren();
+ std::vector<cmLocalGenerator *>& children =
+ this->LocalGenerator->GetChildren();
// has this directory already been added? If so error
unsigned int i;
for (i = 0; i < children.size(); ++i)
{
if (srcPath == children[i]->GetMakefile()->GetStartDirectory())
{
- cmSystemTools::Error("Attempt to add subdirectory multiple times for directory.\n", srcPath);
+ cmSystemTools::Error
+ ("Attempt to add subdirectory multiple times for directory.\n",
+ srcPath);
return;
}
}
@@ -1088,7 +1112,9 @@ void cmMakefile::AddDefinition(const char* name, bool value)
}
-void cmMakefile::AddCacheDefinition(const char* name, bool value, const char* doc)
+void cmMakefile::AddCacheDefinition(const char* name,
+ bool value,
+ const char* doc)
{
bool val = value;
cmCacheManager::CacheIterator it =
@@ -1197,8 +1223,8 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname)
// look through all the source files that have custom commands
// and see if the custom command has the passed source file as an output
// keep in mind the possible .rule extension that may be tacked on
- for(std::vector<cmSourceFile*>::const_iterator i = this->SourceFiles.begin();
- i != this->SourceFiles.end(); ++i)
+ for(std::vector<cmSourceFile*>::const_iterator i =
+ this->SourceFiles.begin(); i != this->SourceFiles.end(); ++i)
{
// does this source file have a custom command?
if ((*i)->GetCustomCommand())
@@ -1251,7 +1277,9 @@ cmSourceGroup* cmMakefile::GetSourceGroup(const char* name)
return 0;
}
-void cmMakefile::AddSourceGroup(const char* name, const char* regex, const char *parent)
+void cmMakefile::AddSourceGroup(const char* name,
+ const char* regex,
+ const char *parent)
{
// First see if the group exists. If so, replace its regular expression.
for(unsigned int i=0;i<this->SourceGroups.size();++i)
@@ -1281,8 +1309,9 @@ void cmMakefile::AddSourceGroup(const char* name, const char* regex, const char
{
if ( regex )
{
- // We only want to set the regular expression. If there are already
- // source files in the group, we don't want to remove them.
+ // We only want to set the regular expression. If there are
+ // already source files in the group, we don't want to remove
+ // them.
localtarget->SetGroupRegex(regex);
}
}
@@ -1304,8 +1333,9 @@ void cmMakefile::AddSourceGroup(const char* name, const char* regex, const char
{
if ( regex )
{
- // We only want to set the regular expression. If there are already
- // source files in the group, we don't want to remove them.
+ // We only want to set the regular expression. If there are
+ // already source files in the group, we don't want to
+ // remove them.
addtarget->SetGroupRegex(regex);
}
}
@@ -1388,7 +1418,8 @@ bool cmMakefile::CanIWriteThisFile(const char* fileName)
return true;
}
// If we are doing an in-source build, than the test will always fail
- if ( cmSystemTools::SameFile(this->GetHomeDirectory(), this->GetHomeOutputDirectory()) )
+ if ( cmSystemTools::SameFile(this->GetHomeDirectory(),
+ this->GetHomeOutputDirectory()) )
{
if ( this->IsOn("CMAKE_DISABLE_IN_SOURCE_BUILD") )
{
@@ -1397,7 +1428,8 @@ bool cmMakefile::CanIWriteThisFile(const char* fileName)
return true;
}
- // Check if this is subdirectory of the source tree but not a subdirectory of a build tree
+ // Check if this is subdirectory of the source tree but not a
+ // subdirectory of a build tree
if ( cmSystemTools::IsSubDirectory(fileName,
this->GetHomeDirectory()) &&
!cmSystemTools::IsSubDirectory(fileName,
@@ -1413,7 +1445,8 @@ const char* cmMakefile::GetRequiredDefinition(const char* name) const
const char* ret = this->GetDefinition(name);
if(!ret)
{
- cmSystemTools::Error("Error required internal CMake variable not set, cmake may be not be built correctly.\n",
+ cmSystemTools::Error("Error required internal CMake variable not "
+ "set, cmake may be not be built correctly.\n",
"Missing variable is:\n",
name);
return "";
@@ -1449,8 +1482,8 @@ const char* cmMakefile::GetDefinition(const char* name) const
if (pos2 != this->Definitions.end() &&
cmSystemTools::IsOn((*pos2).second.c_str()))
{
- vv->VariableAccessed(name,
- cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS);
+ vv->VariableAccessed
+ (name, cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS);
}
else
{
@@ -1473,18 +1506,21 @@ const char* cmMakefile::GetSafeDefinition(const char* def) const
return ret;
}
-std::vector<std::string> cmMakefile::GetDefinitions(int cacheonly /* = 0 */) const
+std::vector<std::string> cmMakefile
+::GetDefinitions(int cacheonly /* = 0 */) const
{
std::map<cmStdString, int> definitions;
if ( !cacheonly )
{
DefinitionMap::const_iterator it;
- for ( it = this->Definitions.begin(); it != this->Definitions.end(); it ++ )
+ for ( it = this->Definitions.begin();
+ it != this->Definitions.end(); it ++ )
{
definitions[it->first] = 1;
}
}
- cmCacheManager::CacheIterator cit = this->GetCacheManager()->GetCacheIterator();
+ cmCacheManager::CacheIterator cit =
+ this->GetCacheManager()->GetCacheIterator();
for ( cit.Begin(); !cit.IsAtEnd(); cit.Next() )
{
definitions[cit.GetName()] = 1;
@@ -1617,7 +1653,8 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source,
// bogus $ with no { so add $ to result and move on
result += '$'; // add bogus $ back into string
currentPos = markerPos+1; // move on
- endVariableMarker = ' '; // set end var to space so we can tell bogus
+ // set end var to space so we can tell bogus
+ endVariableMarker = ' ';
}
}
else
@@ -1648,7 +1685,8 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source,
else
{
// good variable remove it
- std::string var = source.substr(markerPos, endVariablePos - markerPos);
+ std::string var =
+ source.substr(markerPos, endVariablePos - markerPos);
bool found = false;
if (markerStartSize == 5) // $ENV{
{
@@ -1853,7 +1891,8 @@ void cmMakefile::ExpandArguments(
{
// Expand the variables in the argument.
value = i->Value;
- this->ExpandVariablesInString(value, false, false, false, i->FilePath, i->Line);
+ this->ExpandVariablesInString(value, false, false, false,
+ i->FilePath, i->Line);
// If the argument is quoted, it should be one argument.
// Otherwise, it may be a list of arguments.
@@ -1905,7 +1944,8 @@ void cmMakefile::SetHomeOutputDirectory(const char* lib)
this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") )
{
- this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", this->GetHomeOutputDirectory());
+ this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
+ this->GetHomeOutputDirectory());
}
}
@@ -1978,7 +2018,8 @@ cmSourceFile* cmMakefile::GetSource(const char* sourceName) const
ext = ext.substr(1);
}
- for(std::vector<cmSourceFile*>::const_iterator i = this->SourceFiles.begin();
+ for(std::vector<cmSourceFile*>::const_iterator i =
+ this->SourceFiles.begin();
i != this->SourceFiles.end(); ++i)
{
if ((*i)->GetSourceNameWithoutLastExtension() == sname &&
@@ -1996,7 +2037,8 @@ cmSourceFile* cmMakefile::GetSource(const char* sourceName) const
}
path = this->GetCurrentOutputDirectory();
- for(std::vector<cmSourceFile*>::const_iterator i = this->SourceFiles.begin();
+ for(std::vector<cmSourceFile*>::const_iterator i =
+ this->SourceFiles.begin();
i != this->SourceFiles.end(); ++i)
{
if ((*i)->GetSourceName() == sname &&
@@ -2059,7 +2101,8 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
}
else
{
- if ( cmSystemTools::GetFilenameLastExtension(srcTreeFile.c_str()).size() == 0)
+ if ( cmSystemTools::GetFilenameLastExtension
+ (srcTreeFile.c_str()).size() == 0)
{
if (cmSystemTools::DoesFileExistWithExtensions(
srcTreeFile.c_str(), this->GetSourceExtensions()))
@@ -2091,7 +2134,9 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
{
ext = ext.substr(1);
}
- bool headerFile = !(std::find( this->HeaderFileExtensions.begin(), this->HeaderFileExtensions.end(), ext ) ==
+ bool headerFile =
+ !(std::find( this->HeaderFileExtensions.begin(),
+ this->HeaderFileExtensions.end(), ext ) ==
this->HeaderFileExtensions.end());
file.SetName(name_no_ext.c_str(), path.c_str(), ext.c_str(), headerFile);
}
@@ -2190,8 +2235,8 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
std::string cmakeCommand = this->GetDefinition("CMAKE_COMMAND");
cmake cm;
cm.SetIsInTryCompile(true);
- cmGlobalGenerator *gg =
- cm.CreateGlobalGenerator(this->LocalGenerator->GetGlobalGenerator()->GetName());
+ cmGlobalGenerator *gg = cm.CreateGlobalGenerator
+ (this->LocalGenerator->GetGlobalGenerator()->GetName());
if (!gg)
{
cmSystemTools::Error(
@@ -2215,7 +2260,8 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
cm.SetCacheArgs(*cmakeArgs);
}
// to save time we pass the EnableLanguage info directly
- gg->EnableLanguagesFromGenerator(this->LocalGenerator->GetGlobalGenerator());
+ gg->EnableLanguagesFromGenerator
+ (this->LocalGenerator->GetGlobalGenerator());
if (cm.Configure() != 0)
{
@@ -2365,7 +2411,8 @@ void cmMakefile::ConfigureString(const std::string& input,
// Replace #cmakedefine instances.
if(this->cmDefineRegex.find(line))
{
- const char* def = this->GetDefinition(this->cmDefineRegex.match(1).c_str());
+ const char* def =
+ this->GetDefinition(this->cmDefineRegex.match(1).c_str());
if(!cmSystemTools::IsOff(def))
{
cmSystemTools::ReplaceString(line, "#cmakedefine", "#define");
@@ -2381,7 +2428,8 @@ void cmMakefile::ConfigureString(const std::string& input,
}
else if(this->cmDefine01Regex.find(line))
{
- const char* def = this->GetDefinition(this->cmDefine01Regex.match(1).c_str());
+ const char* def =
+ this->GetDefinition(this->cmDefine01Regex.match(1).c_str());
cmSystemTools::ReplaceString(line, "#cmakedefine01", "#define");
output += line;
if(!cmSystemTools::IsOff(def))
@@ -2408,8 +2456,8 @@ void cmMakefile::ConfigureString(const std::string& input,
}
// Perform variable replacements.
- this->ExpandVariablesInString(output, escapeQuotes, true, atOnly, 0, -1, true);
-// this->RemoveVariablesInString(output, atOnly);
+ this->ExpandVariablesInString(output, escapeQuotes, true,
+ atOnly, 0, -1, true);
}
int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
@@ -2418,7 +2466,8 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
int res = 1;
if ( !this->CanIWriteThisFile(outfile) )
{
- cmSystemTools::Error("Attempt to write file: ", outfile, " into a source directory.");
+ cmSystemTools::Error("Attempt to write file: ",
+ outfile, " into a source directory.");
return 0;
}
if ( !cmSystemTools::FileExists(infile) )
@@ -2511,7 +2560,10 @@ bool cmMakefile::CheckInfiniteLoops()
if ( this->HasWrittenFile(it->c_str()) )
{
cmOStringStream str;
- str << "File " << it->c_str() << " is written by WRITE_FILE (or FILE WRITE) command and should not be used as input to CMake. Please use CONFIGURE_FILE to be safe. Refer to the note next to FILE WRITE command.";
+ str << "File " << it->c_str() <<
+ " is written by WRITE_FILE (or FILE WRITE) command and should "
+ "not be used as input to CMake. Please use CONFIGURE_FILE to "
+ "be safe. Refer to the note next to FILE WRITE command.";
cmSystemTools::Error(str.str().c_str());
return false;
}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 4c3888d..172ab7a 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -566,7 +566,8 @@ public:
* Remove any remaining variables in the string. Anything with ${var} or
* @var@ will be removed.
*/
- void RemoveVariablesInString(std::string& source, bool atOnly = false) const;
+ void RemoveVariablesInString(std::string& source,
+ bool atOnly = false) const;
/**
* Expand variables in the makefiles ivars such as link directories etc
@@ -612,7 +613,8 @@ public:
*/
void AddCommand(cmCommand* );
- ///! Enable support for named language, if nil then all languages are enabled.
+ ///! Enable support for named language, if nil then all languages are
+ ///enabled.
void EnableLanguage(std::vector<std::string>const& languages);
/**
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index f847c3a..0f36f0d 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -95,7 +95,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Get the name of the executable to generate.
std::string targetName;
std::string targetNameReal;
- this->Target->GetExecutableNames(targetName, targetNameReal,
+ this->Target->GetExecutableNames
+ (targetName, targetNameReal,
this->LocalGenerator->ConfigurationName.c_str());
// Construct the full path version of the names.
@@ -135,7 +136,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
sourceIt != this->Target->GetSourceFiles().end();
++ sourceIt )
{
- const char* subDir = (*sourceIt)->GetProperty("MACOSX_PACKAGE_LOCATION");
+ const char* subDir =
+ (*sourceIt)->GetProperty("MACOSX_PACKAGE_LOCATION");
if ( subDir )
{
std::string newDir = macdir;
@@ -156,7 +158,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
cmSystemTools::MakeDirectory(macdir.c_str());
this->Makefile->AddDefinition("MACOSX_BUNDLE_EXECUTABLE_NAME",
targetName.c_str());
- this->Makefile->ConfigureFile(f1.c_str(), f2.c_str(), false, false, false);
+ this->Makefile->ConfigureFile(f1.c_str(), f2.c_str(),
+ false, false, false);
}
#endif
if(relink)
@@ -221,13 +224,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
if(this->Target->GetPropertyAsBool("WIN32_EXECUTABLE"))
{
- this->LocalGenerator->AppendFlags(linkFlags,
- this->Makefile->GetDefinition("CMAKE_CREATE_WIN32_EXE"));
+ this->LocalGenerator->AppendFlags
+ (linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_WIN32_EXE"));
}
else
{
- this->LocalGenerator->AppendFlags(linkFlags,
- this->Makefile->GetDefinition("CMAKE_CREATE_CONSOLE_EXE"));
+ this->LocalGenerator->AppendFlags
+ (linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_CONSOLE_EXE"));
}
// Add language-specific flags.
@@ -236,19 +239,24 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
this->LocalGenerator->ConfigurationName.c_str());
// Add target-specific linker flags.
- this->LocalGenerator->AppendFlags(linkFlags, this->Target->GetProperty("LINK_FLAGS"));
+ this->LocalGenerator->AppendFlags
+ (linkFlags, this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
- linkFlagsConfig += cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
- this->LocalGenerator->AppendFlags(linkFlags,
- this->Target->GetProperty(linkFlagsConfig.c_str()));
+ linkFlagsConfig +=
+ cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
+ this->LocalGenerator->AppendFlags
+ (linkFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
+
// Construct a list of files associated with this executable that
// may need to be cleaned.
std::vector<std::string> exeCleanFiles;
{
std::string cleanName;
std::string cleanRealName;
- this->Target->GetExecutableCleanNames(cleanName, cleanRealName,
+ this->Target->GetExecutableCleanNames
+ (cleanName, cleanRealName,
this->LocalGenerator->ConfigurationName.c_str());
+
std::string cleanFullName = outpath + cleanName;
std::string cleanFullRealName = outpath + cleanRealName;
exeCleanFiles.push_back(this->Convert(cleanFullName.c_str(),
@@ -266,9 +274,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::vector<std::string> commands1;
this->LocalGenerator->AppendCleanCommand(commands1, exeCleanFiles,
*this->Target, "target");
- this->LocalGenerator->CreateCDCommand(commands1,
+ this->LocalGenerator->CreateCDCommand
+ (commands1,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
+
commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear();
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index fac4513..330465f 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -91,7 +91,8 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules()
linkRuleVar += "_CREATE_STATIC_LIBRARY";
std::string extraFlags;
- this->LocalGenerator->AppendFlags(extraFlags, this->Target->GetProperty("STATIC_LIBRARY_FLAGS"));
+ this->LocalGenerator->AppendFlags
+ (extraFlags,this->Target->GetProperty("STATIC_LIBRARY_FLAGS"));
this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), false);
}
@@ -108,26 +109,34 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
linkRuleVar += "_CREATE_SHARED_LIBRARY";
std::string extraFlags;
- this->LocalGenerator->AppendFlags(extraFlags, this->Target->GetProperty("LINK_FLAGS"));
+ this->LocalGenerator->AppendFlags
+ (extraFlags, this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
- linkFlagsConfig += cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
- this->LocalGenerator->AppendFlags(extraFlags,
- this->Target->GetProperty(linkFlagsConfig.c_str()));
+ linkFlagsConfig +=
+ cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
+ this->LocalGenerator->AppendFlags
+ (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
- this->LocalGenerator->AddConfigVariableFlags(extraFlags, "CMAKE_SHARED_LINKER_FLAGS",
+ this->LocalGenerator->AddConfigVariableFlags
+ (extraFlags, "CMAKE_SHARED_LINKER_FLAGS",
this->LocalGenerator->ConfigurationName.c_str());
- if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW")))
+ if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN")
+ || this->Makefile->IsOn("MINGW")))
{
- const std::vector<cmSourceFile*>& sources = this->Target->GetSourceFiles();
+ const std::vector<cmSourceFile*>& sources =
+ this->Target->GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = sources.begin();
i != sources.end(); ++i)
{
if((*i)->GetSourceExtension() == "def")
{
extraFlags += " ";
- extraFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
extraFlags +=
- this->Convert((*i)->GetFullPath().c_str(),cmLocalGenerator::START_OUTPUT,cmLocalGenerator::MAKEFILE);
+ this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
+ extraFlags +=
+ this->Convert((*i)->GetFullPath().c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::MAKEFILE);
}
}
}
@@ -147,13 +156,17 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
linkRuleVar += "_CREATE_SHARED_MODULE";
std::string extraFlags;
- this->LocalGenerator->AppendFlags(extraFlags, this->Target->GetProperty("LINK_FLAGS"));
- std::string linkFlagsConfig = "LINK_FLAGS_";
- linkFlagsConfig += cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
this->LocalGenerator->AppendFlags(extraFlags,
- this->Target->GetProperty(linkFlagsConfig.c_str()));
- this->LocalGenerator->AddConfigVariableFlags(extraFlags, "CMAKE_MODULE_LINKER_FLAGS",
+ this->Target->GetProperty("LINK_FLAGS"));
+ std::string linkFlagsConfig = "LINK_FLAGS_";
+ linkFlagsConfig +=
+ cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
+ this->LocalGenerator->AppendFlags
+ (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
+ this->LocalGenerator->AddConfigVariableFlags
+ (extraFlags, "CMAKE_MODULE_LINKER_FLAGS",
this->LocalGenerator->ConfigurationName.c_str());
+
// TODO: .def files should be supported here also.
this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink);
}
@@ -233,7 +246,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
outpath += "/";
}
std::string targetFullPath = outpath + targetName;
- std::string targetFullPathPDB = outpath + this->Target->GetName() + std::string(".pdb");
+ std::string targetFullPathPDB =
+ outpath + this->Target->GetName() + std::string(".pdb");
std::string targetFullPathSO = outpath + targetNameSO;
std::string targetFullPathReal = outpath + targetNameReal;
std::string targetFullPathImport = outpath + targetNameImport;
@@ -341,7 +355,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
std::vector<std::string> commands1;
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
*this->Target, "target");
- this->LocalGenerator->CreateCDCommand(commands1,
+ this->LocalGenerator->CreateCDCommand
+ (commands1,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
commands.insert(commands.end(), commands1.begin(), commands1.end());
@@ -359,7 +374,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// Construct the main link rule.
std::string linkRule = this->Makefile->GetRequiredDefinition(linkRuleVar);
cmSystemTools::ExpandListArgument(linkRule, commands1);
- this->LocalGenerator->CreateCDCommand(commands1,
+ this->LocalGenerator->CreateCDCommand
+ (commands1,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
commands.insert(commands.end(), commands1.begin(), commands1.end());
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index bf8422a..f3434d0 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -252,7 +252,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(cmSourceFile& source)
// Get the full path name of the object file.
std::string objNoTargetDir;
std::string obj =
- this->LocalGenerator->GetObjectFileName(*this->Target, source, &objNoTargetDir);
+ this->LocalGenerator->GetObjectFileName(*this->Target, source,
+ &objNoTargetDir);
// Avoid generating duplicate rules.
if(this->ObjectFiles.find(obj) == this->ObjectFiles.end())
@@ -295,13 +296,15 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(cmSourceFile& source)
this->WriteObjectBuildFile(obj, lang, source, depends);
// The object file should be checked for dependency integrity.
- this->LocalGenerator->CheckDependFiles[this->Target->GetName()][lang].insert(&source);
+ this->LocalGenerator->
+ CheckDependFiles[this->Target->GetName()][lang].insert(&source);
// add this to the list of objects for this local generator
if(cmSystemTools::FileIsFullPath(objNoTargetDir.c_str()))
{
objNoTargetDir = cmSystemTools::GetFilenameName(objNoTargetDir);
}
- this->LocalGenerator->LocalObjectFiles[objNoTargetDir].push_back(this->Target);
+ this->LocalGenerator->LocalObjectFiles[objNoTargetDir].
+ push_back(this->Target);
}
//----------------------------------------------------------------------------
@@ -312,7 +315,8 @@ cmMakefileTargetGenerator
cmSourceFile& source,
std::vector<std::string>& depends)
{
- this->LocalGenerator->AppendRuleDepend(depends, this->FlagFileNameFull.c_str());
+ this->LocalGenerator->AppendRuleDepend(depends,
+ this->FlagFileNameFull.c_str());
// generate the depend scanning rule
this->WriteObjectDependRules(source, depends);
@@ -337,13 +341,15 @@ cmMakefileTargetGenerator
// Add target-specific flags.
if(this->Target->GetProperty("COMPILE_FLAGS"))
{
- this->LocalGenerator->AppendFlags(flags, this->Target->GetProperty("COMPILE_FLAGS"));
+ this->LocalGenerator->AppendFlags
+ (flags, this->Target->GetProperty("COMPILE_FLAGS"));
}
// Add flags from source file properties.
if (source.GetProperty("COMPILE_FLAGS"))
{
- this->LocalGenerator->AppendFlags(flags, source.GetProperty("COMPILE_FLAGS"));
+ this->LocalGenerator->AppendFlags
+ (flags, source.GetProperty("COMPILE_FLAGS"));
*this->FlagFileStream << "# Custom flags: "
<< relativeObj << "_FLAGS = "
<< source.GetProperty("COMPILE_FLAGS")
@@ -361,8 +367,7 @@ cmMakefileTargetGenerator
sourceFile = this->Convert(sourceFile.c_str(),
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);
- std::string objectFile =
- this->Convert(obj.c_str(),
+ std::string objectFile = this->Convert(obj.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
@@ -445,7 +450,9 @@ cmMakefileTargetGenerator
this->LocalGenerator->GetRelativeTargetDirectory(*this->Target);
tgtMakefileName += "/build.make";
r_commands.push_back
- (this->LocalGenerator->GetRecursiveMakeCall(tgtMakefileName.c_str(),temp.c_str()));
+ (this->LocalGenerator->GetRecursiveMakeCall(tgtMakefileName.c_str(),
+ temp.c_str()));
+
p_depends.clear();
p_depends.push_back(objectRequires);
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
@@ -503,7 +510,8 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
// Construct the clean command.
this->LocalGenerator->AppendCleanCommand(commands, this->CleanFiles,
*this->Target);
- this->LocalGenerator->CreateCDCommand(commands,
+ this->LocalGenerator->CreateCDCommand
+ (commands,
this->Makefile->GetStartOutputDirectory(),
this->Makefile->GetHomeOutputDirectory());
@@ -619,11 +627,13 @@ void cmMakefileTargetGenerator
void cmMakefileTargetGenerator::WriteCustomCommands()
{
// add custom commands to the clean rules?
- const char* clean_no_custom = this->Makefile->GetProperty("CLEAN_NO_CUSTOM");
+ const char* clean_no_custom =
+ this->Makefile->GetProperty("CLEAN_NO_CUSTOM");
bool clean = cmSystemTools::IsOff(clean_no_custom);
// Generate the rule files for each custom command.
- const std::vector<cmSourceFile*> &classes = this->Makefile->GetSourceFiles();
+ const std::vector<cmSourceFile*> &classes =
+ this->Makefile->GetSourceFiles();
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
i != classes.end(); i++)
{
@@ -706,7 +716,8 @@ cmMakefileTargetGenerator
// Write a make variable assignment that lists all objects for the
// target.
variableName =
- this->LocalGenerator->CreateMakeVariable(this->Target->GetName(), "_OBJECTS");
+ this->LocalGenerator->CreateMakeVariable(this->Target->GetName(),
+ "_OBJECTS");
*this->BuildFileStream
<< "# Object files for target " << this->Target->GetName() << "\n"
<< variableName.c_str() << " =";
@@ -744,10 +755,12 @@ cmMakefileTargetGenerator
// Write a make variable assignment that lists all external objects
// for the target.
variableNameExternal =
- this->LocalGenerator->CreateMakeVariable(this->Target->GetName(),"_EXTERNAL_OBJECTS");
+ this->LocalGenerator->CreateMakeVariable(this->Target->GetName(),
+ "_EXTERNAL_OBJECTS");
*this->BuildFileStream
<< "\n"
- << "# External object files for target " << this->Target->GetName() << "\n"
+ << "# External object files for target "
+ << this->Target->GetName() << "\n"
<< variableNameExternal.c_str() << " =";
for(std::vector<std::string>::const_iterator i =
this->ExternalObjects.begin();
@@ -759,8 +772,8 @@ cmMakefileTargetGenerator
<< this->Makefile->GetSafeDefinition("CMAKE_OBJECT_NAME");
if(objName)
{
- *this->BuildFileStream << this->Convert(i->c_str(),
- cmLocalGenerator::START_OUTPUT,
+ *this->BuildFileStream <<
+ this->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::MAKEFILE);
}
else
diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx
index 2034d4c..23d572a 100644
--- a/Source/cmMarkAsAdvancedCommand.cxx
+++ b/Source/cmMarkAsAdvancedCommand.cxx
@@ -17,7 +17,8 @@
#include "cmMarkAsAdvancedCommand.h"
// cmMarkAsAdvancedCommand
-bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args)
+bool cmMarkAsAdvancedCommand
+::InitialPass(std::vector<std::string> const& args)
{
if(args.size() < 1 )
{
@@ -41,7 +42,8 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args)
{
std::string variable = args[i];
cmCacheManager* manager = this->Makefile->GetCacheManager();
- cmCacheManager::CacheIterator it = manager->GetCacheIterator(variable.c_str());
+ cmCacheManager::CacheIterator it =
+ manager->GetCacheIterator(variable.c_str());
if ( it.IsAtEnd() )
{
this->Makefile->AddCacheDefinition(variable.c_str(), 0, 0,
diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h
index ddebac5..3f4a6ed 100644
--- a/Source/cmMathCommand.h
+++ b/Source/cmMathCommand.h
@@ -66,7 +66,8 @@ public:
return
" MATH(EXPR <output variable> <math expression>)\n"
"EXPR evaluates mathematical expression and return result in the "
- "output variable. Example mathematical expression is '5 * ( 10 + 13 )'.";
+ "output variable. Example mathematical expression is "
+ "'5 * ( 10 + 13 )'.";
}
cmTypeMacro(cmMathCommand, cmCommand);
diff --git a/Source/cmObject.h b/Source/cmObject.h
index 99ab31d..2083518 100644
--- a/Source/cmObject.h
+++ b/Source/cmObject.h
@@ -22,8 +22,8 @@
/** \class cmObject
* \brief Superclass for all commands and other classes in CMake.
*
- * cmObject is the base class for all classes in CMake. It defines some methods
- * such as GetNameOfClass, IsA, SafeDownCast.
+ * cmObject is the base class for all classes in CMake. It defines some
+ * methods such as GetNameOfClass, IsA, SafeDownCast.
*/
class cmObject
{
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 8682c91..46bf045 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -24,9 +24,10 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args)
{
argError = true;
}
- // for VTK 4.0 we have to support the option command with more than 3 arguments
- // if CMAKE_MINIMUM_REQUIRED_VERSION is not defined, if CMAKE_MINIMUM_REQUIRED_VERSION
- // is defined, then we can have stricter checking.
+ // for VTK 4.0 we have to support the option command with more than 3
+ // arguments if CMAKE_MINIMUM_REQUIRED_VERSION is not defined, if
+ // CMAKE_MINIMUM_REQUIRED_VERSION is defined, then we can have stricter
+ // checking.
if(this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION"))
{
if(args.size() > 3)
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index d5d0c80..d2be241 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -68,13 +68,16 @@ void cmOrderLinkDirectories::FindLibrariesInSearchPaths()
//-------------------------------------------------------------------
void cmOrderLinkDirectories::FindIndividualLibraryOrders()
{
- for(std::vector<Library>::iterator lib = this->MultiDirectoryLibraries.begin();
+ for(std::vector<Library>::iterator lib =
+ this->MultiDirectoryLibraries.begin();
lib != this->MultiDirectoryLibraries.end(); ++lib)
{
- std::vector<cmStdString>& dirs = this->LibraryToDirectories[lib->FullPath];
- std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i;
- for(i = this->DirectoryToAfterList.begin(); i != this->DirectoryToAfterList.end();
- ++i)
+ std::vector<cmStdString>& dirs =
+ this->LibraryToDirectories[lib->FullPath];
+ std::vector<std::pair<cmStdString, std::vector<cmStdString> >
+ >::iterator i;
+ for(i = this->DirectoryToAfterList.begin();
+ i != this->DirectoryToAfterList.end(); ++i)
{
if(i->first == lib->Path)
{
@@ -181,19 +184,20 @@ void cmOrderLinkDirectories::PrepareLinkTargets()
bool cmOrderLinkDirectories::FindPathNotInDirectoryToAfterList(
cmStdString& path)
{
- for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i
- = this->DirectoryToAfterList.begin();
+ for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
+ >::iterator i = this->DirectoryToAfterList.begin();
i != this->DirectoryToAfterList.end(); ++i)
{
const cmStdString& p = i->first;
bool found = false;
- for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator j
- = this->DirectoryToAfterList.begin(); j != this->DirectoryToAfterList.end()
- && !found; ++j)
+ for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
+ >::iterator j = this->DirectoryToAfterList.begin();
+ j != this->DirectoryToAfterList.end() && !found; ++j)
{
if(j != i)
{
- found = (std::find(j->second.begin(), j->second.end(), p) != j->second.end());
+ found = (std::find(j->second.begin(), j->second.end(), p)
+ != j->second.end());
}
}
if(!found)
@@ -226,8 +230,8 @@ void cmOrderLinkDirectories::OrderPaths(std::vector<cmStdString>&
// then there is a cycle and we are stuck
if(this->DirectoryToAfterList.size())
{
- for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i
- = this->DirectoryToAfterList.begin();
+ for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
+ >::iterator i = this->DirectoryToAfterList.begin();
i != this->DirectoryToAfterList.end(); ++i)
{
this->ImpossibleDirectories.insert(i->first);
@@ -337,11 +341,13 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
}
else
{
- std::string message = "Warning: Ignoring path found in link libraries for target: ";
+ std::string message =
+ "Warning: Ignoring path found in link libraries for target: ";
message += this->TargetName;
message += ", path is: ";
message += this->RawLinkItems[i];
- message += ". Expected a library name or a full path to a library name.";
+ message +=
+ ". Expected a library name or a full path to a library name.";
cmSystemTools::Message(message.c_str());
continue;
}
@@ -382,16 +388,19 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
}
this->FindLibrariesInSearchPaths();
for(std::map<cmStdString, std::vector<cmStdString> >::iterator lib =
- this->LibraryToDirectories.begin(); lib!= this->LibraryToDirectories.end();
+ this->LibraryToDirectories.begin();
+ lib!= this->LibraryToDirectories.end();
++lib)
{
if(lib->second.size() > 0)
{
- this->MultiDirectoryLibraries.push_back(this->FullPathLibraries[lib->first]);
+ this->MultiDirectoryLibraries.push_back
+ (this->FullPathLibraries[lib->first]);
}
else
{
- this->SingleDirectoryLibraries.push_back(this->FullPathLibraries[lib->first]);
+ this->SingleDirectoryLibraries.push_back
+ (this->FullPathLibraries[lib->first]);
}
}
this->FindIndividualLibraryOrders();
@@ -399,7 +408,8 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
if(this->Debug)
{
this->PrintMap("this->LibraryToDirectories", this->LibraryToDirectories);
- this->PrintVector("this->DirectoryToAfterList", this->DirectoryToAfterList);
+ this->PrintVector("this->DirectoryToAfterList",
+ this->DirectoryToAfterList);
}
this->OrderPaths(this->SortedSearchPaths);
// now turn libfoo.a into foo and foo.a into foo
@@ -415,7 +425,11 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
std::string cmOrderLinkDirectories::GetWarnings()
{
- std::string warning = "It is impossible to order the linker search path in such a way that libraries specified as full paths will be picked by the linker.\nDirectories and libraries involved are:\n";
+ std::string warning =
+ "It is impossible to order the linker search path in such a way "
+ "that libraries specified as full paths will be picked by the "
+ "linker.\nDirectories and libraries involved are:\n";
+
for(std::set<cmStdString>::iterator i = this->ImpossibleDirectories.begin();
i != this->ImpossibleDirectories.end(); ++i)
{
@@ -466,9 +480,8 @@ cmOrderLinkDirectories::PrintVector(const char* name,
std::vector<cmStdString> > >& m)
{
std::cout << name << "\n";
- for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i =
- m.begin(); i != m.end();
- ++i)
+ for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
+ >::iterator i = m.begin(); i != m.end(); ++i)
{
std::cout << i->first << ": ";
for(std::vector<cmStdString>::iterator l = i->second.begin();
@@ -483,7 +496,8 @@ cmOrderLinkDirectories::PrintVector(const char* name,
void cmOrderLinkDirectories::GetFullPathLibraries(std::vector<cmStdString>&
libs)
{
- for(std::map<cmStdString, Library>::iterator i = this->FullPathLibraries.begin();
+ for(std::map<cmStdString, Library>::iterator i =
+ this->FullPathLibraries.begin();
i != this->FullPathLibraries.end(); ++i)
{
libs.push_back(i->first);
diff --git a/Source/cmOrderLinkDirectories.h b/Source/cmOrderLinkDirectories.h
index 37c1462..3f42143 100644
--- a/Source/cmOrderLinkDirectories.h
+++ b/Source/cmOrderLinkDirectories.h
@@ -125,7 +125,8 @@ private:
// map from library to directories that it is in other than its full path
std::map<cmStdString, std::vector<cmStdString> > LibraryToDirectories;
// map from directory to vector of directories that must be after it
- std::vector<std::pair<cmStdString, std::vector<cmStdString> > > DirectoryToAfterList;
+ std::vector<std::pair<cmStdString, std::vector<cmStdString> > >
+ DirectoryToAfterList;
std::set<cmStdString> DirectoryToAfterListEmitted;
// map from full path to a Library struct
std::map<cmStdString, Library> FullPathLibraries;
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index 600e008..1a92249 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -176,7 +176,8 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
}
// cmOutputRequiredFilesCommand
-bool cmOutputRequiredFilesCommand::InitialPass(std::vector<std::string> const& args)
+bool cmOutputRequiredFilesCommand
+::InitialPass(std::vector<std::string> const& args)
{
if(args.size() != 2 )
{
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index bdbafbf..2418bad 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -31,10 +31,12 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args)
std::string srcdir = args[0];
srcdir += "_SOURCE_DIR";
- this->Makefile->AddCacheDefinition(bindir.c_str(),
+ this->Makefile->AddCacheDefinition
+ (bindir.c_str(),
this->Makefile->GetCurrentOutputDirectory(),
"Value Computed by CMake", cmCacheManager::STATIC);
- this->Makefile->AddCacheDefinition(srcdir.c_str(),
+ this->Makefile->AddCacheDefinition
+ (srcdir.c_str(),
this->Makefile->GetCurrentDirectory(),
"Value Computed by CMake", cmCacheManager::STATIC);
diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx
index 0ddf382..8a590a7 100644
--- a/Source/cmQTWrapCPPCommand.cxx
+++ b/Source/cmQTWrapCPPCommand.cxx
@@ -57,9 +57,11 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn)
{
file.SetProperty("ABSTRACT",curr->GetProperty("ABSTRACT"));
}
- std::string srcName = cmSystemTools::GetFilenameWithoutLastExtension(*j);
+ std::string srcName =
+ cmSystemTools::GetFilenameWithoutLastExtension(*j);
std::string newName = "moc_" + srcName;
- file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(),
+ file.SetName(newName.c_str(),
+ this->Makefile->GetCurrentOutputDirectory(),
"cxx",false);
std::string hname;
if ( (*j)[0] == '/' || (*j)[1] == ':' )
@@ -70,7 +72,8 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn)
{
if ( curr && curr->GetPropertyAsBool("GENERATED") )
{
- hname = std::string( this->Makefile->GetCurrentOutputDirectory() ) + "/" + *j;
+ hname = std::string(this->Makefile->GetCurrentOutputDirectory())
+ + "/" + *j;
}
else
{
@@ -89,7 +92,8 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn)
}
}
- this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str());
+ this->Makefile->AddDefinition(this->SourceList.c_str(),
+ sourceListValue.c_str());
return true;
}
@@ -99,7 +103,8 @@ void cmQTWrapCPPCommand::FinalPass()
// first we add the rules for all the .h to Moc files
size_t lastClass = this->WrapClasses.size();
std::vector<std::string> depends;
- const char* moc_exe = this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE");
+ const char* moc_exe =
+ this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE");
// wrap all the .h files
depends.push_back(moc_exe);
diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx
index 717459c..9bec97f 100644
--- a/Source/cmQTWrapUICommand.cxx
+++ b/Source/cmQTWrapUICommand.cxx
@@ -75,7 +75,8 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn)
{
if ( curr && curr->GetPropertyAsBool("GENERATED") )
{
- origname = std::string( this->Makefile->GetCurrentOutputDirectory() ) + "/" + *j;
+ origname = std::string(this->Makefile->GetCurrentOutputDirectory())
+ + "/" + *j;
}
else
{
@@ -114,8 +115,10 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn)
}
}
- this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str());
- this->Makefile->AddDefinition(this->HeaderList.c_str(), headerListValue.c_str());
+ this->Makefile->AddDefinition(this->SourceList.c_str(),
+ sourceListValue.c_str());
+ this->Makefile->AddDefinition(this->HeaderList.c_str(),
+ headerListValue.c_str());
return true;
}
@@ -125,8 +128,10 @@ void cmQTWrapUICommand::FinalPass()
// first we add the rules for all the .ui to .h and .cxx files
size_t lastHeadersClass = this->WrapHeadersClasses.size();
std::vector<std::string> depends;
- const char* uic_exe = this->Makefile->GetRequiredDefinition("QT_UIC_EXECUTABLE");
- const char* moc_exe = this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE");
+ const char* uic_exe =
+ this->Makefile->GetRequiredDefinition("QT_UIC_EXECUTABLE");
+ const char* moc_exe =
+ this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE");
// wrap all the .h files
depends.push_back(uic_exe);
diff --git a/Source/cmRemoveDefinitionsCommand.cxx b/Source/cmRemoveDefinitionsCommand.cxx
index 918b1f4..7641171 100644
--- a/Source/cmRemoveDefinitionsCommand.cxx
+++ b/Source/cmRemoveDefinitionsCommand.cxx
@@ -17,7 +17,8 @@
#include "cmRemoveDefinitionsCommand.h"
// cmRemoveDefinitionsCommand
-bool cmRemoveDefinitionsCommand::InitialPass(std::vector<std::string> const& args)
+bool cmRemoveDefinitionsCommand
+::InitialPass(std::vector<std::string> const& args)
{
// it is OK to have no arguments
if(args.size() < 1 )
diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx
index 17e08a9..44ad5be 100644
--- a/Source/cmSeparateArgumentsCommand.cxx
+++ b/Source/cmSeparateArgumentsCommand.cxx
@@ -17,7 +17,8 @@
#include "cmSeparateArgumentsCommand.h"
// cmSeparateArgumentsCommand
-bool cmSeparateArgumentsCommand::InitialPass(std::vector<std::string> const& args)
+bool cmSeparateArgumentsCommand
+::InitialPass(std::vector<std::string> const& args)
{
if(args.size() != 1 )
{
diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h
index 4be21f6..a86b704 100644
--- a/Source/cmSeparateArgumentsCommand.h
+++ b/Source/cmSeparateArgumentsCommand.h
@@ -56,7 +56,8 @@ public:
*/
virtual const char* GetTerseDocumentation()
{
- return "Split space separated arguments into a semi-colon separated list.";
+ return
+ "Split space separated arguments into a semi-colon separated list.";
}
/**
diff --git a/Source/cmSetDirectoryPropertiesCommand.cxx b/Source/cmSetDirectoryPropertiesCommand.cxx
index 3fb1178..e329e37 100644
--- a/Source/cmSetDirectoryPropertiesCommand.cxx
+++ b/Source/cmSetDirectoryPropertiesCommand.cxx
@@ -42,12 +42,14 @@ bool cmSetDirectoryPropertiesCommand::InitialPass(
const std::string& value = *(ait+1);
if ( prop == "VARIABLES" )
{
- this->SetError("Variables and cache variables should be set using SET command");
+ this->SetError
+ ("Variables and cache variables should be set using SET command");
return false;
}
else if ( prop == "MACROS" )
{
- this->SetError("Commands and macros cannot be set using SET_CMAKE_PROPERTIES");
+ this->SetError
+ ("Commands and macros cannot be set using SET_CMAKE_PROPERTIES");
return false;
}
else if ( prop == "INCLUDE_DIRECTORIES" )
@@ -71,7 +73,8 @@ bool cmSetDirectoryPropertiesCommand::InitialPass(
if ( prop == "ADDITIONAL_MAKE_CLEAN_FILES" )
{
// This property is not inherrited
- if ( strcmp(this->Makefile->GetCurrentDirectory(), this->Makefile->GetStartDirectory()) != 0 )
+ if ( strcmp(this->Makefile->GetCurrentDirectory(),
+ this->Makefile->GetStartDirectory()) != 0 )
{
continue;
}
diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h
index 99c032c..c1501f9 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.h
+++ b/Source/cmSetSourceFilesPropertiesCommand.h
@@ -60,11 +60,12 @@ public:
"to change, and then provide the values you want to set next. You "
"can make up your own properties as well. "
"The following are used by CMake. "
- "The ABSTRACT flag (boolean) is used by some class wrapping commands. "
+ "The ABSTRACT flag (boolean) is used by some class wrapping "
+ "commands. "
"If WRAP_EXCLUDE (boolean) is true then many wrapping commands "
- "will ignore this file. "
- "If GENERATED (boolean) is true then it is not an error if this "
- "source file does not exist when it is added to a target. Obviously, "
+ "will ignore this file. If GENERATED (boolean) is true then it "
+ "is not an error if this source file does not exist when it is "
+ "added to a target. Obviously, "
"it must be created (presumably by a custom command) before the "
"target is built. "
"If the HEADER_FILE_ONLY (boolean) property is true then dependency "
diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx
index abf3daf..cb7d60e 100644
--- a/Source/cmSetTargetPropertiesCommand.cxx
+++ b/Source/cmSetTargetPropertiesCommand.cxx
@@ -59,13 +59,15 @@ bool cmSetTargetPropertiesCommand::InitialPass(
}
else
{
- this->SetError("called with illegal arguments, maybe missing a PROPERTIES specifier?");
+ this->SetError("called with illegal arguments, maybe missing "
+ "a PROPERTIES specifier?");
return false;
}
}
if(propertyPairs.size() == 0)
{
- this->SetError("called with illegal arguments, maybe missing a PROPERTIES specifier?");
+ this->SetError("called with illegal arguments, maybe missing "
+ "a PROPERTIES specifier?");
return false;
}
@@ -83,7 +85,8 @@ bool cmSetTargetPropertiesCommand::InitialPass(
// now loop through all the props and set them
for (k = 0; k < propertyPairs.size(); k = k + 2)
{
- target.SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str());
+ target.SetProperty(propertyPairs[k].c_str(),
+ propertyPairs[k+1].c_str());
}
}
// if file is not already in the makefile, then add it
diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h
index 91d320e..9bd3483 100644
--- a/Source/cmSetTargetPropertiesCommand.h
+++ b/Source/cmSetTargetPropertiesCommand.h
@@ -81,8 +81,9 @@ public:
"variable for executables)."
"\n"
"The LINK_FLAGS property can be used to add extra flags to the "
- "link step of a target. LINK_FLAGS_<CONFIG> will add to the configuration "
- "<CONFIG>, for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO. "
+ "link step of a target. LINK_FLAGS_<CONFIG> will add to the "
+ "configuration <CONFIG>, "
+ "for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO. "
"DEFINE_SYMBOL sets the name of the preprocessor symbol defined when "
"compiling sources in a shared library. "
"If not set here then it is set to target_EXPORTS by default "
diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx
index c39f722..f1f571a 100644
--- a/Source/cmSetTestsPropertiesCommand.cxx
+++ b/Source/cmSetTestsPropertiesCommand.cxx
@@ -62,13 +62,15 @@ bool cmSetTestsPropertiesCommand::InitialPass(
}
else
{
- this->SetError("called with illegal arguments, maybe missing a PROPERTIES specifier?");
+ this->SetError("called with illegal arguments, maybe "
+ "missing a PROPERTIES specifier?");
return false;
}
}
if(propertyPairs.size() == 0)
{
- this->SetError("called with illegal arguments, maybe missing a PROPERTIES specifier?");
+ this->SetError("called with illegal arguments, maybe "
+ "missing a PROPERTIES specifier?");
return false;
}
@@ -89,7 +91,8 @@ bool cmSetTestsPropertiesCommand::InitialPass(
// now loop through all the props and set them
for (k = 0; k < propertyPairs.size(); k = k + 2)
{
- test->SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str());
+ test->SetProperty(propertyPairs[k].c_str(),
+ propertyPairs[k+1].c_str());
}
found = true;
break;
diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h
index e1bc069..d01d622 100644
--- a/Source/cmSetTestsPropertiesCommand.h
+++ b/Source/cmSetTestsPropertiesCommand.h
@@ -54,8 +54,8 @@ public:
return
" SET_TESTS_PROPERTIES(test1 [test2...] PROPERTIES prop1 value1 prop2"
" value2)\n"
- "Set a property for the tests. If the property is not found, CMake will "
- "report an error. The properties include:\n"
+ "Set a property for the tests. If the property is not found, CMake "
+ "will report an error. The properties include:\n"
"WILL_FAIL: If set to true, this will invert the pass/fail flag of the"
" test.\n"
"PASS_REGULAR_EXPRESSION: If set, the test output will be checked "
@@ -66,8 +66,8 @@ public:
"FAIL_REGULAR_EXPRESSION: If set, if the output will match to one of "
"specified regular expressions, the test will fail.\n"
" Example: PASS_REGULAR_EXPRESSION \"[^a-z]Error;ERROR;Failed\"\n"
- "Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a list "
- "of regular expressions.\n";
+ "Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a "
+ "list of regular expressions.\n";
}
cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand);
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index 845a40d..7e2e87e 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -55,9 +55,9 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args)
std::string siteName = "unknown";
#if defined(_WIN32) && !defined(__CYGWIN__)
std::string host;
- if(cmSystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\ComputerName\\ComputerName;ComputerName",
- host))
+ if(cmSystemTools::ReadRegistryValue
+ ("HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\"
+ "Control\\ComputerName\\ComputerName;ComputerName", host))
{
siteName = host;
}
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 7ab15ba..7f2c663 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -65,8 +65,8 @@ bool cmSourceFile::SetName(const char* name, const char* dir,
}
// See if the file is a header file
- if(std::find( headerExts.begin(), headerExts.end(), this->SourceExtension ) ==
- headerExts.end())
+ if(std::find( headerExts.begin(), headerExts.end(),
+ this->SourceExtension ) == headerExts.end())
{
this->SetProperty("HEADER_FILE_ONLY","0");
}
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 3f81ea7..c8391e2 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -93,7 +93,8 @@ public:
/**
* The file extension associated with source file
*/
- const std::string &GetSourceExtension() const {return this->SourceExtension;}
+ const std::string &GetSourceExtension() const {
+ return this->SourceExtension;}
void SetSourceExtension(const char *name) {this->SourceExtension = name;}
/**
diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h
index c202d24..0b95605 100644
--- a/Source/cmSourceGroupCommand.h
+++ b/Source/cmSourceGroupCommand.h
@@ -61,7 +61,8 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " SOURCE_GROUP(name [REGULAR_EXPRESSION regex] [FILES src1 src2 ...])\n"
+ " SOURCE_GROUP(name [REGULAR_EXPRESSION regex] "
+ "[FILES src1 src2 ...])\n"
"Defines a group into which sources will be placed in project files. "
"This is mainly used to setup file tabs in Visual Studio. "
"Any file whose name is listed or matches the regular expression will "
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 779c6ad..24d034d 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -587,7 +587,8 @@ bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const&
}
//----------------------------------------------------------------------------
-bool cmStringCommand::HandleLengthCommand(std::vector<std::string> const& args)
+bool cmStringCommand
+::HandleLengthCommand(std::vector<std::string> const& args)
{
if(args.size() != 3)
{
diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx
index 66d1829..207dfec 100644
--- a/Source/cmSubdirCommand.cxx
+++ b/Source/cmSubdirCommand.cxx
@@ -43,7 +43,8 @@ bool cmSubdirCommand::InitialPass(std::vector<std::string> const& args)
}
// if they specified a relative path then compute the full
- std::string srcPath = std::string(this->Makefile->GetCurrentDirectory()) +
+ std::string srcPath =
+ std::string(this->Makefile->GetCurrentDirectory()) +
"/" + i->c_str();
if (cmSystemTools::FileIsDirectory(srcPath.c_str()))
{
diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h
index 73b5bce..71cc31e 100644
--- a/Source/cmSubdirCommand.h
+++ b/Source/cmSubdirCommand.h
@@ -62,8 +62,8 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " SUBDIRS(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]"
- " [PREORDER] )\n"
+ " SUBDIRS(dir1 dir2 ..."
+ "[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...] [PREORDER] )\n"
"Add a list of subdirectories to the build. The ADD_SUBDIRECTORY "
"command should be used instead of SUBDIRS although SUBDIRS will "
"still work. "
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index e25ce13..bc9af6a 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -84,7 +84,8 @@ const char* cmSystemTools::GetWindows9xComspecSubstitute()
return cmSystemTools::s_Windows9xComspecSubstitute.c_str();
}
-void (*cmSystemTools::s_ErrorCallback)(const char*, const char*, bool&, void*);
+void (*cmSystemTools::s_ErrorCallback)(const char*, const char*,
+ bool&, void*);
void (*cmSystemTools::s_StdoutCallback)(const char*, int len, void*);
void* cmSystemTools::s_ErrorCallbackClientData = 0;
void* cmSystemTools::s_StdoutCallbackClientData = 0;
@@ -1254,8 +1255,8 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote)
}
if(!cmSystemTools::FileIsFullPath(remote))
{
- cmSystemTools::Error("RelativePath must be passed a full path to remote: ",
- remote);
+ cmSystemTools::Error
+ ("RelativePath must be passed a full path to remote: ", remote);
}
return cmsys::SystemTools::RelativePath(local, remote);
}
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 9b3fa68..4997bc3 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -320,7 +320,8 @@ public:
/** Create tar */
static bool ListTar(const char* outFileName,
- std::vector<cmStdString>& files, bool gzip, bool verbose);
+ std::vector<cmStdString>& files,
+ bool gzip, bool verbose);
static bool CreateTar(const char* outFileName,
const std::vector<cmStdString>& files, bool gzip,
bool verbose);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f0132e3..0f34a97 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -38,7 +38,8 @@ void cmTarget::SetType(TargetType type, const char* name)
this->Name = name;
// only add dependency information for library targets
this->TargetTypeValue = type;
- if(this->TargetTypeValue >= STATIC_LIBRARY && this->TargetTypeValue <= MODULE_LIBRARY)
+ if(this->TargetTypeValue >= STATIC_LIBRARY
+ && this->TargetTypeValue <= MODULE_LIBRARY)
{
this->RecordDependencies = true;
}
@@ -182,8 +183,8 @@ void cmTarget::TraceVSDependencies(std::string projFile,
ic != this->GetPostBuildCommands().end(); ++ic)
{
cmCustomCommand &c = *ic;
- for (std::vector<std::string>::const_iterator i = c.GetDepends().begin();
- i != c.GetDepends().end(); ++i)
+ for (std::vector<std::string>::const_iterator i
+ = c.GetDepends().begin(); i != c.GetDepends().end(); ++i)
{
srcFilesToProcess.push(*i);
srcFilesQueued.insert(*i);
@@ -241,7 +242,8 @@ void cmTarget::TraceVSDependencies(std::string projFile,
if (srcFilesQueued.find(outsf->GetCustomCommand()->GetDepends()[i])
== srcFilesQueued.end())
{
- srcFilesToProcess.push(outsf->GetCustomCommand()->GetDepends()[i]);
+ srcFilesToProcess.push
+ (outsf->GetCustomCommand()->GetDepends()[i]);
srcFilesQueued.insert(outsf->GetCustomCommand()->GetDepends()[i]);
}
}
@@ -380,7 +382,8 @@ const std::vector<std::string>& cmTarget::GetLinkDirectories()
// is an N^2 algorithm for adding the directories, but N
// should not get very big.
const char* libpath = tgt->GetDirectory();
- if(std::find(this->LinkDirectories.begin(), this->LinkDirectories.end(),
+ if(std::find(this->LinkDirectories.begin(),
+ this->LinkDirectories.end(),
libpath) == this->LinkDirectories.end())
{
this->LinkDirectories.push_back(libpath);
@@ -396,7 +399,8 @@ const std::vector<std::string>& cmTarget::GetLinkDirectories()
return this->LinkDirectories;
}
-void cmTarget::ClearDependencyInformation( cmMakefile& mf, const char* target )
+void cmTarget::ClearDependencyInformation( cmMakefile& mf,
+ const char* target )
{
// Clear the dependencies. The cache variable must exist iff we are
// recording dependency information for this target.
@@ -627,7 +631,8 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
// 1. Build the dependency graph
//
- for(LinkLibraryVectorType::reverse_iterator lib = this->LinkLibraries.rbegin();
+ for(LinkLibraryVectorType::reverse_iterator lib
+ = this->LinkLibraries.rbegin();
lib != this->LinkLibraries.rend(); ++lib)
{
this->GatherDependencies( mf, lib->first, dep_map );
@@ -838,10 +843,12 @@ const char* cmTarget::GetDirectory(const char* config)
case cmTarget::STATIC_LIBRARY:
case cmTarget::MODULE_LIBRARY:
case cmTarget::SHARED_LIBRARY:
- this->Directory = this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
+ this->Directory =
+ this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
break;
case cmTarget::EXECUTABLE:
- this->Directory = this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
+ this->Directory =
+ this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
break;
default:
return 0;
@@ -963,7 +970,8 @@ const char* cmTarget::GetLinkerLanguage(cmGlobalGenerator* gg)
return linkerLang;
}
std::set<cmStdString> languages;
- for(std::vector<cmSourceFile*>::const_iterator i = this->SourceFiles.begin();
+ for(std::vector<cmSourceFile*>::const_iterator i
+ = this->SourceFiles.begin();
i != this->SourceFiles.end(); ++i)
{
const char* lang =
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 736bad5..7980218 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -60,7 +60,8 @@ public:
*/
bool IsInAll() { return this->GetPropertyAsBool("IN_ALL"); }
bool GetInAll() { return this->GetPropertyAsBool("IN_ALL"); }
- void SetInAll(bool f) { this->SetProperty("IN_ALL", (f) ?"TRUE" : "FALSE"); }
+ void SetInAll(bool f) {
+ this->SetProperty("IN_ALL", (f) ?"TRUE" : "FALSE"); }
///! Set the cmMakefile that owns this target
void SetMakefile(cmMakefile *mf);
@@ -96,7 +97,8 @@ public:
typedef std::vector<std::pair<std::string,LinkLibraryType> >
LinkLibraryVectorType;
- const LinkLibraryVectorType &GetLinkLibraries() {return this->LinkLibraries;}
+ const LinkLibraryVectorType &GetLinkLibraries() {
+ return this->LinkLibraries;}
const LinkLibraryVectorType &GetOriginalLinkLibraries()
{return this->OriginalLinkLibraries;}
@@ -133,7 +135,8 @@ public:
* installed. This is relative to INSTALL_PREFIX
*/
std::string GetRuntimeInstallPath() {return this->RuntimeInstallPath;}
- void SetRuntimeInstallPath(const char *name) {this->RuntimeInstallPath = name;}
+ void SetRuntimeInstallPath(const char *name) {
+ this->RuntimeInstallPath = name;}
/**
* Get/Set whether there is an install rule for this target.
@@ -189,7 +192,8 @@ public:
/** Get the full name of the target according to the settings in its
makefile. */
std::string GetFullName(const char* config=0, bool implib = false);
- void GetFullName(std::string& prefix, std::string& base, std::string& suffix,
+ void GetFullName(std::string& prefix,
+ std::string& base, std::string& suffix,
const char* config=0, bool implib = false);
/** Get the full path to the target according to the settings in its
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 4753bd8..af5ecb1 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -43,7 +43,8 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string>
++i;
if(i == args.end())
{
- this->SetError("The \"debug\" argument must be followed by a library");
+ this->SetError
+ ("The \"debug\" argument must be followed by a library");
return false;
}
this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(),
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index e524b77..c7405ca 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -167,7 +167,8 @@ int cmTryCompileCommand::CoreTryCompileCode(
<< source << "\". TRY_COMPILE only works for enabled languages.\n"
<< "Currently enabled languages are:";
std::vector<std::string> langs;
- mf->GetCMakeInstance()->GetGlobalGenerator()->GetEnabledLanguages(langs);
+ mf->GetCMakeInstance()->GetGlobalGenerator()->
+ GetEnabledLanguages(langs);
for(std::vector<std::string>::iterator l = langs.begin();
l != langs.end(); ++l)
{
diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h
index 8ff2b78..ed3e0c6 100644
--- a/Source/cmTryCompileCommand.h
+++ b/Source/cmTryCompileCommand.h
@@ -77,16 +77,16 @@ public:
" TRY_COMPILE(RESULT_VAR bindir srcdir\n"
" projectName <targetname> <CMAKE_FLAGS <Flags>>\n"
" <OUTPUT_VARIABLE var>)\n"
- "Try compiling a program. Return the success or failure in RESULT_VAR. "
- "If <target name> is specified then build just that target "
+ "Try compiling a program. Return the success or failure in "
+ "RESULT_VAR. If <target name> is specified then build just that target "
"otherwise the all or ALL_BUILD target is built.\n"
" TRY_COMPILE(RESULT_VAR bindir srcfile\n"
" <CMAKE_FLAGS <Flags>>\n"
" <COMPILE_DEFINITIONS <flags> ...>\n"
" <OUTPUT_VARIABLE var>)\n"
- "Try compiling a srcfile. Return the success or failure in RESULT_VAR. "
- "CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags to cmake. Some "
- "extra flags that can be included are, "
+ "Try compiling a srcfile. Return the success or failure in "
+ "RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags "
+ "to cmake. Some extra flags that can be included are, "
"INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES. "
"COMPILE_DEFINITIONS are -Ddefinition that will be passed to the "
"compile line. If srcfile is specified the files in "
@@ -95,7 +95,8 @@ public:
"output from the build process is stored in the given variable. "
"TRY_COMPILE creates a CMakeList.txt "
"file on the fly, and in that file it looks like this:\n"
- " ADD_DEFINITIONS( <expanded COMPILE_DEFINITIONS from calling cmake>)\n"
+ " ADD_DEFINITIONS( <expanded COMPILE_DEFINITIONS from calling "
+ "cmake>)\n"
" INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n"
" LINK_DIRECTORIES(${LINK_DIRECTORIES})\n"
" ADD_EXECUTABLE(cmTryCompileExec sources)\n"
diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx
index 8699188..0e73cef 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -20,7 +20,8 @@
#include <cmsys/RegularExpression.hxx>
// cmUseMangledMesaCommand
-bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args)
+bool cmUseMangledMesaCommand
+::InitialPass(std::vector<std::string> const& args)
{
// expected two arguments:
// arguement one: the full path to gl_mangle.h
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index 0bb0c1d..5160189 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -34,7 +34,8 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args)
// If it exists already and appears up to date then we are done. If
// the string contains "(IntDir)" but that is not the
// CMAKE_CFG_INTDIR setting then the value is out of date.
- const char* intDir = this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR");
+ const char* intDir =
+ this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR");
if(cacheValue &&
(strstr(cacheValue, "(IntDir)") == 0 ||
intDir && strcmp(intDir, "$(IntDir)") == 0) &&
diff --git a/Source/cmVTKMakeInstantiatorCommand.cxx b/Source/cmVTKMakeInstantiatorCommand.cxx
index acccd2b..f39c6b5 100644
--- a/Source/cmVTKMakeInstantiatorCommand.cxx
+++ b/Source/cmVTKMakeInstantiatorCommand.cxx
@@ -238,7 +238,8 @@ cmVTKMakeInstantiatorCommand
// Write the instantiator class definition.
os <<
"\n"
- "class " << this->ExportMacro.c_str() << " " << this->ClassName.c_str() << "\n"
+ "class " << this->ExportMacro.c_str()
+ << " " << this->ClassName.c_str() << "\n"
"{\n"
"public:\n"
" " << this->ClassName.c_str() << "();\n"
@@ -388,7 +389,8 @@ cmVTKMakeInstantiatorCommand
"\n"
"class " << this->ClassName.c_str() << "Initialize;\n"
"\n"
- "class " << this->ExportMacro.c_str() << " " << this->ClassName.c_str() << "\n"
+ "class " << this->ExportMacro.c_str() << " "
+ << this->ClassName.c_str() << "\n"
"{\n"
" friend class " << this->ClassName.c_str() << "Initialize;\n"
"\n"
@@ -398,7 +400,8 @@ cmVTKMakeInstantiatorCommand
for(unsigned int i=0;i < this->Classes.size();++i)
{
- os << " static vtkObject* Create_" << this->Classes[i].c_str() << "();\n";
+ os << " static vtkObject* Create_"
+ << this->Classes[i].c_str() << "();\n";
}
// Write the initializer class to make sure the creation functions
@@ -425,8 +428,7 @@ cmVTKMakeInstantiatorCommand
// Generates the file with the implementation of the class. All
// methods except the actual object creation functions are generated
// here.
-void
-cmVTKMakeInstantiatorCommand
+void cmVTKMakeInstantiatorCommand
::OldGenerateImplementationFile(std::ostream& os)
{
// Write the ClassInitialize method to register all the creation functions.
@@ -439,7 +441,8 @@ cmVTKMakeInstantiatorCommand
for(unsigned int i=0;i < this->Classes.size();++i)
{
os << " vtkInstantiator::RegisterInstantiator(\""
- << this->Classes[i].c_str() << "\", " << this->ClassName.c_str() << "::Create_"
+ << this->Classes[i].c_str() << "\", "
+ << this->ClassName.c_str() << "::Create_"
<< this->Classes[i].c_str() << ");\n";
}
@@ -453,7 +456,8 @@ cmVTKMakeInstantiatorCommand
for(unsigned int i=0;i < this->Classes.size();++i)
{
os << " vtkInstantiator::UnRegisterInstantiator(\""
- << this->Classes[i].c_str() << "\", " << this->ClassName.c_str() << "::Create_"
+ << this->Classes[i].c_str() << "\", "
+ << this->ClassName.c_str() << "::Create_"
<< this->Classes[i].c_str() << ");\n";
}
diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx
index 3202169..690ba0a 100644
--- a/Source/cmVTKWrapJavaCommand.cxx
+++ b/Source/cmVTKWrapJavaCommand.cxx
@@ -57,7 +57,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
std::ofstream depFile(depFileName.c_str());
depFile << "# This file is automatically generated by CMake VTK_WRAP_JAVA"
<< std::endl << std::endl;
- depFile << "SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES}" << std::endl;
+ depFile <<
+ "SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES}" << std::endl;
// get the list of classes for this library
for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
@@ -75,8 +76,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
}
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = srcName + "Java";
- file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(),
- "cxx",false);
+ file.SetName(newName.c_str(),
+ this->Makefile->GetCurrentOutputDirectory(), "cxx",false);
std::string hname = cdir + "/" + srcName + ".h";
this->WrapHeaders.push_back(hname);
// add starting depends
@@ -101,7 +102,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
// Finalize java dependency file
depFile << ")" << std::endl;
- this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str());
+ this->Makefile->AddDefinition(this->SourceList.c_str(),
+ sourceListValue.c_str());
return true;
}
diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx
index 886a4ad..fb2653e 100644
--- a/Source/cmVTKWrapPythonCommand.cxx
+++ b/Source/cmVTKWrapPythonCommand.cxx
@@ -76,7 +76,8 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const&
}
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = srcName + "Python";
- file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(),
+ file.SetName(newName.c_str(),
+ this->Makefile->GetCurrentOutputDirectory(),
"cxx",false);
std::string hname = cdir + "/" + srcName + ".h";
this->WrapHeaders.push_back(hname);
@@ -94,7 +95,8 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const&
cfile.SetName(initName.c_str(), this->Makefile->GetCurrentOutputDirectory(),
"cxx",false);
this->Makefile->AddSource(cfile);
- this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str());
+ this->Makefile->AddDefinition(this->SourceList.c_str(),
+ sourceListValue.c_str());
return true;
}
@@ -196,8 +198,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName,
for (i = 0; i < classes.size(); i++)
{
#ifdef _WIN32
- fprintf(fout,
- "extern \"C\" {__declspec( dllexport) PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str());
+ fprintf(fout, "extern \"C\" {__declspec( dllexport) "
+ "PyObject *PyVTKClass_%sNew(char *); }\n", classes[i].c_str());
#else
fprintf(fout,"extern \"C\" {PyObject *PyVTKClass_%sNew(char *); }\n",
classes[i].c_str());
@@ -229,8 +231,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName,
kitName);
fprintf(fout," d = PyModule_GetDict(m);\n");
- fprintf(fout," if (!d) Py_FatalError(\"can't get dictionary for module %s!\");\n\n",
- kitName);
+ fprintf(fout," if (!d) Py_FatalError"
+ "(\"can't get dictionary for module %s!\");\n\n", kitName);
for (i = 0; i < classes.size(); i++)
{
@@ -238,7 +240,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName,
classes[i].c_str());
fprintf(fout," if (-1 == PyDict_SetItemString(d, \"%s\", c))\n",
classes[i].c_str());
- fprintf(fout," Py_FatalError(\"can't add class %s to dictionary!\");\n\n",
+ fprintf(fout,
+ " Py_FatalError(\"can't add class %s to dictionary!\");\n\n",
classes[i].c_str());
}
fprintf(fout,"}\n\n");
diff --git a/Source/cmVTKWrapTclCommand.cxx b/Source/cmVTKWrapTclCommand.cxx
index de4ca9c..425108c 100644
--- a/Source/cmVTKWrapTclCommand.cxx
+++ b/Source/cmVTKWrapTclCommand.cxx
@@ -84,7 +84,8 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
std::string sourceListValue;
// was the list already populated
- const char *def = this->Makefile->GetDefinition(this->SourceList.c_str());
+ const char *def =
+ this->Makefile->GetDefinition(this->SourceList.c_str());
if (def)
{
sourceListValue = def;
@@ -114,7 +115,8 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j);
std::string newName = srcName + "Tcl";
std::string hname = srcDir + "/" + srcName + ".h";
- file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(),
+ file.SetName(newName.c_str(),
+ this->Makefile->GetCurrentOutputDirectory(),
"cxx",false);
this->WrapHeaders.push_back(hname);
// add starting depends
@@ -130,10 +132,12 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
std::string newName = this->LibraryName;
newName += "Init";
this->CreateInitFile(res);
- cfile.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(),
+ cfile.SetName(newName.c_str(),
+ this->Makefile->GetCurrentOutputDirectory(),
"cxx",false);
this->Makefile->AddSource(cfile);
- this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str());
+ this->Makefile->AddDefinition(this->SourceList.c_str(),
+ sourceListValue.c_str());
}
return true;
@@ -144,7 +148,8 @@ void cmVTKWrapTclCommand::FinalPass()
// first we add the rules for all the .h to Tcl.cxx files
size_t lastClass = this->WrapClasses.size();
std::vector<std::string> depends;
- const char* wtcl = this->Makefile->GetRequiredDefinition("VTK_WRAP_TCL_EXE");
+ const char* wtcl =
+ this->Makefile->GetRequiredDefinition("VTK_WRAP_TCL_EXE");
const char* hints = this->Makefile->GetDefinition("VTK_WRAP_HINTS");
// wrap all the .h files
@@ -247,17 +252,22 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName,
fprintf(fout,
"extern \"C\"\n"
"{\n"
- "#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4) && (TCL_RELEASE_LEVEL >= TCL_FINAL_RELEASE)\n"
- " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *,int, CONST84 char *[]);\n"
+ "#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4) "
+ "&& (TCL_RELEASE_LEVEL >= TCL_FINAL_RELEASE)\n"
+ " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *,"
+ "int, CONST84 char *[]);\n"
"#else\n"
- " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *,int, char *[]);\n"
+ " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *,"
+ "int, char *[]);\n"
"#endif\n"
"}\n"
"\n");
for (i = 0; i < classes.size(); i++)
{
- fprintf(fout,"int %sCommand(ClientData cd, Tcl_Interp *interp,\n int argc, char *argv[]);\n",classes[i].c_str());
+ fprintf(fout,"int %sCommand(ClientData cd, Tcl_Interp *interp,\n"
+ ,classes[i].c_str());
+ fprintf(fout," int argc, char *argv[]);\n");
fprintf(fout,"ClientData %sNewCommand();\n",classes[i].c_str());
}
@@ -280,32 +290,37 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName,
fprintf(fout,"extern Tcl_HashTable vtkCommandLookup;\n");
}
fprintf(fout,"extern void vtkTclDeleteObjectFromHash(void *);\n");
- fprintf(fout,"extern void vtkTclListInstances(Tcl_Interp *interp, ClientData arg);\n");
+ fprintf(fout,"extern void vtkTclListInstances(Tcl_Interp *interp,"
+ "ClientData arg);\n");
for (i = 0; i < this->Commands.size(); i++)
{
- fprintf(fout,"\nextern \"C\" {int VTK_EXPORT %s_Init(Tcl_Interp *interp);}\n",
+ fprintf(fout,
+ "\nextern \"C\" {int VTK_EXPORT %s_Init(Tcl_Interp *interp);}\n",
capcommands[i].c_str());
}
- fprintf(fout,"\n\nextern \"C\" {int VTK_EXPORT %s_SafeInit(Tcl_Interp *interp);}\n",
- kitName);
- fprintf(fout,"\nextern \"C\" {int VTK_EXPORT %s_Init(Tcl_Interp *interp);}\n",
- kitName);
+ fprintf(fout,"\n\nextern \"C\" {int VTK_EXPORT "
+ "%s_SafeInit(Tcl_Interp *interp);}\n", kitName);
+ fprintf(fout,"\nextern \"C\" {int VTK_EXPORT %s_Init"
+ "(Tcl_Interp *interp);}\n", kitName);
/* create an extern ref to the generic delete function */
fprintf(fout,"\nextern void vtkTclGenericDeleteObject(ClientData cd);\n");
if (!strcmp(kitName,"Vtkcommontcl"))
{
- fprintf(fout,"extern \"C\"\n{\nvoid vtkCommonDeleteAssocData(ClientData cd)\n");
+ fprintf(fout,"extern \"C\"\n{\nvoid "
+ "vtkCommonDeleteAssocData(ClientData cd)\n");
fprintf(fout," {\n");
- fprintf(fout," vtkTclInterpStruct *tis = static_cast<vtkTclInterpStruct*>(cd);\n");
+ fprintf(fout," vtkTclInterpStruct *tis = "
+ "static_cast<vtkTclInterpStruct*>(cd);\n");
fprintf(fout," delete tis;\n }\n}\n");
}
/* the main declaration */
- fprintf(fout,"\n\nint VTK_EXPORT %s_SafeInit(Tcl_Interp *interp)\n{\n",kitName);
+ fprintf(fout,
+ "\n\nint VTK_EXPORT %s_SafeInit(Tcl_Interp *interp)\n{\n",kitName);
fprintf(fout," return %s_Init(interp);\n}\n",kitName);
fprintf(fout,"\n\nint VTK_EXPORT %s_Init(Tcl_Interp *interp)\n{\n",
@@ -324,14 +339,16 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName,
" Tcl_InitHashTable(&info->PointerLookup, TCL_STRING_KEYS);\n");
fprintf(fout,
" Tcl_InitHashTable(&info->CommandLookup, TCL_STRING_KEYS);\n");
- fprintf(fout,
- " Tcl_SetAssocData(interp,(char *) \"vtk\",NULL,(ClientData *)info);\n");
- fprintf(fout,
- " Tcl_CreateExitHandler(vtkCommonDeleteAssocData,(ClientData *)info);\n");
+ fprintf(fout, " Tcl_SetAssocData(interp,(char *) "
+ "\"vtk\",NULL,(ClientData *)info);\n");
+ fprintf(fout, " Tcl_CreateExitHandler(vtkCommonDeleteAssocData"
+ ",(ClientData *)info);\n");
/* create special vtkCommand command */
- fprintf(fout," Tcl_CreateCommand(interp,(char *) \"vtkCommand\",\n"
- " reinterpret_cast<vtkTclCommandType>(vtkCommandForward),\n"
+ fprintf(fout,
+ " Tcl_CreateCommand(interp,(char *) \"vtkCommand\",\n"
+ " reinterpret_cast<vtkTclCommandType>("
+ "vtkCommandForward),\n"
" (ClientData *)NULL, NULL);\n\n");
}
diff --git a/Source/cmWin32ProcessExecution.h b/Source/cmWin32ProcessExecution.h
index 9f58374..2d5427f 100644
--- a/Source/cmWin32ProcessExecution.h
+++ b/Source/cmWin32ProcessExecution.h
@@ -135,8 +135,10 @@ public:
* will display it in our app. Consequently, we check for input in
* our app and send it off to the write end of the stdin pipe.
*/
- static bool BorlandRunCommand(const char* command, const char* dir,
- std::string& output, int& retVal, bool verbose,
+ static bool BorlandRunCommand(const char* command,
+ const char* dir,
+ std::string& output, int& retVal,
+ bool verbose,
int timeout, bool hideWindows);
private:
diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx
index 8798abb..08d02b8 100644
--- a/Source/cmWriteFileCommand.cxx
+++ b/Source/cmWriteFileCommand.cxx
@@ -83,7 +83,8 @@ bool cmWriteFileCommand::InitialPass(std::vector<std::string> const& args)
}
// If GetPermissions fails, pretend like it is ok. File open will fail if
// the file is not writable
- std::ofstream file(fileName.c_str(), overwrite?std::ios::out : std::ios::app);
+ std::ofstream file(fileName.c_str(),
+ overwrite?std::ios::out : std::ios::app);
if ( !file )
{
std::string error = "Internal CMake error when trying to open file: ";
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index 8103079..0a70d78 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -66,7 +66,8 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference);
- cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFrameworksBuildPhase);
+ cmXCode21Object::PrintList(v, out,
+ cmXCode21Object::PBXFrameworksBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXGroup);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget);
@@ -76,7 +77,8 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXCopyFilesBuildPhase);
- cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference);
+ cmXCode21Object::PrintList(v, out,
+ cmXCode21Object::PBXApplicationReference);
cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXExecutableFileReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference);
diff --git a/Source/cmXCode21Object.h b/Source/cmXCode21Object.h
index 7467dac..752e225 100644
--- a/Source/cmXCode21Object.h
+++ b/Source/cmXCode21Object.h
@@ -8,8 +8,10 @@ class cmXCode21Object : public cmXCodeObject
public:
cmXCode21Object(PBXType ptype, Type type);
virtual void PrintComment(std::ostream&);
- static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out,
+ static void PrintList(std::vector<cmXCodeObject*> const&,
+ std::ostream& out,
PBXType t);
- static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out);
+ static void PrintList(std::vector<cmXCodeObject*> const&,
+ std::ostream& out);
};
#endif
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index bd0d8d6..37d51a5 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -39,7 +39,8 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
}
else
{
- this->Id = "Temporary cmake object, should not be refered to in xcode file";
+ this->Id =
+ "Temporary cmake object, should not be refered to in xcode file";
}
cmSystemTools::ReplaceString(this->Id, "0x", "");
this->Id = cmSystemTools::UpperCase(this->Id);
@@ -73,7 +74,8 @@ void cmXCodeObject::Print(std::ostream& out)
{
std::string separator = "\n";
int indentFactor = 1;
- if(this->Version > 15 && (this->IsA == PBXFileReference || this->IsA == PBXBuildFile))
+ if(this->Version > 15
+ && (this->IsA == PBXFileReference || this->IsA == PBXBuildFile))
{
separator = " ";
indentFactor = 0;
@@ -92,7 +94,8 @@ void cmXCodeObject::Print(std::ostream& out)
std::map<cmStdString, cmXCodeObject*>::iterator i;
cmXCodeObject::Indent(3*indentFactor, out);
out << "isa = " << PBXTypeNames[this->IsA] << ";" << separator;
- for(i = this->ObjectAttributes.begin(); i != this->ObjectAttributes.end(); ++i)
+ for(i = this->ObjectAttributes.begin();
+ i != this->ObjectAttributes.end(); ++i)
{
cmXCodeObject* object = i->second;
if(i->first != "isa")
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h
index 04d1f93..5760ddd 100644
--- a/Source/cmXCodeObject.h
+++ b/Source/cmXCodeObject.h
@@ -51,11 +51,13 @@ public:
}
bool HasObject(cmXCodeObject* o)
{
- return !(std::find(this->List.begin(), this->List.end(), o) == this->List.end());
+ return !(std::find(this->List.begin(), this->List.end(), o)
+ == this->List.end());
}
void AddUniqueObject(cmXCodeObject* value)
{
- if(std::find(this->List.begin(), this->List.end(), value) == this->List.end())
+ if(std::find(this->List.begin(), this->List.end(), value)
+ == this->List.end())
{
this->List.push_back(value);
}
@@ -64,7 +66,8 @@ public:
void Print(std::ostream& out);
virtual void PrintComment(std::ostream&) {};
- static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out);
+ static void PrintList(std::vector<cmXCodeObject*> const&,
+ std::ostream& out);
const char* GetId()
{
return this->Id.c_str();
diff --git a/Source/cmXMLParser.h b/Source/cmXMLParser.h
index cb9b9b7..2c34442 100644
--- a/Source/cmXMLParser.h
+++ b/Source/cmXMLParser.h
@@ -44,18 +44,20 @@ public:
virtual int ParseFile(const char* file);
/**
- * When parsing fragments of XML or streaming XML, use the following three
- * methods. InitializeParser method initialize parser but does not perform
- * any actual parsing. ParseChunk parses framgent of XML. This has to match
- * to what was already parsed. CleanupParser finishes parsing. If there were
- * errors, CleanupParser will report them.
+ * When parsing fragments of XML or streaming XML, use the following
+ * three methods. InitializeParser method initialize parser but does
+ * not perform any actual parsing. ParseChunk parses framgent of
+ * XML. This has to match to what was already parsed. CleanupParser
+ * finishes parsing. If there were errors, CleanupParser will report
+ * them.
*/
virtual int InitializeParser();
virtual int ParseChunk(const char* inputString, unsigned int length);
virtual int CleanupParser();
protected:
- //! This variable is true if there was a parse error while parsing in chunks.
+ //! This variable is true if there was a parse error while parsing in
+ //chunks.
int ParseError;
//1 Expat parser structure. Exists only during call to Parse().
@@ -71,16 +73,15 @@ protected:
virtual int ParsingComplete();
/**
- * Called when a new element is opened in the XML source. Should be replaced
- * by subclasses to handle each element.
- * name = Name of new element.
- * atts = Null-terminated array of attribute name/value pairs. Even
- * indices are attribute names, and odd indices are values.
+ * Called when a new element is opened in the XML source. Should be
+ * replaced by subclasses to handle each element. name = Name of new
+ * element. atts = Null-terminated array of attribute name/value pairs.
+ * Even indices are attribute names, and odd indices are values.
*/
virtual void StartElement(const char* name, const char** atts);
- //! Called at the end of an element in the XML source opened when StartElement
- // was called.
+ //! Called at the end of an element in the XML source opened when
+ //StartElement was called.
virtual void EndElement(const char* name);
//! Called when there is character data to handle.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index cc55aa4..189e153 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1163,10 +1163,12 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
// set the new
this->GlobalGenerator = gg;
- // set the global flag for unix style paths on cmSystemTools as
- // soon as the generator is set. This allows gmake to be used
- // on windows.
- cmSystemTools::SetForceUnixPaths(this->GlobalGenerator->GetForceUnixPaths());
+
+ // set the global flag for unix style paths on cmSystemTools as soon as
+ // the generator is set. This allows gmake to be used on windows.
+ cmSystemTools::SetForceUnixPaths
+ (this->GlobalGenerator->GetForceUnixPaths());
+
// Save the environment variables CXX and CC
const char* cxx = getenv("CXX");
const char* cc = getenv("CC");
@@ -1287,7 +1289,8 @@ int cmake::Configure()
// no generator specified on the command line
if(!this->GlobalGenerator)
{
- const char* genName = this->CacheManager->GetCacheValue("CMAKE_GENERATOR");
+ const char* genName =
+ this->CacheManager->GetCacheValue("CMAKE_GENERATOR");
if(genName)
{
this->GlobalGenerator = this->CreateGlobalGenerator(genName);
@@ -2023,14 +2026,16 @@ const char* cmake::GetCTestCommand()
#ifdef CMAKE_BUILD_WITH_CMAKE
this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CTestCommand = removeQuotes(this->CTestCommand);
- this->CTestCommand = cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
+ this->CTestCommand =
+ cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
this->CTestCommand += "/";
this->CTestCommand += "ctest";
this->CTestCommand += cmSystemTools::GetExecutableExtension();
if(!cmSystemTools::FileExists(this->CTestCommand.c_str()))
{
this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
- this->CTestCommand = cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
+ this->CTestCommand =
+ cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
this->CTestCommand += "/Debug/";
this->CTestCommand += "ctest";
this->CTestCommand += cmSystemTools::GetExecutableExtension();
@@ -2038,7 +2043,8 @@ const char* cmake::GetCTestCommand()
if(!cmSystemTools::FileExists(this->CTestCommand.c_str()))
{
this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
- this->CTestCommand = cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
+ this->CTestCommand =
+ cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
this->CTestCommand += "/Release/";
this->CTestCommand += "ctest";
this->CTestCommand += cmSystemTools::GetExecutableExtension();
@@ -2070,14 +2076,16 @@ const char* cmake::GetCPackCommand()
#ifdef CMAKE_BUILD_WITH_CMAKE
this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CPackCommand = removeQuotes(this->CPackCommand);
- this->CPackCommand = cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
+ this->CPackCommand =
+ cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
this->CPackCommand += "/";
this->CPackCommand += "cpack";
this->CPackCommand += cmSystemTools::GetExecutableExtension();
if(!cmSystemTools::FileExists(this->CPackCommand.c_str()))
{
this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
- this->CPackCommand = cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
+ this->CPackCommand =
+ cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
this->CPackCommand += "/Debug/";
this->CPackCommand += "cpack";
this->CPackCommand += cmSystemTools::GetExecutableExtension();
@@ -2085,7 +2093,8 @@ const char* cmake::GetCPackCommand()
if(!cmSystemTools::FileExists(this->CPackCommand.c_str()))
{
this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
- this->CPackCommand = cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
+ this->CPackCommand =
+ cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
this->CPackCommand += "/Release/";
this->CPackCommand += "cpack";
this->CPackCommand += cmSystemTools::GetExecutableExtension();
@@ -2201,8 +2210,6 @@ void cmake::GenerateGraphViz(const char* fileName)
sprintf(tgtName, "%s%d", graphNodePrefix, cnt++);
targetNamesNodes[realTargetName] = tgtName;
targetPtrs[realTargetName] = &tit->second;
- //str << " \"" << tgtName << "\" [ label=\"" << tit->first.c_str()
- //<< "\" shape=\"box\"];" << std::endl;
}
}
// Ok, now find all the stuff we link to that is not in cmake
diff --git a/Source/cmake.h b/Source/cmake.h
index 18d2587..b2cea7b 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -243,9 +243,9 @@ class cmake
int DoPreConfigureChecks();
/**
- * Set and get the script mode option. In script mode there is no generator
- * and no cache. Also, language are not enabled, so add_executable and things
- * do not do anything.
+ * Set and get the script mode option. In script mode there is no
+ * generator and no cache. Also, language are not enabled, so
+ * add_executable and things do not do anything.
*/
void SetScriptMode(bool mode) { this->ScriptMode = mode; }
bool GetScriptMode() { return this->ScriptMode; }
@@ -311,7 +311,8 @@ protected:
void SetDirectoriesFromFile(const char* arg);
- //! Make sure all commands are what they say they are and there is no macros.
+ //! Make sure all commands are what they say they are and there is no
+ //macros.
void CleanupCommandsAndMacros();
void GenerateGraphViz(const char* fileName);
@@ -366,7 +367,8 @@ private:
{0, \
"CMake is a cross-platform build system generator. Projects " \
"specify their build process with platform-independent CMake listfiles " \
- "included in each directory of a source tree with the name CMakeLists.txt. "\
+ "included in each directory of a source tree with the name " \
+ "CMakeLists.txt. " \
"Users build a project by using CMake to generate a build system " \
"for a native tool on their platform.", 0}
#endif
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 039108d..bb01116 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -45,7 +45,8 @@ static const cmDocumentationEntry cmDocumentationDescription[] =
{
{0,
"The \"cmake\" executable is the CMake command-line interface. It may "
- "be used to configure projects in scripts. Project configuration settings "
+ "be used to configure projects in scripts. Project configuration "
+ "settings "
"may be specified on the command line with the -D option. The -i option "
"will cause cmake to interactively prompt for such settings.", 0},
CMAKE_STANDARD_INTRODUCTION,
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 92fa7ef..81ade76 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -92,7 +92,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# (BEFORE is for coverage)
#
INCLUDE_DIRECTORIES(
- ${Complex_SOURCE_DIR}/Library
+ Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 92fa7ef..81ade76 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -92,7 +92,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# (BEFORE is for coverage)
#
INCLUDE_DIRECTORIES(
- ${Complex_SOURCE_DIR}/Library
+ Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index 92fa7ef..81ade76 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/CMakeLists.txt
@@ -92,7 +92,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# (BEFORE is for coverage)
#
INCLUDE_DIRECTORIES(
- ${Complex_SOURCE_DIR}/Library
+ Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)