Commit 3d4c7887 authored by Bill Hoffman's avatar Bill Hoffman

ENH: merge from main tree

parent 401922e0
......@@ -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)
......
......@@ -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} )
......
......@@ -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)
......@@ -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}
......
......@@ -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,
......
......@@ -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();
......
......@@ -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();
}
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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,
......
......@@ -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);
......
......@@ -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();}
......
......@@ -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;
......
......@@ -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 )
{
......
......@@ -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(),
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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))
{
......
......@@ -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.";
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -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&);
......
......@@ -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))
{
......
......@@ -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;
};
......
This diff is collapsed.
......@@ -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);
/**
......
......@@ -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