Commit 3dc60d33 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: merge in changes from CVS to branch for 2.6.3 RC 8

parent 5ce848d7
......@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 3)
SET(CMake_VERSION_RC 7)
SET(CMake_VERSION_RC 8)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
......
Changes in CMake 2.6.3 RC 8
- CMAKE_VERBOSE_MAKEFILE fix for KDevelop3
- FindGettext.cmake fix #8122
- FindPythonInterp.cmake find python 2.6 on windows
- cmake_minimum_required forward compatibility
- Fix (#7289) in cmDocumentationFormatterDocbook.cxx
- Fix #8203: codeblocks + mingw quoting issue
- Clean per-config export files during install
- Bug fixes for Eclipse CDT4 generator
- find_package refind when previously found file is removed
- Support '-' in target names for VS6
- Fix component-name test on installation
- Warn when build directory is too long
- Fix set cache FORCE and -D command line to work together
- Enable LOCATION property for imported targets
- Allow cmake-gui to be built by cmake 2.4
- Fix installation from read-only source file
- Fix for rc and vs6 -D flags
- Create DEBUG_CONFIGURATIONS global property
Changes in CMake 2.6.3 RC 7
- Add both 32/64-bit Program Files as windows paths
......
......@@ -26,11 +26,7 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
SET(CMAKE_INIT_VALUE FALSE)
IF(CMAKE_GENERATOR MATCHES "KDevelop3")
SET(CMAKE_INIT_VALUE TRUE)
ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3")
SET(CMAKE_VERBOSE_MAKEFILE ${CMAKE_INIT_VALUE} CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
......
......@@ -29,7 +29,7 @@ IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
MESSAGE("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
"Please send that file to cmake@www.cmake.org.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)
......
......@@ -18,7 +18,9 @@ FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile)
MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
# make it a real variable, so we can modify it here
SET(_firstPoFile "${_firstPoFileArg}")
SET(_gmoFiles)
GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE)
......
......@@ -9,6 +9,7 @@
FIND_PROGRAM(PYTHON_EXECUTABLE
NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
......
......@@ -359,10 +359,10 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
out << "Run test in directory: " << this->BuildRunDir << "\n";
cmSystemTools::ChangeDirectory(this->BuildRunDir.c_str());
}
out << "Running test executable: " << fullPath << " ";
out << "Running test command: \"" << fullPath << "\"";
for(k=0; k < this->TestCommandArgs.size(); ++k)
{
out << this->TestCommandArgs[k] << " ";
out << " \"" << this->TestCommandArgs[k] << "\"";
}
out << "\n";
......@@ -386,7 +386,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
if(runTestRes != cmsysProcess_State_Exited || retval != 0)
{
out << "Failed to run test command: " << testCommand[0] << "\n";
out << "Test command failed: " << testCommand[0] << "\n";
retval = 1;
}
......
......@@ -165,7 +165,8 @@ static cmCTestBuildCompileErrorWarningRex
cmCTestWarningErrorFileLine[] = {
{ "^Warning W[0-9]+ ([a-zA-Z.\\:/0-9_+ ~-]+) ([0-9]+):", 1, 2 },
{ "^([a-zA-Z./0-9_+ ~-]+):([0-9]+):", 1, 2 },
{ "^([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "^([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "^[0-9]+>([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 },
{ "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2 },
......
......@@ -180,6 +180,46 @@ private:
//**********************************************************************
//----------------------------------------------------------------------
class cmCTestUpdateHandlerLocale
{
public:
cmCTestUpdateHandlerLocale();
~cmCTestUpdateHandlerLocale();
private:
std::string saveLCMessages;
};
cmCTestUpdateHandlerLocale::cmCTestUpdateHandlerLocale()
{
const char* lcmess = cmSystemTools::GetEnv("LC_MESSAGES");
if(lcmess)
{
saveLCMessages = lcmess;
}
// if LC_MESSAGES is not set to C, then
// set it, so that svn/cvs info will be in english ascii
if(! (lcmess && strcmp(lcmess, "C") == 0))
{
cmSystemTools::PutEnv("LC_MESSAGES=C");
}
}
cmCTestUpdateHandlerLocale::~cmCTestUpdateHandlerLocale()
{
// restore the value of LC_MESSAGES after running the version control
// commands
if(saveLCMessages.size())
{
std::string put = "LC_MESSAGES=";
put += saveLCMessages;
cmSystemTools::PutEnv(put.c_str());
}
else
{
cmSystemTools::UnsetEnv("LC_MESSAGES");
}
}
//----------------------------------------------------------------------
cmCTestUpdateHandler::cmCTestUpdateHandler()
{
......@@ -252,19 +292,10 @@ int cmCTestUpdateHandler::ProcessHandler()
std::string goutput;
std::string errors;
// make sure
std::string saveLCMessages;
const char* lcmess = cmSystemTools::GetEnv("LC_MESSAGES");
if(lcmess)
{
saveLCMessages = lcmess;
}
// if LC_MESSAGES is not set to C, then
// set it, so that svn/cvs info will be in english ascii
if(! (lcmess && strcmp(lcmess, "C") == 0))
{
cmSystemTools::PutEnv("LC_MESSAGES=C");
}
// Make sure VCS tool messages are in English so we can parse them.
cmCTestUpdateHandlerLocale fixLocale;
static_cast<void>(fixLocale);
std::string checkoutErrorMessages;
int retVal = 0;
......@@ -332,7 +363,7 @@ int cmCTestUpdateHandler::ProcessHandler()
}
if(!this->CTest->InitializeFromCommand(this->Command))
{
cmCTestLog(this->CTest, HANDLER_OUTPUT,
cmCTestLog(this->CTest, HANDLER_OUTPUT,
" Fatal Error in initialize: "
<< std::endl);
cmSystemTools::SetFatalErrorOccured();
......@@ -1122,18 +1153,6 @@ int cmCTestUpdateHandler::ProcessHandler()
}
os << "</UpdateReturnStatus>" << std::endl;
os << "</Update>" << std::endl;
// restore the value of LC_MESSAGES after running the version control
// commands
if(saveLCMessages.size())
{
std::string put = "LC_MESSAGES=";
put += saveLCMessages;
cmSystemTools::PutEnv(put.c_str());
}
else
{
cmSystemTools::UnsetEnv("LC_MESSAGES");
}
if (! res )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
......
......@@ -72,6 +72,11 @@ ELSE(NOT QT4_FOUND)
ENDIF(APPLE)
SET(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# Since the built CMake will install itself instead of the
# generating CMake, tell it that the install rules were generated
# by CMake 2.4.
INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)")
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# if qt is not static and we are on windows then skip the install
# I don't want to distribute qt dlls
......
......@@ -39,7 +39,7 @@
</widget>
</item>
<item row="0" column="1" >
<widget class="QCMakeFilePathEditor" name="systemName" />
<widget class="QLineEdit" name="systemName" />
</item>
<item row="0" column="2" colspan="2" >
<spacer>
......@@ -198,11 +198,6 @@
<header>Compilers.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QCMakeFilePathEditor</class>
<extends>QLineEdit</extends>
<header>QCMakeWidgets.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>systemVersion</tabstop>
......
......@@ -47,10 +47,7 @@ bool cmCMakeMinimumRequired
}
else
{
cmOStringStream e;
e << "called with unknown argument \"" << args[i].c_str() << "\".";
this->SetError(e.str().c_str());
return false;
this->UnknownArguments.push_back(args[i]);
}
}
if(doing_version)
......@@ -62,7 +59,7 @@ bool cmCMakeMinimumRequired
// Make sure there was a version to check.
if(version_string.empty())
{
return true;
return this->EnforceUnknownArguments();
}
// Save the required version string.
......@@ -107,6 +104,12 @@ bool cmCMakeMinimumRequired
return true;
}
// The version is not from the future, so enforce unknown arguments.
if(!this->EnforceUnknownArguments())
{
return false;
}
if (required_major < 2 || required_major == 2 && required_minor < 4)
{
this->Makefile->SetPolicyVersion("2.4");
......@@ -119,3 +122,16 @@ bool cmCMakeMinimumRequired
return true;
}
//----------------------------------------------------------------------------
bool cmCMakeMinimumRequired::EnforceUnknownArguments()
{
if(!this->UnknownArguments.empty())
{
cmOStringStream e;
e << "called with unknown argument \""
<< this->UnknownArguments[0] << "\".";
this->SetError(e.str().c_str());
return false;
}
return true;
}
......@@ -77,12 +77,17 @@ public:
"When version 2.4 or lower is given the command implicitly invokes\n"
" cmake_policy(VERSION 2.4)\n"
"which enables compatibility features for CMake 2.4 and lower.\n"
"The FATAL_ERROR option is accepted but ignored. It is left from "
"CMake versions 2.4 and lower in which failure to meet the minimum "
"version was a warning by default.";
"The FATAL_ERROR option is accepted but ignored by CMake 2.6 "
"and higher. "
"It should be specified so CMake versions 2.4 and lower fail with an "
"error instead of just a warning.";
}
cmTypeMacro(cmCMakeMinimumRequired, cmCommand);
private:
std::vector<std::string> UnknownArguments;
bool EnforceUnknownArguments();
};
......
......@@ -188,6 +188,7 @@ cmComputeLinkDepends
// The configuration being linked.
this->Config = (config && *config)? config : 0;
this->LinkType = this->Target->ComputeLinkType(this->Config);
// Enable debug mode if requested.
this->DebugMode = this->Makefile->IsOn("CMAKE_LINK_DEPENDS_DEBUG_MODE");
......@@ -446,13 +447,6 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
std::vector<std::string> deplist;
cmSystemTools::ExpandListArgument(value, deplist);
// Compute which library configuration to link.
cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
if(this->Config && cmSystemTools::UpperCase(this->Config) == "DEBUG")
{
linkType = cmTarget::DEBUG;
}
// Look for entries meant for this configuration.
std::vector<std::string> actual_libs;
cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
......@@ -500,7 +494,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
}
// If the library is meant for this link type then use it.
if(llt == cmTarget::GENERAL || llt == linkType)
if(llt == cmTarget::GENERAL || llt == this->LinkType)
{
actual_libs.push_back(*di);
}
......@@ -524,19 +518,12 @@ void
cmComputeLinkDepends::AddTargetLinkEntries(int depender_index,
LinkLibraryVectorType const& libs)
{
// Compute which library configuration to link.
cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
if(this->Config && cmSystemTools::UpperCase(this->Config) == "DEBUG")
{
linkType = cmTarget::DEBUG;
}
// Look for entries meant for this configuration.
std::vector<std::string> actual_libs;
for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin();
li != libs.end(); ++li)
{
if(li->second == cmTarget::GENERAL || li->second == linkType)
if(li->second == cmTarget::GENERAL || li->second == this->LinkType)
{
actual_libs.push_back(li->first);
}
......
......@@ -72,6 +72,7 @@ private:
// Configuration information.
const char* Config;
cmTarget::LinkLibraryType LinkType;
// Output information.
EntryVector FinalLinkEntries;
......
......@@ -576,9 +576,16 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"add_executable(CMakeSetup WIN32 ${SRCS})\n",false,
"Variables That Change Behavior");
cm->DefineProperty
("CMAKE_COLOR_MAKEFILE", cmProperty::VARIABLE,
"Enables color output when using the Makefile generator.",
"When enabled, the generated Makefiles will produce colored output. "
"Default is ON.",false,
"Variables That Change Behavior");
// Variables defined by CMake that describe the system
cm->DefineProperty
("CMAKE_SYSTEM", cmProperty::VARIABLE,
"Name of system cmake is compiling for.",
......@@ -822,18 +829,23 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"See that target property for additional information.",
false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_DEBUG_POSTFIX", cmProperty::VARIABLE,
"A postfix to add to targets when build as debug.",
"This variable is used to initialize the DEBUG_POSTFIX "
"property on all the targets. If set the postfix will be "
"appended to any targets built when the configuration is "
"Debug.",
"See variable CMAKE_<CONFIG>_POSTFIX.",
"This variable is a special case of the more-general "
"CMAKE_<CONFIG>_POSTFIX variable for the DEBUG configuration.",
false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_<CONFIG>_POSTFIX", cmProperty::VARIABLE,
"Default filename postfix for libraries under configuration <CONFIG>.",
"When a non-executable target is created its <CONFIG>_POSTFIX "
"target property is initialized with the value of this variable "
"if it is set.",
false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_BUILD_WITH_INSTALL_RPATH", cmProperty::VARIABLE,
"Use the install path for the RPATH",
......
......@@ -134,20 +134,23 @@ void cmDocumentationFormatterDocbook
const std::vector<cmDocumentationEntry> &entries =
section.GetEntries();
os << "<itemizedlist>\n";
for(std::vector<cmDocumentationEntry>::const_iterator op
= entries.begin(); op != entries.end(); ++ op )
if (!entries.empty())
{
if(op->Name.size())
os << "<itemizedlist>\n";
for(std::vector<cmDocumentationEntry>::const_iterator op
= entries.begin(); op != entries.end(); ++ op )
{
os << " <listitem><link linkend=\"" << prefix << "_";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "\"><emphasis><literal>";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "</literal></emphasis></link></listitem>\n";
if(op->Name.size())
{
os << " <listitem><link linkend=\"" << prefix << "_";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "\"><emphasis><literal>";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "</literal></emphasis></link></listitem>\n";
}
}
os << "</itemizedlist>\n" ;
}
os << "</itemizedlist>\n" ;
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
op != entries.end();)
......
......@@ -177,11 +177,7 @@ cmExportFileGenerator
cmTarget* target, ImportPropertyMap& properties)
{
// Compute which library configuration to link.
cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
if(config && cmSystemTools::UpperCase(config) == "DEBUG")
{
linkType = cmTarget::DEBUG;
}
cmTarget::LinkLibraryType linkType = target->ComputeLinkType(config);
// Construct the list of libs linked for this configuration.
std::vector<std::string> actual_libs;
......
......@@ -27,6 +27,15 @@ cmExportInstallFileGenerator
{
}
//----------------------------------------------------------------------------
std::string cmExportInstallFileGenerator::GetConfigImportFileGlob()
{
std::string glob = this->FileBase;
glob += "-*";
glob += this->FileExt;
return glob;
}
//----------------------------------------------------------------------------
bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
{
......@@ -55,7 +64,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
os << "# Load information for each installed configuration.\n"
<< "GET_FILENAME_COMPONENT(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"
<< "FILE(GLOB CONFIG_FILES \"${_DIR}/"
<< this->FileBase << "-*" << this->FileExt << "\")\n"
<< this->GetConfigImportFileGlob() << "\")\n"
<< "FOREACH(f ${CONFIG_FILES})\n"
<< " INCLUDE(${f})\n"
<< "ENDFOREACH(f)\n"
......
......@@ -59,6 +59,10 @@ public:
for installation. */
std::map<cmStdString, cmStdString> const& GetConfigImportFiles()
{ return this->ConfigImportFiles; }
/** Compute the globbing expression used to load per-config import
files from the main file. */
std::string GetConfigImportFileGlob();
protected:
// Implement virtual methods from the superclass.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment