summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt4
-rw-r--r--Source/CPack/OSXScriptLauncher.cxx1
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx2
-rw-r--r--Source/CursesDialog/form/frm_driver.c2
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx14
-rw-r--r--Source/QtDialog/QCMakeCacheView.h4
-rw-r--r--Source/cmAddCustomCommandCommand.cxx7
-rw-r--r--Source/cmAddCustomCommandCommand.h2
-rw-r--r--Source/cmAddCustomTargetCommand.cxx8
-rw-r--r--Source/cmAddCustomTargetCommand.h2
-rw-r--r--Source/cmDocumentVariables.cxx10
-rw-r--r--Source/cmExportFileGenerator.cxx6
-rw-r--r--Source/cmExportInstallFileGenerator.cxx14
-rw-r--r--Source/cmFileCommand.cxx4
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx9
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx72
-rw-r--r--Source/cmIDEOptions.cxx6
-rw-r--r--Source/cmIDEOptions.h1
-rw-r--r--Source/cmListCommand.h8
-rw-r--r--Source/cmLocalGenerator.cxx1
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx28
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx49
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.h1
-rw-r--r--Source/cmSourceFile.cxx6
-rw-r--r--Source/cmTarget.cxx24
-rw-r--r--Source/cmTarget.h3
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx14
-rw-r--r--Source/cmake.cxx49
-rw-r--r--Source/cmake.h2
-rw-r--r--Source/cmakemain.cxx12
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
31 files changed, 319 insertions, 48 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 7722c19..278d4df 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -343,7 +343,7 @@ TARGET_LINK_LIBRARIES(CMakeLib cmsys
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
${CMAKE_CURL_LIBRARIES} )
-# On Apple we need Carbon
+# On Apple we need CoreFoundation
IF(APPLE)
TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation")
ENDIF(APPLE)
@@ -465,7 +465,7 @@ IF(APPLE)
ADD_EXECUTABLE(OSXScriptLauncher
CPack/OSXScriptLauncher.cxx)
TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys)
- TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework Carbon")
+ TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework CoreFoundation")
ENDIF(APPLE)
# Build CMake executable
diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx
index 99ffecc..e0fbe9b 100644
--- a/Source/CPack/OSXScriptLauncher.cxx
+++ b/Source/CPack/OSXScriptLauncher.cxx
@@ -14,7 +14,6 @@
#include <cmsys/ios/fstream>
#include <cmsys/ios/iostream>
-#include <Carbon/Carbon.h>
#include <CoreFoundation/CoreFoundation.h>
// For the PATH_MAX constant
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 6863adc..005651f 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -825,7 +825,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
// Call gcov to get coverage data for this *.gcda file:
//
std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str());
- std::string command = "\"" + gcovCommand + "\" -l -o \"" + fileDir
+ std::string command = "\"" + gcovCommand + "\" -l -p -o \"" + fileDir
+ "\" \"" + *it + "\"";
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()
diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c
index 03896c2..f234722 100644
--- a/Source/CursesDialog/form/frm_driver.c
+++ b/Source/CursesDialog/form/frm_driver.c
@@ -1086,7 +1086,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
if (form->status & _POSTED)
{
- if ((form->curpage == field->page))
+ if (form->curpage == field->page)
{
if (changed_opts & O_VISIBLE)
{
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index 562396d..72e9b24 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -293,6 +293,8 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
parentItems.append(new QStandardItem());
parentItems[0]->setData(QBrush(QColor(255,100,100)), Qt::BackgroundColorRole);
parentItems[1]->setData(QBrush(QColor(255,100,100)), Qt::BackgroundColorRole);
+ parentItems[0]->setData(1, GroupRole);
+ parentItems[1]->setData(1, GroupRole);
root->appendRow(parentItems);
int num = props2.size();
@@ -314,6 +316,7 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
QStandardItem* parentItem =
new QStandardItem(key.isEmpty() ? tr("Ungrouped Entries") : key);
root->appendRow(parentItem);
+ parentItem->setData(1, GroupRole);
int num = props2.size();
for(int i=0; i<num; i++)
@@ -478,10 +481,13 @@ QCMakePropertyList QCMakeCacheModel::properties() const
}
else
{
- // get data
- QCMakeProperty prop;
- this->getPropertyData(idx, prop);
- props.append(prop);
+ if(!data(idx, GroupRole).toInt())
+ {
+ // get data
+ QCMakeProperty prop;
+ this->getPropertyData(idx, prop);
+ props.append(prop);
+ }
// go to the next in the tree
while(!idxs.isEmpty() && !idxs.last().sibling(idxs.last().row()+1, 0).isValid())
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index 58bbd2d..0a628b9 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -67,7 +67,9 @@ public:
enum { HelpRole = Qt::ToolTipRole,
TypeRole = Qt::UserRole,
AdvancedRole,
- StringsRole};
+ StringsRole,
+ GroupRole
+ };
enum ViewType { FlatView, GroupView };
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 7af6ec8..502829e 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -286,6 +286,13 @@ bool cmAddCustomCommandCommand
return false;
}
+ // Convert working directory to a full path.
+ if(!working.empty())
+ {
+ const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
+ working = cmSystemTools::CollapseFullPath(working.c_str(), build_dir);
+ }
+
// Choose which mode of the command to use.
bool escapeOldStyle = !verbatim;
if(source.empty() && output.empty())
diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h
index 490e043..47b542c 100644
--- a/Source/cmAddCustomCommandCommand.h
+++ b/Source/cmAddCustomCommandCommand.h
@@ -110,6 +110,8 @@ public:
"will be treated as PRE_LINK.\n"
"If WORKING_DIRECTORY is specified the command will be executed "
"in the directory given. "
+ "If it is a relative path it will be interpreted relative to the "
+ "build tree directory corresponding to the current source directory. "
"If COMMENT is set, the value will be displayed as a "
"message before the commands are executed at build time. "
"If APPEND is specified the COMMAND and DEPENDS option values "
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index edb787b..27dea98 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -166,6 +166,14 @@ bool cmAddCustomTargetCommand
}
}
+ // Convert working directory to a full path.
+ if(!working_directory.empty())
+ {
+ const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
+ working_directory =
+ cmSystemTools::CollapseFullPath(working_directory.c_str(), build_dir);
+ }
+
// Add the utility target to the makefile.
bool escapeOldStyle = !verbatim;
cmTarget* target =
diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h
index 7a2b396..6d94fb2 100644
--- a/Source/cmAddCustomTargetCommand.h
+++ b/Source/cmAddCustomTargetCommand.h
@@ -79,6 +79,8 @@ public:
"empty target will be created. "
"If WORKING_DIRECTORY is set, then the command will be run in that "
"directory. "
+ "If it is a relative path it will be interpreted relative to the "
+ "build tree directory corresponding to the current source directory. "
"If COMMENT is set, the value will be displayed as a "
"message before the commands are executed at build time. "
"Dependencies listed with the DEPENDS argument may reference files "
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 6fffecb..0cd5fa2 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -867,8 +867,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("MSVC_VERSION", cmProperty::VARIABLE,
"The version of Microsoft Visual C/C++ being used if any.",
- "The version of Microsoft Visual C/C++ being used if any. "
- "For example 1300 is MSVC 6.0.",
+ "Known version numbers are:\n"
+ " 1200 = VS 6.0\n"
+ " 1300 = VS 7.0\n"
+ " 1310 = VS 7.1\n"
+ " 1400 = VS 8.0\n"
+ " 1500 = VS 9.0\n"
+ " 1600 = VS 10.0\n"
+ "",
false,
"Variables That Describe the System");
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index e2a6035..9e5c91e 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -325,6 +325,12 @@ cmExportFileGenerator
os << "SET_PROPERTY(TARGET " << targetName
<< " PROPERTY MACOSX_BUNDLE 1)\n";
}
+
+ if (target->IsCFBundleOnApple())
+ {
+ os << "SET_PROPERTY(TARGET " << targetName
+ << " PROPERTY BUNDLE 1)\n";
+ }
os << "\n";
}
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 717571c..23ff5fb 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -263,6 +263,20 @@ cmExportInstallFileGenerator
value += ".framework/";
value += itgen->GetInstallFilename(target, config);
}
+ else if(target->IsCFBundleOnApple())
+ {
+ const char *ext = target->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+
+ value += itgen->GetInstallFilename(target, config);
+ value += ".";
+ value += ext;
+ value += "/";
+ value += itgen->GetInstallFilename(target, config);
+ }
else if(target->IsAppBundleOnApple())
{
value += itgen->GetInstallFilename(target, config);
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 8ebd41f..37fced2 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2658,10 +2658,6 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if (expectedMD5sum == actualMD5sum)
{
- this->Makefile->DisplayStatus(
- "FILE(DOWNLOAD) returning early: file already exists with "
- "expected MD5 sum", -1);
-
if(statusVar.size())
{
cmOStringStream result;
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 2d080df..ef723b7 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -358,6 +358,15 @@ static cmVS7FlagTable cmVS8ExtraFlagTable[] =
{"ExceptionHandling", "EHsc", "enable c++ exceptions", "1", 0},
{"ExceptionHandling", "EHa", "enable SEH exceptions", "2", 0},
+ {"EnablePREfast", "analyze", "", "true", 0},
+ {"EnablePREfast", "analyze-", "", "false", 0},
+
+ // Language options
+ {"TreatWChar_tAsBuiltInType", "Zc:wchar_t",
+ "wchar_t is a built-in type", "true", 0},
+ {"TreatWChar_tAsBuiltInType", "Zc:wchar_t-",
+ "wchar_t is not a built-in type", "false", 0},
+
{0,0,0,0,0}
};
cmIDEFlagTable const* cmGlobalVisualStudio8Generator::GetExtraFlagTableVS8()
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 358721f..d5c0fef 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -165,13 +165,16 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
}
else
{
- mf->AddCacheDefinition(
- "CMAKE_CONFIGURATION_TYPES",
- "Debug;Release;MinSizeRel;RelWithDebInfo",
- "Semicolon separated list of supported configuration types, "
- "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
- "anything else will be ignored.",
- cmCacheManager::STRING);
+ if(!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
+ {
+ mf->AddCacheDefinition(
+ "CMAKE_CONFIGURATION_TYPES",
+ "Debug;Release;MinSizeRel;RelWithDebInfo",
+ "Semicolon separated list of supported configuration types, "
+ "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
+ "anything else will be ignored.",
+ cmCacheManager::STRING);
+ }
}
mf->AddDefinition("CMAKE_GENERATOR_CC", "gcc");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "g++");
@@ -578,6 +581,12 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
}
}
+ if(cmtarget.IsCFBundleOnApple())
+ {
+ cmtarget.SetProperty("PREFIX", "");
+ cmtarget.SetProperty("SUFFIX", "");
+ }
+
// Add the fileRef to the top level Resources group/folder if it is not
// already there.
//
@@ -812,6 +821,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
// some build phases only apply to bundles and/or frameworks
bool isFrameworkTarget = cmtarget.IsFrameworkOnApple();
bool isBundleTarget = cmtarget.GetPropertyAsBool("MACOSX_BUNDLE");
+ bool isCFBundleTarget = cmtarget.IsCFBundleOnApple();
cmXCodeObject* buildFiles = 0;
@@ -857,7 +867,8 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
// create resource build phase - only for framework or bundle targets
cmXCodeObject* resourceBuildPhase = 0;
- if (!resourceFiles.empty() && (isFrameworkTarget || isBundleTarget))
+ if (!resourceFiles.empty() &&
+ (isFrameworkTarget || isBundleTarget || isCFBundleTarget))
{
resourceBuildPhase =
this->CreateObject(cmXCodeObject::PBXResourcesBuildPhase);
@@ -878,7 +889,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
// create vector of "non-resource content file" build phases - only for
// framework or bundle targets
std::vector<cmXCodeObject*> contentBuildPhases;
- if (isFrameworkTarget || isBundleTarget)
+ if (isFrameworkTarget || isBundleTarget || isCFBundleTarget)
{
typedef std::map<cmStdString, std::vector<cmSourceFile*> >
mapOfVectorOfSourceFiles;
@@ -1605,7 +1616,33 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("BUNDLE"));
- if(this->XcodeVersion >= 22)
+ if (target.GetPropertyAsBool("BUNDLE"))
+ {
+ // It turns out that a BUNDLE is basically the same
+ // in many ways as an application bundle, as far as
+ // link flags go
+ std::string createFlags =
+ this->LookupFlags("CMAKE_SHARED_MODULE_CREATE_", lang, "_FLAGS",
+ "-bundle");
+ if(!createFlags.empty())
+ {
+ extraLinkOptions += " ";
+ extraLinkOptions += createFlags;
+ }
+ std::string plist = this->ComputeInfoPListLocation(target);
+ // Xcode will create the final version of Info.plist at build time,
+ // so let it replace the cfbundle name. This avoids creating
+ // a per-configuration Info.plist file. The cfbundle plist
+ // is very similar to the application bundle plist
+ this->CurrentLocalGenerator
+ ->GenerateAppleInfoPList(&target, "$(EXECUTABLE_NAME)",
+ plist.c_str());
+ std::string path =
+ this->ConvertToRelativeForXCode(plist.c_str());
+ buildSettings->AddAttribute("INFOPLIST_FILE",
+ this->CreateString(path.c_str()));
+ }
+ else if(this->XcodeVersion >= 22)
{
buildSettings->AddAttribute("MACH_O_TYPE",
this->CreateString("mh_bundle"));
@@ -1644,7 +1681,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string plist = this->ComputeInfoPListLocation(target);
// Xcode will create the final version of Info.plist at build time,
- // so let it replace the framework name. This avoids creating
+ // so let it replace the framework name. This avoids creating
// a per-configuration Info.plist file.
this->CurrentLocalGenerator
->GenerateFrameworkInfoPList(&target, "$(EXECUTABLE_NAME)",
@@ -2043,7 +2080,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget)
case cmTarget::STATIC_LIBRARY:
return "archive.ar";
case cmTarget::MODULE_LIBRARY:
- return ((this->XcodeVersion >= 22)?
+ if (cmtarget.IsCFBundleOnApple())
+ return "wrapper.plug-in";
+ else
+ return ((this->XcodeVersion >= 22)?
"compiled.mach-o.executable" : "compiled.mach-o.dylib");
case cmTarget::SHARED_LIBRARY:
return (cmtarget.GetPropertyAsBool("FRAMEWORK")?
@@ -2063,8 +2103,12 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget)
case cmTarget::STATIC_LIBRARY:
return "com.apple.product-type.library.static";
case cmTarget::MODULE_LIBRARY:
- return ((this->XcodeVersion >= 22)? "com.apple.product-type.tool" :
- "com.apple.product-type.library.dynamic");
+ if (cmtarget.IsCFBundleOnApple())
+ return "com.apple.product-type.bundle";
+ else
+ return ((this->XcodeVersion >= 22)?
+ "com.apple.product-type.tool" :
+ "com.apple.product-type.library.dynamic");
case cmTarget::SHARED_LIBRARY:
return (cmtarget.GetPropertyAsBool("FRAMEWORK")?
"com.apple.product-type.framework" :
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index 7acb0f0..d9c0e87 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -171,3 +171,9 @@ void cmIDEOptions::AddFlag(const char* flag, const char* value)
{
this->FlagMap[flag] = value;
}
+
+//----------------------------------------------------------------------------
+void cmIDEOptions::RemoveFlag(const char* flag)
+{
+ this->FlagMap.erase(flag);
+}
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index a156b23..a5be8fb 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -28,6 +28,7 @@ public:
void AddDefine(const std::string& define);
void AddDefines(const char* defines);
void AddFlag(const char* flag, const char* value);
+ void RemoveFlag(const char* flag);
protected:
// create a map of xml tags to the values they should have in the output
diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h
index 7f229fa..d215295 100644
--- a/Source/cmListCommand.h
+++ b/Source/cmListCommand.h
@@ -83,6 +83,14 @@ public:
"REMOVE_DUPLICATES will remove duplicated items in the list.\n"
"REVERSE reverses the contents of the list in-place.\n"
"SORT sorts the list in-place alphabetically.\n"
+ "The list subcommands APPEND, INSERT, REMOVE_AT, REMOVE_ITEM, "
+ "REMOVE_DUPLICATES, REVERSE and SORT may create new values for "
+ "the list within the current CMake variable scope. Similar to "
+ "the SET command, the LIST command creates new variable values "
+ "in the current scope, even if the list itself is actually "
+ "defined in a parent scope. To propagate the results of these "
+ "operations upwards, use SET with PARENT_SCOPE, SET with CACHE "
+ "INTERNAL, or some other means of value propagation.\n"
"NOTES: A list in cmake is a ; separated group of strings. "
"To create a list the set command can be used. For example, "
"set(var a b c d e) creates a list with a;b;c;d;e, and "
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d3cbc1f..cd265c1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1893,6 +1893,7 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
{
// This is a full path. Return it as given.
dep = inName;
+ cmSystemTools::ConvertToUnixSlashes(dep);
return true;
}
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index bc50dad..b9ffe62 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -381,6 +381,11 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
"Use sse2 instructions", "2", 0},
{"EnableEnhancedInstructionSet", "arch:SSE",
"Use sse instructions", "1", 0},
+ {"FloatingPointModel", "fp:precise",
+ "Use precise floating point model", "0", 0},
+ {"FloatingPointModel", "fp:strict",
+ "Use strict floating point model", "1", 0},
+ {"FloatingPointModel", "fp:fast", "Use fast floating point model", "2", 0},
{"FavorSizeOrSpeed", "Ot", "Favor fast code", "1", 0},
{"FavorSizeOrSpeed", "Os", "Favor small code", "2", 0},
{"CompileAs", "TC", "Compile as c code", "1", 0},
@@ -451,8 +456,13 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
"Turn off Run time type information for c++", "FALSE", 0},
{"SmallerTypeCheck", "RTCc", "smaller type check", "TRUE", 0},
{"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "TRUE", 0},
+ {"WholeProgramOptimization", "GL",
+ "Enables whole program optimization", "TRUE", 0},
+ {"WholeProgramOptimization", "GL-",
+ "Disables whole program optimization", "FALSE", 0},
{"WarnAsError", "WX", "Treat warnings as errors", "TRUE", 0},
{"BrowseInformation", "FR", "Generate browse information", "1", 0},
+ {"StringPooling", "GF", "Enable StringPooling", "TRUE", 0},
{0,0,0,0,0}
};
@@ -466,6 +476,14 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"GenerateManifest", "MANIFEST", "enable manifest generation", "TRUE", 0},
{"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0},
{"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0},
+ {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0},
+ {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0},
+ {"DataExecutionPrevention", "NXCOMPAT:NO",
+ "Not known to work with Windows Data Execution Prevention", "1", 0},
+ {"DataExecutionPrevention", "NXCOMPAT",
+ "Known to work with Windows Data Execution Prevention", "2", 0},
+ {"DelaySign", "DELAYSIGN:NO", "", "false", 0},
+ {"DelaySign", "DELAYSIGN", "", "true", 0},
{"EntryPointSymbol", "ENTRY:", "sets the starting address", "",
cmVS7FlagTable::UserValue},
{"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "",
@@ -478,8 +496,16 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"EnableCOMDATFolding", "OPT:NOICF", "Do not remove redundant COMDATs",
"1", 0},
{"EnableCOMDATFolding", "OPT:ICF", "Remove redundant COMDATs", "2", 0},
+ {"ResourceOnlyDLL", "NOENTRY", "Create DLL with no entry point", "true", 0},
{"OptimizeReferences", "OPT:NOREF", "Keep unreferenced data", "1", 0},
{"OptimizeReferences", "OPT:REF", "Eliminate unreferenced data", "2", 0},
+ {"Profile", "PROFILE", "", "true", 0},
+ {"RandomizedBaseAddress", "DYNAMICBASE:NO",
+ "Image may not be rebased at load-time", "1", 0},
+ {"RandomizedBaseAddress", "DYNAMICBASE",
+ "Image may be rebased at load-time", "2", 0},
+ {"SetChecksum", "RELEASE", "Enable setting checksum in header", "true", 0},
+ {"SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0},
{"TargetMachine", "MACHINE:I386", "Machine x86", "1", 0},
{"TargetMachine", "MACHINE:X86", "Machine x86", "1", 0},
{"TargetMachine", "MACHINE:AM33", "Machine AM33", "2", 0},
@@ -498,6 +524,8 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
{"TargetMachine", "MACHINE:SH5", "Machine SH5", "15", 0},
{"TargetMachine", "MACHINE:THUMB", "Machine THUMB", "16", 0},
{"TargetMachine", "MACHINE:X64", "Machine x64", "17", 0},
+ {"TurnOffAssemblyGeneration", "NOASSEMBLY",
+ "No assembly even if CLR information is present in objects.", "true", 0},
{"ModuleDefinitionFile", "DEF:", "add an export def file", "",
cmVS7FlagTable::UserValue},
{"GenerateMapFile", "MAP", "enable generation of map file", "TRUE", 0},
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 049a338..1e9a670 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -26,6 +26,12 @@ cmMakefileLibraryTargetGenerator
::cmMakefileLibraryTargetGenerator(cmTarget* target):
cmMakefileTargetGenerator(target)
{
+ if(this->Target->IsCFBundleOnApple())
+ {
+ target->SetProperty("PREFIX", "");
+ target->SetProperty("SUFFIX", "");
+ }
+
this->CustomCommandDriver = OnDepends;
this->Target->GetLibraryNames(
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
@@ -41,6 +47,20 @@ cmMakefileLibraryTargetGenerator
this->MacContentDirectory += this->FrameworkVersion;
this->MacContentDirectory += "/";
}
+ else if(this->Target->IsCFBundleOnApple())
+ {
+ this->MacContentDirectory = this->Target->GetDirectory(this->ConfigName);
+ this->MacContentDirectory += "/";
+ this->MacContentDirectory += this->TargetNameOut;
+ this->MacContentDirectory += ".";
+ const char *ext = this->Target->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+ this->MacContentDirectory += ext;
+ this->MacContentDirectory += "/Contents/";
+ }
}
//----------------------------------------------------------------------------
@@ -301,6 +321,27 @@ cmMakefileLibraryTargetGenerator
}
//----------------------------------------------------------------------------
+void
+cmMakefileLibraryTargetGenerator::CreateCFBundle(std::string& targetName,
+ std::string& outpath)
+{
+ // Compute bundle directory names.
+ outpath = this->MacContentDirectory;
+ outpath += "MacOS";
+ cmSystemTools::MakeDirectory(outpath.c_str());
+ this->Makefile->AddCMakeOutputFile(outpath.c_str());
+ outpath += "/";
+
+ // Configure the Info.plist file. Note that it needs the executable name
+ // to be set.
+ std::string plist = this->MacContentDirectory + "Info.plist";
+ this->LocalGenerator->GenerateAppleInfoPList(this->Target,
+ targetName.c_str(),
+ plist.c_str());
+ this->Makefile->AddCMakeOutputFile(plist.c_str());
+}
+
+//----------------------------------------------------------------------------
void cmMakefileLibraryTargetGenerator::WriteLibraryRules
(const char* linkRuleVar, const char* extraFlags, bool relink)
{
@@ -354,6 +395,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
outpath = this->MacContentDirectory;
this->CreateFramework(targetName);
}
+ else if(this->Target->IsCFBundleOnApple())
+ {
+ outpath = this->Target->GetDirectory(this->ConfigName);
+ outpath += "/";
+ this->CreateCFBundle(targetName, outpath);
+ }
else if(relink)
{
outpath = this->Makefile->GetStartOutputDirectory();
@@ -417,6 +464,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
buildEcho += " shared library ";
break;
case cmTarget::MODULE_LIBRARY:
+ if (this->Target->IsCFBundleOnApple())
+ buildEcho += " CFBundle";
buildEcho += " shared module ";
break;
default:
diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h
index 2f085ad..f3c47db 100644
--- a/Source/cmMakefileLibraryTargetGenerator.h
+++ b/Source/cmMakefileLibraryTargetGenerator.h
@@ -33,6 +33,7 @@ protected:
// MacOSX Framework support methods
void WriteFrameworkRules(bool relink);
void CreateFramework(std::string const& targetName);
+ void CreateCFBundle(std::string& targetName, std::string& outpath);
// Store the computd framework version for OS X Frameworks.
std::string FrameworkVersion;
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index ed1da7b..42d3f06 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -482,17 +482,21 @@ void cmSourceFile::DefineProperties(cmake *cm)
cm->DefineProperty
("MACOSX_PACKAGE_LOCATION", cmProperty::SOURCE_FILE,
- "Place a source file inside a Mac OS X bundle or framework.",
+ "Place a source file inside a Mac OS X bundle, CFBundle, or framework.",
"Executable targets with the MACOSX_BUNDLE property set are built "
"as Mac OS X application bundles on Apple platforms. "
"Shared library targets with the FRAMEWORK property set are built "
"as Mac OS X frameworks on Apple platforms. "
+ "Module library targets with the BUNDLE property set are built "
+ "as Mac OS X CFBundle bundles on Apple platforms. "
"Source files listed in the target with this property set will "
"be copied to a directory inside the bundle or framework content "
"folder specified by the property value. "
"For bundles the content folder is \"<name>.app/Contents\". "
"For frameworks the content folder is "
"\"<name>.framework/Versions/<version>\". "
+ "For cfbundles the content folder is "
+ "\"<name>.bundle/Contents\" (unless the extension is changed). "
"See the PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE target "
"properties for specifying files meant for Headers, PrivateHeaders, "
"or Resources directories.");
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 72efce3..75ff712 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -188,6 +188,22 @@ void cmTarget::DefineProperties(cmake *cm)
"the target is built.");
cm->DefineProperty
+ ("BUNDLE", cmProperty::TARGET,
+ "This target is a CFBundle on the Mac.",
+ "If a module library target has this property set to true it will "
+ "be built as a CFBundle when built on the mac. It will have the "
+ "directory structure required for a CFBundle and will be suitable "
+ "to be used for creating Browser Plugins or other application "
+ "resources.");
+
+ cm->DefineProperty
+ ("BUNDLE_EXTENSION", cmProperty::TARGET,
+ "The file extension used to name a BUNDLE target on the Mac.",
+ "The default value is \"bundle\" - you can also use \"plugin\" or "
+ "whatever file extension is required by the host app for your "
+ "bundle.");
+
+ cm->DefineProperty
("FRAMEWORK", cmProperty::TARGET,
"This target is a framework on the Mac.",
"If a shared library target has this property set to true it will "
@@ -1211,6 +1227,14 @@ bool cmTarget::IsAppBundleOnApple()
}
//----------------------------------------------------------------------------
+bool cmTarget::IsCFBundleOnApple()
+{
+ return (this->GetType() == cmTarget::MODULE_LIBRARY &&
+ this->Makefile->IsOn("APPLE") &&
+ this->GetPropertyAsBool("BUNDLE"));
+}
+
+//----------------------------------------------------------------------------
class cmTargetTraceDependencies
{
public:
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index f2b7d61..b0e20ba 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -430,6 +430,9 @@ public:
Apple. */
bool IsFrameworkOnApple();
+ /** Return whether this target is a CFBundle (plugin) on Apple. */
+ bool IsCFBundleOnApple();
+
/** Return whether this target is an executable Bundle on Apple. */
bool IsAppBundleOnApple();
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4cb745e..8a27ffd 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -167,6 +167,7 @@ void cmVisualStudio10TargetGenerator::Generate()
// Write the encoding header into the file
char magic[] = {0xEF,0xBB, 0xBF};
this->BuildFileStream->write(magic, 3);
+ this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0);
this->WriteString("<Project DefaultTargets=\"Build\" "
"ToolsVersion=\"4.0\" "
"xmlns=\"http://schemas.microsoft.com/"
@@ -998,6 +999,15 @@ OutputLinkIncremental(std::string const& configName)
this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3);
*this->BuildFileStream << incremental
<< "</LinkIncremental>\n";
+
+ const char* manifest = "true";
+ if(flags.find("MANIFEST:NO") != flags.npos)
+ {
+ manifest = "false";
+ }
+ this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 3);
+ *this->BuildFileStream << manifest
+ << "</GenerateManifest>\n";
}
//----------------------------------------------------------------------------
@@ -1326,7 +1336,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
linkDirs += "%(AdditionalLibraryDirectories)";
linkOptions.AddFlag("AdditionalLibraryDirectories", linkDirs.c_str());
linkOptions.AddFlag("AdditionalDependencies", libs.c_str());
- linkOptions.AddFlag("Version", "0.0");
+ linkOptions.AddFlag("Version", "");
if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos)
{
linkOptions.AddFlag("GenerateDebugInformation", "true");
@@ -1369,6 +1379,8 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
linkOptions.AddFlag("ModuleDefinitionFile",
this->ModuleDefinitionFile.c_str());
}
+
+ linkOptions.RemoveFlag("GenerateManifest");
linkOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
linkOptions.OutputFlagMap(*this->BuildFileStream, " ");
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index bab0aaf..81324b6 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -979,37 +979,39 @@ void CMakeCommandUsage(const char* program)
errorStream
<< "Usage: " << program << " -E [command] [arguments ...]\n"
<< "Available commands: \n"
+ << " build build_dir - build the project in build_dir.\n"
<< " chdir dir cmd [args]... - run command in a given directory\n"
- << " rename oldname newname - rename a file or directory "
- "(on one volume)\n"
+ << " compare_files file1 file2 - check if file1 is same as file2\n"
<< " copy file destination - copy file to destination (either file "
"or directory)\n"
- << " copy_if_different in-file out-file - copy file if input has "
- "changed\n"
<< " copy_directory source destination - copy directory 'source' "
"content to directory 'destination'\n"
- << " compare_files file1 file2 - check if file1 is same as file2\n"
+ << " copy_if_different in-file out-file - copy file if input has "
+ "changed\n"
<< " echo [string]... - displays arguments as text\n"
<< " echo_append [string]... - displays arguments as text but no new "
"line\n"
<< " environment - display the current environment\n"
<< " make_directory dir - create a directory\n"
<< " md5sum file1 [...] - compute md5sum of files\n"
- << " remove_directory dir - remove a directory and its contents\n"
<< " remove [-f] file1 file2 ... - remove the file(s), use -f to force "
"it\n"
+ << " remove_directory dir - remove a directory and its contents\n"
+ << " rename oldname newname - rename a file or directory "
+ "(on one volume)\n"
<< " tar [cxt][vfz][cvfj] file.tar "
"file/dir1 file/dir2 ... - create a tar "
"archive\n"
<< " time command [args] ... - run command and return elapsed time\n"
<< " touch file - touch a file.\n"
<< " touch_nocreate file - touch a file but do not create it.\n"
- << " build build_dir - build the project in build_dir.\n"
#if defined(_WIN32) && !defined(__CYGWIN__)
- << " write_regv key value - write registry value\n"
- << " delete_regv key - delete registry value\n"
+ << "Available on Windows only:\n"
<< " comspec - on windows 9x use this for RunCommand\n"
+ << " delete_regv key - delete registry value\n"
+ << " write_regv key value - write registry value\n"
#else
+ << "Available on UNIX only:\n"
<< " create_symlink old new - create a symbolic link new -> old\n"
#endif
;
@@ -1984,8 +1986,32 @@ int cmake::Configure()
}
+bool cmake::RejectUnsupportedPaths(const char* desc, std::string const& path)
+{
+ // Some characters are not well-supported by native build systems.
+ std::string::size_type pos = path.find_first_of("=");
+ if(pos == std::string::npos)
+ {
+ return false;
+ }
+ cmOStringStream e;
+ e << "The path to the " << desc << " directory:\n"
+ << " " << path << "\n"
+ << "contains unsupported character '" << path[pos] << "'.\n"
+ << "Please use a different " << desc << " directory name.";
+ cmListFileBacktrace bt;
+ this->IssueMessage(cmake::FATAL_ERROR, e.str(), bt);
+ return true;
+}
+
int cmake::ActualConfigure()
{
+ if(this->RejectUnsupportedPaths("source", this->cmHomeDirectory) ||
+ this->RejectUnsupportedPaths("binary", this->HomeOutputDirectory))
+ {
+ return 1;
+ }
+
// Construct right now our path conversion table before it's too late:
this->UpdateConversionPathTable();
this->CleanupCommandsAndMacros();
@@ -4108,7 +4134,10 @@ int cmake::VisualStudioLinkNonIncremental(std::vector<std::string>& args,
return -1;
}
// Run the link command as given
- linkCommand.push_back("/MANIFEST");
+ if (hasManifest)
+ {
+ linkCommand.push_back("/MANIFEST");
+ }
if(!cmake::RunCommand("LINK", linkCommand, verbose))
{
return -1;
diff --git a/Source/cmake.h b/Source/cmake.h
index 1bb42d3..70fcaa8 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -451,6 +451,8 @@ protected:
///! Find the full path to one of the cmake programs like ctest, cpack, etc.
std::string FindCMakeProgram(const char* name) const;
+
+ bool RejectUnsupportedPaths(const char* desc, std::string const& path);
private:
cmake(const cmake&); // Not implemented.
void operator=(const cmake&); // Not implemented.
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index a51673c..a5dca18 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -71,11 +71,13 @@ static const char * cmDocumentationOptions[][3] =
{"-E", "CMake command mode.",
"For true platform independence, CMake provides a list of commands "
"that can be used on all systems. Run with -E help for the usage "
- "information. Commands available are: chdir, copy, copy_if_different "
- "copy_directory, compare_files, echo, echo_append, environment, "
- "make_directory, md5sum, remove_directory, remove, tar, time, "
- "touch, touch_nocreate, write_regv, delete_regv, comspec, "
- "create_symlink."},
+ "information. Commands available are: build, chdir, compare_files, copy, "
+ "copy_directory, copy_if_different, echo, echo_append, environment, "
+ "make_directory, md5sum, remove, remove_directory, rename, tar, time, "
+ "touch, touch_nocreate. In addition, some platform specific commands "
+ "are available. "
+ "On Windows: comspec, delete_regv, write_regv. "
+ "On UNIX: create_symlink."},
{"-i", "Run in wizard mode.",
"Wizard mode runs cmake interactively without a GUI. The user is "
"prompted to answer questions about the project configuration. "
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 3c05b52..8d4ad8b 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011)
SET(KWSYS_DATE_STAMP_MONTH 02)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 10)
+SET(KWSYS_DATE_STAMP_DAY 22)