Commit b7e53260 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: check in RC 6 merges from trunk

parent a318f1cd
......@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 1)
SET(CMake_VERSION_RC 5)
SET(CMake_VERSION_RC 6)
# 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.1 RC 6
- Fix DEFINITIONS property to be compatible with 2.4
- Fix escaping of $ for visual studio
- FindGettext.cmake fix bug #7230: don't ignore first parameter if it's not ALL
Changes in CMake 2.6.1 RC 5
- Add support for component based packages in cpack.
- Fix FindBLAS.cmake if no fortran compiler is found
......
......@@ -30,7 +30,7 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile)
SET(_firstPoFile)
ENDIF(${_firstPoFile} STREQUAL "ALL")
FOREACH (_currentPoFile ${ARGN})
FOREACH (_currentPoFile ${_firstPoFile} ${ARGN})
GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE)
GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} PATH)
GET_FILENAME_COMPONENT(_lang ${_absFile} NAME_WE)
......
......@@ -42,10 +42,13 @@ IF(NOT KDE4_DATA_DIR)
GET_FILENAME_COMPONENT(KDE4_DATA_DIR "${KDE4_DATA_DIR}" PATH)
ELSE(CMAKE_CROSSCOMPILING)
# then ask kde4-config for the kde data dirs
EXECUTE_PROCESS(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
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})
IF(KDE4_KDECONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
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})
ENDIF(KDE4_KDECONFIG_EXECUTABLE)
ENDIF(CMAKE_CROSSCOMPILING)
ENDIF(NOT KDE4_DATA_DIR)
......
......@@ -2173,8 +2173,10 @@ void cmLocalVisualStudio7GeneratorOptions::HandleFlag(const char* flag)
// This option is not known. Store it in the output flags.
this->FlagString += " ";
this->FlagString +=
cmSystemTools::EscapeWindowsShellArgument(flag,
cmsysSystem_Shell_Flag_VSIDE);
cmSystemTools::EscapeWindowsShellArgument(
flag,
cmsysSystem_Shell_Flag_AllowMakeVariables |
cmsysSystem_Shell_Flag_VSIDE);
}
//----------------------------------------------------------------------------
......
......@@ -1018,12 +1018,21 @@ void cmMakefile::AddDefineFlag(const char* flag)
return;
}
// Update the string used for the old DEFINITIONS property.
this->AddDefineFlag(flag, this->DefineFlagsOrig);
// If this is really a definition, update COMPILE_DEFINITIONS.
if(this->ParseDefineFlag(flag, false))
{
return;
}
// Add this flag that does not look like a definition.
this->AddDefineFlag(flag, this->DefineFlags);
}
void cmMakefile::AddDefineFlag(const char* flag, std::string& dflags)
{
// remove any \n\r
std::string ret = flag;
std::string::size_type pos = 0;
......@@ -1039,8 +1048,8 @@ void cmMakefile::AddDefineFlag(const char* flag)
pos++;
}
this->DefineFlags += " ";
this->DefineFlags += ret;
dflags += " ";
dflags += ret;
}
......@@ -1053,22 +1062,33 @@ void cmMakefile::RemoveDefineFlag(const char* flag)
return;
}
// Update the string used for the old DEFINITIONS property.
this->RemoveDefineFlag(flag, len, this->DefineFlagsOrig);
// If this is really a definition, update COMPILE_DEFINITIONS.
if(this->ParseDefineFlag(flag, true))
{
return;
}
// Remove this flag that does not look like a definition.
this->RemoveDefineFlag(flag, len, this->DefineFlags);
}
void cmMakefile::RemoveDefineFlag(const char* flag,
std::string::size_type len,
std::string& dflags)
{
// Remove all instances of the flag that are surrounded by
// whitespace or the beginning/end of the string.
for(std::string::size_type lpos = this->DefineFlags.find(flag, 0);
lpos != std::string::npos; lpos = this->DefineFlags.find(flag, lpos))
for(std::string::size_type lpos = dflags.find(flag, 0);
lpos != std::string::npos; lpos = dflags.find(flag, lpos))
{
std::string::size_type rpos = lpos + len;
if((lpos <= 0 || isspace(this->DefineFlags[lpos-1])) &&
(rpos >= this->DefineFlags.size() || isspace(this->DefineFlags[rpos])))
if((lpos <= 0 || isspace(dflags[lpos-1])) &&
(rpos >= dflags.size() || isspace(dflags[rpos])))
{
this->DefineFlags.erase(lpos, len);
dflags.erase(lpos, len);
}
else
{
......@@ -2908,8 +2928,10 @@ const char *cmMakefile::GetProperty(const char* prop,
output = "";
if (!strcmp("PARENT_DIRECTORY",prop))
{
output = this->LocalGenerator->GetParent()
->GetMakefile()->GetStartDirectory();
if(cmLocalGenerator* plg = this->LocalGenerator->GetParent())
{
output = plg->GetMakefile()->GetStartDirectory();
}
return output.c_str();
}
else if (!strcmp("INCLUDE_REGULAR_EXPRESSION",prop) )
......@@ -2954,8 +2976,8 @@ const char *cmMakefile::GetProperty(const char* prop,
return output.c_str();
}
else if (!strcmp("DEFINITIONS",prop))
{
output = this->GetDefineFlags();
{
output += this->DefineFlagsOrig;
return output.c_str();
}
else if (!strcmp("INCLUDE_DIRECTORIES",prop) )
......@@ -3176,7 +3198,7 @@ void cmMakefile::DefineProperties(cmake *cm)
"in your CMake scripts. It returns a list of what list files "
"are currently being processed, in order. So if one listfile "
"does an INCLUDE command then that is effectively pushing "
"the included listfile onto the stack.");
"the included listfile onto the stack.", false);
cm->DefineProperty
("TEST_INCLUDE_FILE", cmProperty::DIRECTORY,
......@@ -3245,6 +3267,64 @@ void cmMakefile::DefineProperties(cmake *cm)
"for example typing make will cause the targets to be built. "
"The same concept applies to the default build of other generators.",
false);
cm->DefineProperty
("PARENT_DIRECTORY", cmProperty::DIRECTORY,
"Source directory that added current subdirectory.",
"This read-only property specifies the source directory that "
"added the current source directory as a subdirectory of the build. "
"In the top-level directory the value is the empty-string.", false);
cm->DefineProperty
("INCLUDE_REGULAR_EXPRESSION", cmProperty::DIRECTORY,
"Include file scanning regular expression.",
"This read-only property specifies the regular expression used "
"during dependency scanning to match include files that should "
"be followed. See the include_regular_expression command.", false);
cm->DefineProperty
("VARIABLES", cmProperty::DIRECTORY,
"List of variables defined in the current directory.",
"This read-only property specifies the list of CMake variables "
"currently defined. "
"It is intended for debugging purposes.", false);
cm->DefineProperty
("CACHE_VARIABLES", cmProperty::DIRECTORY,
"List of cache variables available in the current directory.",
"This read-only property specifies the list of CMake cache "
"variables currently defined. "
"It is intended for debugging purposes.", false);
cm->DefineProperty
("MACROS", cmProperty::DIRECTORY,
"List of macro commands available in the current directory.",
"This read-only property specifies the list of CMake macros "
"currently defined. "
"It is intended for debugging purposes. "
"See the macro command.", false);
cm->DefineProperty
("DEFINITIONS", cmProperty::DIRECTORY,
"For CMake 2.4 compatibility only. Use COMPILE_DEFINITIONS instead.",
"This read-only property specifies the list of flags given so far "
"to the add_definitions command. "
"It is intended for debugging purposes. "
"Use the COMPILE_DEFINITIONS instead.", false);
cm->DefineProperty
("INCLUDE_DIRECTORIES", cmProperty::DIRECTORY,
"List of preprocessor include file search directories.",
"This read-only property specifies the list of directories given "
"so far to the include_directories command. "
"It is intended for debugging purposes.", false);
cm->DefineProperty
("LINK_DIRECTORIES", cmProperty::DIRECTORY,
"List of linker search directories.",
"This read-only property specifies the list of directories given "
"so far to the link_directories command. "
"It is intended for debugging purposes.", false);
}
//----------------------------------------------------------------------------
......
......@@ -829,6 +829,11 @@ protected:
std::vector<std::string> HeaderFileExtensions;
std::string DefineFlags;
// Track the value of the computed DEFINITIONS property.
void AddDefineFlag(const char*, std::string&);
void RemoveDefineFlag(const char*, std::string::size_type, std::string&);
std::string DefineFlagsOrig;
#if defined(CMAKE_BUILD_WITH_CMAKE)
std::vector<cmSourceGroup> SourceGroups;
#endif
......
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