diff options
39 files changed, 948 insertions, 13 deletions
diff --git a/Help/command/execute_process.rst b/Help/command/execute_process.rst index e9a5eb0..71233d9 100644 --- a/Help/command/execute_process.rst +++ b/Help/command/execute_process.rst @@ -18,7 +18,8 @@ Execute one or more child processes. [OUTPUT_QUIET] [ERROR_QUIET] [OUTPUT_STRIP_TRAILING_WHITESPACE] - [ERROR_STRIP_TRAILING_WHITESPACE]) + [ERROR_STRIP_TRAILING_WHITESPACE] + [ENCODING <name>]) Runs the given sequence of one or more commands in parallel with the standard output of each process piped to the standard input of the next. @@ -66,6 +67,14 @@ Options: ``OUTPUT_QUIET``, ``ERROR_QUIET`` The standard output or standard error results will be quietly ignored. +``ENCODING <name>`` + On Windows, the encoding that is used to decode output from the process. + Ignored on other platforms. + Valid encoding names are: ``AUTO`` (the default), ``NONE``, ``UTF8``, + ``ANSI`` and ``OEM``. + ``AUTO`` encoding means current active console's codepage will be used + or if that isn't available then ``ANSI`` codepage will be used. + If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the same pipe the precedence is not specified. If no ``OUTPUT_*`` or ``ERROR_*`` options are given the output will diff --git a/Help/release/dev/execute_process-encoding.rst b/Help/release/dev/execute_process-encoding.rst new file mode 100644 index 0000000..1c7cd8c --- /dev/null +++ b/Help/release/dev/execute_process-encoding.rst @@ -0,0 +1,5 @@ +execute_process-encoding +------------------------ + +* The :command:`execute_process` command gained an ``ENCODING`` option to + specify on Windows which encoding is used for output from child process. diff --git a/Packaging/QtSDK/ToolsCMakeXX.cmake b/Packaging/QtSDK/ToolsCMakeXX.cmake new file mode 100644 index 0000000..e227b73 --- /dev/null +++ b/Packaging/QtSDK/ToolsCMakeXX.cmake @@ -0,0 +1,68 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +# CMake version +include("${CMAKE_CURRENT_LIST_DIR}/../../Source/CMakeVersion.cmake") +set(CM_VER_XY ${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}) +set(CM_VER_X_Y ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}) +set(CM_VER_X_Y_Z ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATH}) + +# Destiantion +set(CM_INST_PREF "Tools/CMake/${CM_VER_X_Y}") +set(CMAKE_BIN_DIR "${CM_INST_PREF}/bin" + CACHE STRING "Location under install bin") +set(CMAKE_DATA_DIR "${CM_INST_PREF}/share/cmake-${CM_VER_X_Y}" + CACHE STRING "Location under install data") +set(CMAKE_DOC_DIR "${CM_INST_PREF}/doc/cmake-${CM_VER_X_Y}" + CACHE STRING "Location under install docs") +set(CMAKE_MAN_DIR "${CM_INST_PREF}/man" + CACHE STRING "Location under install man pages") +set(CMAKE_XDGDATA_DIR "${CM_INST_PREF}/share" + CACHE STRING "Location under install XDG specific files") + +# Package +set(CMake_IFW_ROOT_COMPONENT_NAME + "qt.tools.cmake.${CM_VER_XY}" + CACHE STRING "QtSDK CMake tools component name") +set(CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME + "CMake ${CM_VER_X_Y}" + CACHE STRING "QtSDK CMake tools component display name") +set(CMake_IFW_ROOT_COMPONENT_DESCRIPTION + "CMake Build Tools ${CM_VER_X_Y_Z}" + CACHE STRING "QtSDK CMake tools component description") +set(CMake_IFW_ROOT_COMPONENT_SCRIPT + "${CMAKE_CURRENT_BINARY_DIR}/qt.tools.cmake.${CM_VER_XY}.qs" + CACHE STRING "QtSDK CMake tools component display name") +set(CMake_IFW_ROOT_COMPONENT_PRIORITY + "${CM_VER_XY}" + CACHE STRING "QtSDK CMake tools component sorting priority") +set(CMake_IFW_ROOT_COMPONENT_DEFAULT "" + CACHE STRING "QtSDK CMake tools component default") +set(CMake_IFW_ROOT_COMPONENT_FORCED_INSTALLATION "" + CACHE STRING "QtSDK CMake tools component forsed installation") + +# CPack +set(CPACK_GENERATOR "IFW" + CACHE STRING "Generator to build QtSDK CMake package") +set(CPACK_PACKAGE_FILE_NAME "CMake" + CACHE STRING "Short package name") +set(CPACK_TOPLEVEL_TAG "../QtSDK" + CACHE STRING "QtSDK packages dir") +set(CPACK_IFW_DOWNLOAD_ALL "TRUE" + CACHE STRING "All QtSDK components is downloaded") +set(CPACK_DOWNLOAD_SITE "file:///${CMAKE_CURRENT_BINARY_DIR}/QtSDK/IFW/CMake/repository" + CACHE STRING "Local repository for testing") + +# Script +set(SDKToolBinary "@SDKToolBinary@") +set(CM_VER_XY_DIR "@CMAKE${CM_VER_XY}_DIR@") +configure_file("${CMAKE_CURRENT_LIST_DIR}/qt.tools.cmake.xx.qs.in" + "${CMAKE_CURRENT_BINARY_DIR}/qt.tools.cmake.${CM_VER_XY}.qs" + @ONLY) + +# Unset temporary variables +unset(CM_VER_XY) +unset(CM_VER_X_Y) +unset(CM_VER_X_Y_Z) +unset(CM_INST_PREF) +unset(SDKToolBinary) diff --git a/Packaging/QtSDK/qt.tools.cmake.xx.qs.in b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in new file mode 100644 index 0000000..cb42a71 --- /dev/null +++ b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Distributed under the OSI-approved BSD 3-Clause License. See accompanying +** file Copyright.txt or https://cmake.org/licensing for details. +** +****************************************************************************/ + +// constructor +function Component() +{ + installer.valueChanged.connect( this, Component.prototype.reactOnTargetDirChange ); + // set the default values to CMAKE@CM_VER_XY@_DIR + Component.prototype.reactOnTargetDirChange("TargetDir", installer.value("TargetDir")); +} + +Component.prototype.reactOnTargetDirChange = function(key, value) +{ + if (key == "TargetDir") { + var path = value + "/@CM_INST_PREF@"; + installer.setValue("CMAKE@CM_VER_XY@_DIR", path.replace(/\\/g, "/")); + } +} + +Component.prototype.createOperations = function() +{ + component.createOperations(); + + if (installer.value("os") == "win") { + try { + if (installer.value("SDKToolBinary") == "") + return; + + var cmId = component.name; + installer.setValue("CMAKE@CM_VER_XY@_ID", cmId); + + component.addOperation("Execute", + ["{0,2}", "@SDKToolBinary@", "addCMake", + "--id", cmId, + "--name", "@CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME@", + "--path", "@CM_VER_XY_DIR@/bin/cmake.exe", + "UNDOEXECUTE", + "@SDKToolBinary@", "rmCMake", "--id", cmId]); + + } catch( e ) { + print( e ); + } + } +} diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d5f5724..d7f27be 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 7) -set(CMake_VERSION_PATCH 20161202) +set(CMake_VERSION_PATCH 20161205) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index fa526ae..af80cbf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -91,7 +91,9 @@ int main(int argc, char const* const* argv) #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) // Replace streambuf so we can output Unicode to console cmsys::ConsoleBuf::Manager consoleOut(std::cout); + consoleOut.SetUTF8Pipes(); cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); + consoleErr.SetUTF8Pipes(); #endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 98bd3bb..32ffa6b 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -105,7 +105,7 @@ bool cmProcess::Buffer::GetLast(std::string& line) int cmProcess::GetNextOutputLine(std::string& line, double timeout) { - cmProcessOutput processOutput; + cmProcessOutput processOutput(cmProcessOutput::UTF8); std::string strdata; for (;;) { // Look for lines already buffered. diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index c34751a..2f1df4f 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -56,7 +56,7 @@ QFrame* StartCompilerSetup::CreateToolsetWidgets() QVBoxLayout* l = new QVBoxLayout(frame); l->setContentsMargins(0, 0, 0, 0); - ToolsetLabel = new QLabel(tr("Optional toolset to use (-T parameter)")); + ToolsetLabel = new QLabel(tr("Optional toolset to use (argument to -T)")); l->addWidget(ToolsetLabel); Toolset = new QLineEdit(frame); diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 1562223..eb26a50 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -47,6 +47,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args, std::string error_variable; std::string result_variable; std::string working_directory; + cmProcessOutput::Encoding encoding = cmProcessOutput::Auto; for (size_t i = 0; i < args.size(); ++i) { if (args[i] == "COMMAND") { doing_command = true; @@ -128,6 +129,14 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args, } else if (args[i] == "ERROR_STRIP_TRAILING_WHITESPACE") { doing_command = false; error_strip_trailing_whitespace = true; + } else if (args[i] == "ENCODING") { + doing_command = false; + if (++i < args.size()) { + encoding = cmProcessOutput::FindEncoding(args[i]); + } else { + this->SetError(" called with no value for ENCODING."); + return false; + } } else if (doing_command) { cmds[command_index].push_back(args[i].c_str()); } else { @@ -223,7 +232,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args, int length; char* data; int p; - cmProcessOutput processOutput; + cmProcessOutput processOutput(encoding); std::string strdata; while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) { // Put the output in the right place. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index a1af6ff..d992aef 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -9,6 +9,7 @@ #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmVS10CLFlagTable.h" +#include "cmVS10CSharpFlagTable.h" #include "cmVS10LibFlagTable.h" #include "cmVS10LinkFlagTable.h" #include "cmVS10MASMFlagTable.h" @@ -99,6 +100,7 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->MSBuildCommandInitialized = false; this->DefaultPlatformToolset = "v100"; this->DefaultClFlagTable = cmVS10CLFlagTable; + this->DefaultCSharpFlagTable = cmVS10CSharpFlagTable; this->DefaultLibFlagTable = cmVS10LibFlagTable; this->DefaultLinkFlagTable = cmVS10LinkFlagTable; this->DefaultMasmFlagTable = cmVS10MASMFlagTable; @@ -626,6 +628,15 @@ cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const return (table != CM_NULLPTR) ? table : this->DefaultClFlagTable; } +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetCSharpFlagTable() + const +{ + cmIDEFlagTable const* table = this->ToolsetOptions.GetCSharpFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultCSharpFlagTable; +} + cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetRcFlagTable() const { cmIDEFlagTable const* table = this->ToolsetOptions.GetRcFlagTable( diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 4175104..5bfaf38 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -91,6 +91,7 @@ public: static std::string GetInstalledNsightTegraVersion(); cmIDEFlagTable const* GetClFlagTable() const; + cmIDEFlagTable const* GetCSharpFlagTable() const; cmIDEFlagTable const* GetRcFlagTable() const; cmIDEFlagTable const* GetLibFlagTable() const; cmIDEFlagTable const* GetLinkFlagTable() const; @@ -120,6 +121,7 @@ protected: std::string SystemVersion; std::string NsightTegraVersion; cmIDEFlagTable const* DefaultClFlagTable; + cmIDEFlagTable const* DefaultCSharpFlagTable; cmIDEFlagTable const* DefaultLibFlagTable; cmIDEFlagTable const* DefaultLinkFlagTable; cmIDEFlagTable const* DefaultMasmFlagTable; diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 049e86e..d37d4b0 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -7,6 +7,7 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS11CLFlagTable.h" +#include "cmVS11CSharpFlagTable.h" #include "cmVS11LibFlagTable.h" #include "cmVS11LinkFlagTable.h" #include "cmVS11MASMFlagTable.h" @@ -108,6 +109,7 @@ cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( vc11Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v110"; this->DefaultClFlagTable = cmVS11CLFlagTable; + this->DefaultCSharpFlagTable = cmVS11CSharpFlagTable; this->DefaultLibFlagTable = cmVS11LibFlagTable; this->DefaultLinkFlagTable = cmVS11LinkFlagTable; this->DefaultMasmFlagTable = cmVS11MASMFlagTable; diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 0a48ba6..2656dcc 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -7,6 +7,7 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS12CLFlagTable.h" +#include "cmVS12CSharpFlagTable.h" #include "cmVS12LibFlagTable.h" #include "cmVS12LinkFlagTable.h" #include "cmVS12MASMFlagTable.h" @@ -90,6 +91,7 @@ cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator( vc12Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v120"; this->DefaultClFlagTable = cmVS12CLFlagTable; + this->DefaultCSharpFlagTable = cmVS12CSharpFlagTable; this->DefaultLibFlagTable = cmVS12LibFlagTable; this->DefaultLinkFlagTable = cmVS12LinkFlagTable; this->DefaultMasmFlagTable = cmVS12MASMFlagTable; diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index b4cb823..81c305c 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -7,6 +7,7 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS140CLFlagTable.h" +#include "cmVS140CSharpFlagTable.h" #include "cmVS14LibFlagTable.h" #include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" @@ -90,6 +91,7 @@ cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator( vc14Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v140"; this->DefaultClFlagTable = cmVS140CLFlagTable; + this->DefaultCSharpFlagTable = cmVS140CSharpFlagTable; this->DefaultLibFlagTable = cmVS14LibFlagTable; this->DefaultLinkFlagTable = cmVS14LinkFlagTable; this->DefaultMasmFlagTable = cmVS14MASMFlagTable; diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 091a03e..20d30bc 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -7,6 +7,7 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS141CLFlagTable.h" +#include "cmVS141CSharpFlagTable.h" static const char vs15generatorName[] = "Visual Studio 15 2017"; @@ -86,6 +87,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( vc15Express, cmSystemTools::KeyWOW64_32); this->DefaultPlatformToolset = "v141"; this->DefaultClFlagTable = cmVS141CLFlagTable; + this->DefaultCSharpFlagTable = cmVS141CSharpFlagTable; this->Version = VS15; } diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx index 1440223..8b4d0e1 100644 --- a/Source/cmProcessOutput.cxx +++ b/Source/cmProcessOutput.cxx @@ -9,6 +9,21 @@ unsigned int cmProcessOutput::defaultCodepage = KWSYS_ENCODING_DEFAULT_CODEPAGE; #endif +cmProcessOutput::Encoding cmProcessOutput::FindEncoding(std::string name) +{ + Encoding encoding = Auto; + if (name == "UTF8") { + encoding = UTF8; + } else if (name == "NONE") { + encoding = None; + } else if (name == "ANSI") { + encoding = ANSI; + } else if (name == "OEM") { + encoding = OEM; + } + return encoding; +} + cmProcessOutput::cmProcessOutput(Encoding encoding, unsigned int maxSize) { #if defined(_WIN32) diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h index 6a4e7d5..6046f57 100644 --- a/Source/cmProcessOutput.h +++ b/Source/cmProcessOutput.h @@ -27,6 +27,13 @@ public: OEM }; + /** + * Find encoding enum value for given encoding \a name. + * \param name a encoding name. + * \return encoding enum value or Auto if \a name was not found. + */ + static Encoding FindEncoding(std::string name); + /// The code page that is used as internal encoding to which we will encode. static unsigned int defaultCodepage; diff --git a/Source/cmVS10CSharpFlagTable.h b/Source/cmVS10CSharpFlagTable.h new file mode 100644 index 0000000..493ec2b --- /dev/null +++ b/Source/cmVS10CSharpFlagTable.h @@ -0,0 +1,120 @@ +static cmVS7FlagTable cmVS10CSharpFlagTable[] = { + { "ProjectName", "out:", "", "", cmIDEFlagTable::UserValueRequired }, + + { "OutputType", "target:exe", "", "Exe", 0 }, + { "OutputType", "target:winexe", "", "Winexe", 0 }, + { "OutputType", "target:library", "", "Library", 0 }, + { "OutputType", "target:module", "", "Module", 0 }, + + { "DocumentationFile", "doc", "", "", cmIDEFlagTable::UserValueRequired }, + + { "Platform", "platform:x86", "", "x86", 0 }, + { "Platform", "platform:Itanium", "", "Itanium", 0 }, + { "Platform", "platform:x64", "", "x64", 0 }, + { "Platform", "platform:arm", "", "arm", 0 }, + { "Platform", "platform:anycpu32bitpreferred", "", "anycpu32bitpreferred", + 0 }, + { "Platform", "platform:anycpu", "", "anycpu", 0 }, + + { "References", "reference:", "mit alias", "", 0 }, + { "References", "reference:", "dateiliste", "", 0 }, + { "AddModules", "addmodule:", "", "", cmIDEFlagTable::SemicolonAppendable }, + { "", "link", "", "", 0 }, + + { "Win32Resource", "win32res", "", "", cmIDEFlagTable::UserValueRequired }, + { "ApplicationIcon", "win32icon", "", "", + cmIDEFlagTable::UserValueRequired }, + + { "Win32Manifest", "win32manifest:", "", "true", 0 }, + + { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, + + { "DefineDebug", "debug", "", "true", cmIDEFlagTable::Continue }, + + { "DebugSymbols", "debug", "", "true", 0 }, + { "DebugSymbols", "debug-", "", "false", 0 }, + { "DebugSymbols", "debug+", "", "true", 0 }, + + { "DebugType", "debug:none", "", "none", 0 }, + { "DebugType", "debug:full", "", "full", 0 }, + { "DebugType", "debug:pdbonly", "", "pdbonly", 0 }, + + { "Optimize", "optimize", "", "true", 0 }, + { "Optimize", "optimize-", "", "false", 0 }, + { "Optimize", "optimize+", "", "true", 0 }, + + { "TreatWarningsAsErrors", "warnaserror", "", "true", 0 }, + { "TreatWarningsAsErrors", "warnaserror-", "", "false", 0 }, + { "TreatWarningsAsErrors", "warnaserror+", "", "true", 0 }, + + { "WarningsAsErrors", "warnaserror", "", "", 0 }, + { "WarningsAsErrors", "warnaserror-", "", "", 0 }, + { "WarningsAsErrors", "warnaserror+", "", "", 0 }, + + { "WarningLevel", "warn:0", "", "0", 0 }, + { "WarningLevel", "warn:1", "", "1", 0 }, + { "WarningLevel", "warn:2", "", "2", 0 }, + { "WarningLevel", "warn:3", "", "3", 0 }, + { "WarningLevel", "warn:4", "", "4", 0 }, + { "DisabledWarnings", "nowarn", "", "", 0 }, + + { "CheckForOverflowUnderflow", "checked", "", "true", 0 }, + { "CheckForOverflowUnderflow", "checked-", "", "false", 0 }, + { "CheckForOverflowUnderflow", "checked+", "", "true", 0 }, + + { "AllowUnsafeBlocks", "unsafe", "", "true", 0 }, + { "AllowUnsafeBlocks", "unsafe-", "", "false", 0 }, + { "AllowUnsafeBlocks", "unsafe+", "", "true", 0 }, + + { "DefineConstants", "define:", "", "", + cmIDEFlagTable::SemicolonAppendable | cmIDEFlagTable::UserValue }, + + { "LangVersion", "langversion:ISO-1", "", "ISO-1", 0 }, + { "LangVersion", "langversion:ISO-2", "", "ISO-2", 0 }, + { "LangVersion", "langversion:3", "", "3", 0 }, + { "LangVersion", "langversion:4", "", "4", 0 }, + { "LangVersion", "langversion:5", "", "5", 0 }, + { "LangVersion", "langversion:6", "", "6", 0 }, + { "LangVersion", "langversion:default", "", "default", 0 }, + + { "DelaySign", "delaysign", "", "true", 0 }, + { "DelaySign", "delaysign-", "", "false", 0 }, + { "DelaySign", "delaysign+", "", "true", 0 }, + + { "AssemblyOriginatorKeyFile", "keyfile", "", "", 0 }, + + { "KeyContainerName", "keycontainer", "", "", 0 }, + + { "NoLogo", "nologo", "", "", 0 }, + + { "NoConfig", "noconfig", "", "true", 0 }, + + { "BaseAddress", "baseaddress:", "", "", 0 }, + + { "CodePage", "codepage", "", "", 0 }, + + { "Utf8Output", "utf8output", "", "", 0 }, + + { "MainEntryPoint", "main:", "", "", 0 }, + + { "GenerateFullPaths", "fullpaths", "", "true", 0 }, + + { "FileAlignment", "filealign", "", "", 0 }, + + { "PdbFile", "pdb:", "", "", 0 }, + + { "NoStandardLib", "nostdlib", "", "true", 0 }, + { "NoStandardLib", "nostdlib-", "", "false", 0 }, + { "NoStandardLib", "nostdlib+", "", "true", 0 }, + + { "SubsystemVersion", "subsystemversion", "", "", 0 }, + + { "AdditionalLibPaths", "lib:", "", "", 0 }, + + { "ErrorReport", "errorreport:none", "Do Not Send Report", "none", 0 }, + { "ErrorReport", "errorreport:prompt", "Prompt Immediately", "prompt", 0 }, + { "ErrorReport", "errorreport:queue", "Queue For Next Login", "queue", 0 }, + { "ErrorReport", "errorreport:send", "Send Automatically", "send", 0 }, + + { 0, 0, 0, 0, 0 }, +}; diff --git a/Source/cmVS11CSharpFlagTable.h b/Source/cmVS11CSharpFlagTable.h new file mode 100644 index 0000000..71870b6 --- /dev/null +++ b/Source/cmVS11CSharpFlagTable.h @@ -0,0 +1,120 @@ +static cmVS7FlagTable cmVS11CSharpFlagTable[] = { + { "ProjectName", "out:", "", "", cmIDEFlagTable::UserValueRequired }, + + { "OutputType", "target:exe", "", "Exe", 0 }, + { "OutputType", "target:winexe", "", "Winexe", 0 }, + { "OutputType", "target:library", "", "Library", 0 }, + { "OutputType", "target:module", "", "Module", 0 }, + + { "DocumentationFile", "doc", "", "", cmIDEFlagTable::UserValueRequired }, + + { "Platform", "platform:x86", "", "x86", 0 }, + { "Platform", "platform:Itanium", "", "Itanium", 0 }, + { "Platform", "platform:x64", "", "x64", 0 }, + { "Platform", "platform:arm", "", "arm", 0 }, + { "Platform", "platform:anycpu32bitpreferred", "", "anycpu32bitpreferred", + 0 }, + { "Platform", "platform:anycpu", "", "anycpu", 0 }, + + { "References", "reference:", "mit alias", "", 0 }, + { "References", "reference:", "dateiliste", "", 0 }, + { "AddModules", "addmodule:", "", "", cmIDEFlagTable::SemicolonAppendable }, + { "", "link", "", "", 0 }, + + { "Win32Resource", "win32res", "", "", cmIDEFlagTable::UserValueRequired }, + { "ApplicationIcon", "win32icon", "", "", + cmIDEFlagTable::UserValueRequired }, + + { "Win32Manifest", "win32manifest:", "", "true", 0 }, + + { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, + + { "DefineDebug", "debug", "", "true", cmIDEFlagTable::Continue }, + + { "DebugSymbols", "debug", "", "true", 0 }, + { "DebugSymbols", "debug-", "", "false", 0 }, + { "DebugSymbols", "debug+", "", "true", 0 }, + + { "DebugType", "debug:none", "", "none", 0 }, + { "DebugType", "debug:full", "", "full", 0 }, + { "DebugType", "debug:pdbonly", "", "pdbonly", 0 }, + + { "Optimize", "optimize", "", "true", 0 }, + { "Optimize", "optimize-", "", "false", 0 }, + { "Optimize", "optimize+", "", "true", 0 }, + + { "TreatWarningsAsErrors", "warnaserror", "", "true", 0 }, + { "TreatWarningsAsErrors", "warnaserror-", "", "false", 0 }, + { "TreatWarningsAsErrors", "warnaserror+", "", "true", 0 }, + + { "WarningsAsErrors", "warnaserror", "", "", 0 }, + { "WarningsAsErrors", "warnaserror-", "", "", 0 }, + { "WarningsAsErrors", "warnaserror+", "", "", 0 }, + + { "WarningLevel", "warn:0", "", "0", 0 }, + { "WarningLevel", "warn:1", "", "1", 0 }, + { "WarningLevel", "warn:2", "", "2", 0 }, + { "WarningLevel", "warn:3", "", "3", 0 }, + { "WarningLevel", "warn:4", "", "4", 0 }, + { "DisabledWarnings", "nowarn", "", "", 0 }, + + { "CheckForOverflowUnderflow", "checked", "", "true", 0 }, + { "CheckForOverflowUnderflow", "checked-", "", "false", 0 }, + { "CheckForOverflowUnderflow", "checked+", "", "true", 0 }, + + { "AllowUnsafeBlocks", "unsafe", "", "true", 0 }, + { "AllowUnsafeBlocks", "unsafe-", "", "false", 0 }, + { "AllowUnsafeBlocks", "unsafe+", "", "true", 0 }, + + { "DefineConstants", "define:", "", "", + cmIDEFlagTable::SemicolonAppendable | cmIDEFlagTable::UserValue }, + + { "LangVersion", "langversion:ISO-1", "", "ISO-1", 0 }, + { "LangVersion", "langversion:ISO-2", "", "ISO-2", 0 }, + { "LangVersion", "langversion:3", "", "3", 0 }, + { "LangVersion", "langversion:4", "", "4", 0 }, + { "LangVersion", "langversion:5", "", "5", 0 }, + { "LangVersion", "langversion:6", "", "6", 0 }, + { "LangVersion", "langversion:default", "", "default", 0 }, + + { "DelaySign", "delaysign", "", "true", 0 }, + { "DelaySign", "delaysign-", "", "false", 0 }, + { "DelaySign", "delaysign+", "", "true", 0 }, + + { "AssemblyOriginatorKeyFile", "keyfile", "", "", 0 }, + + { "KeyContainerName", "keycontainer", "", "", 0 }, + + { "NoLogo", "nologo", "", "", 0 }, + + { "NoConfig", "noconfig", "", "true", 0 }, + + { "BaseAddress", "baseaddress:", "", "", 0 }, + + { "CodePage", "codepage", "", "", 0 }, + + { "Utf8Output", "utf8output", "", "", 0 }, + + { "MainEntryPoint", "main:", "", "", 0 }, + + { "GenerateFullPaths", "fullpaths", "", "true", 0 }, + + { "FileAlignment", "filealign", "", "", 0 }, + + { "PdbFile", "pdb:", "", "", 0 }, + + { "NoStandardLib", "nostdlib", "", "true", 0 }, + { "NoStandardLib", "nostdlib-", "", "false", 0 }, + { "NoStandardLib", "nostdlib+", "", "true", 0 }, + + { "SubsystemVersion", "subsystemversion", "", "", 0 }, + + { "AdditionalLibPaths", "lib:", "", "", 0 }, + + { "ErrorReport", "errorreport:none", "Do Not Send Report", "none", 0 }, + { "ErrorReport", "errorreport:prompt", "Prompt Immediately", "prompt", 0 }, + { "ErrorReport", "errorreport:queue", "Queue For Next Login", "queue", 0 }, + { "ErrorReport", "errorreport:send", "Send Automatically", "send", 0 }, + + { 0, 0, 0, 0, 0 }, +}; diff --git a/Source/cmVS12CSharpFlagTable.h b/Source/cmVS12CSharpFlagTable.h new file mode 100644 index 0000000..f98b184 --- /dev/null +++ b/Source/cmVS12CSharpFlagTable.h @@ -0,0 +1,120 @@ +static cmVS7FlagTable cmVS12CSharpFlagTable[] = { + { "ProjectName", "out:", "", "", cmIDEFlagTable::UserValueRequired }, + + { "OutputType", "target:exe", "", "Exe", 0 }, + { "OutputType", "target:winexe", "", "Winexe", 0 }, + { "OutputType", "target:library", "", "Library", 0 }, + { "OutputType", "target:module", "", "Module", 0 }, + + { "DocumentationFile", "doc", "", "", cmIDEFlagTable::UserValueRequired }, + + { "Platform", "platform:x86", "", "x86", 0 }, + { "Platform", "platform:Itanium", "", "Itanium", 0 }, + { "Platform", "platform:x64", "", "x64", 0 }, + { "Platform", "platform:arm", "", "arm", 0 }, + { "Platform", "platform:anycpu32bitpreferred", "", "anycpu32bitpreferred", + 0 }, + { "Platform", "platform:anycpu", "", "anycpu", 0 }, + + { "References", "reference:", "mit alias", "", 0 }, + { "References", "reference:", "dateiliste", "", 0 }, + { "AddModules", "addmodule:", "", "", cmIDEFlagTable::SemicolonAppendable }, + { "", "link", "", "", 0 }, + + { "Win32Resource", "win32res", "", "", cmIDEFlagTable::UserValueRequired }, + { "ApplicationIcon", "win32icon", "", "", + cmIDEFlagTable::UserValueRequired }, + + { "Win32Manifest", "win32manifest:", "", "true", 0 }, + + { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, + + { "DefineDebug", "debug", "", "true", cmIDEFlagTable::Continue }, + + { "DebugSymbols", "debug", "", "true", 0 }, + { "DebugSymbols", "debug-", "", "false", 0 }, + { "DebugSymbols", "debug+", "", "true", 0 }, + + { "DebugType", "debug:none", "", "none", 0 }, + { "DebugType", "debug:full", "", "full", 0 }, + { "DebugType", "debug:pdbonly", "", "pdbonly", 0 }, + + { "Optimize", "optimize", "", "true", 0 }, + { "Optimize", "optimize-", "", "false", 0 }, + { "Optimize", "optimize+", "", "true", 0 }, + + { "TreatWarningsAsErrors", "warnaserror", "", "true", 0 }, + { "TreatWarningsAsErrors", "warnaserror-", "", "false", 0 }, + { "TreatWarningsAsErrors", "warnaserror+", "", "true", 0 }, + + { "WarningsAsErrors", "warnaserror", "", "", 0 }, + { "WarningsAsErrors", "warnaserror-", "", "", 0 }, + { "WarningsAsErrors", "warnaserror+", "", "", 0 }, + + { "WarningLevel", "warn:0", "", "0", 0 }, + { "WarningLevel", "warn:1", "", "1", 0 }, + { "WarningLevel", "warn:2", "", "2", 0 }, + { "WarningLevel", "warn:3", "", "3", 0 }, + { "WarningLevel", "warn:4", "", "4", 0 }, + { "DisabledWarnings", "nowarn", "", "", 0 }, + + { "CheckForOverflowUnderflow", "checked", "", "true", 0 }, + { "CheckForOverflowUnderflow", "checked-", "", "false", 0 }, + { "CheckForOverflowUnderflow", "checked+", "", "true", 0 }, + + { "AllowUnsafeBlocks", "unsafe", "", "true", 0 }, + { "AllowUnsafeBlocks", "unsafe-", "", "false", 0 }, + { "AllowUnsafeBlocks", "unsafe+", "", "true", 0 }, + + { "DefineConstants", "define:", "", "", + cmIDEFlagTable::SemicolonAppendable | cmIDEFlagTable::UserValue }, + + { "LangVersion", "langversion:ISO-1", "", "ISO-1", 0 }, + { "LangVersion", "langversion:ISO-2", "", "ISO-2", 0 }, + { "LangVersion", "langversion:3", "", "3", 0 }, + { "LangVersion", "langversion:4", "", "4", 0 }, + { "LangVersion", "langversion:5", "", "5", 0 }, + { "LangVersion", "langversion:6", "", "6", 0 }, + { "LangVersion", "langversion:default", "", "default", 0 }, + + { "DelaySign", "delaysign", "", "true", 0 }, + { "DelaySign", "delaysign-", "", "false", 0 }, + { "DelaySign", "delaysign+", "", "true", 0 }, + + { "AssemblyOriginatorKeyFile", "keyfile", "", "", 0 }, + + { "KeyContainerName", "keycontainer", "", "", 0 }, + + { "NoLogo", "nologo", "", "", 0 }, + + { "NoConfig", "noconfig", "", "true", 0 }, + + { "BaseAddress", "baseaddress:", "", "", 0 }, + + { "CodePage", "codepage", "", "", 0 }, + + { "Utf8Output", "utf8output", "", "", 0 }, + + { "MainEntryPoint", "main:", "", "", 0 }, + + { "GenerateFullPaths", "fullpaths", "", "true", 0 }, + + { "FileAlignment", "filealign", "", "", 0 }, + + { "PdbFile", "pdb:", "", "", 0 }, + + { "NoStandardLib", "nostdlib", "", "true", 0 }, + { "NoStandardLib", "nostdlib-", "", "false", 0 }, + { "NoStandardLib", "nostdlib+", "", "true", 0 }, + + { "SubsystemVersion", "subsystemversion", "", "", 0 }, + + { "AdditionalLibPaths", "lib:", "", "", 0 }, + + { "ErrorReport", "errorreport:none", "Do Not Send Report", "none", 0 }, + { "ErrorReport", "errorreport:prompt", "Prompt Immediately", "prompt", 0 }, + { "ErrorReport", "errorreport:queue", "Queue For Next Login", "queue", 0 }, + { "ErrorReport", "errorreport:send", "Send Automatically", "send", 0 }, + + { 0, 0, 0, 0, 0 }, +}; diff --git a/Source/cmVS140CSharpFlagTable.h b/Source/cmVS140CSharpFlagTable.h new file mode 100644 index 0000000..256c35f --- /dev/null +++ b/Source/cmVS140CSharpFlagTable.h @@ -0,0 +1,120 @@ +static cmVS7FlagTable cmVS140CSharpFlagTable[] = { + { "ProjectName", "out:", "", "", cmIDEFlagTable::UserValueRequired }, + + { "OutputType", "target:exe", "", "Exe", 0 }, + { "OutputType", "target:winexe", "", "Winexe", 0 }, + { "OutputType", "target:library", "", "Library", 0 }, + { "OutputType", "target:module", "", "Module", 0 }, + + { "DocumentationFile", "doc", "", "", cmIDEFlagTable::UserValueRequired }, + + { "Platform", "platform:x86", "", "x86", 0 }, + { "Platform", "platform:Itanium", "", "Itanium", 0 }, + { "Platform", "platform:x64", "", "x64", 0 }, + { "Platform", "platform:arm", "", "arm", 0 }, + { "Platform", "platform:anycpu32bitpreferred", "", "anycpu32bitpreferred", + 0 }, + { "Platform", "platform:anycpu", "", "anycpu", 0 }, + + { "References", "reference:", "mit alias", "", 0 }, + { "References", "reference:", "dateiliste", "", 0 }, + { "AddModules", "addmodule:", "", "", cmIDEFlagTable::SemicolonAppendable }, + { "", "link", "", "", 0 }, + + { "Win32Resource", "win32res", "", "", cmIDEFlagTable::UserValueRequired }, + { "ApplicationIcon", "win32icon", "", "", + cmIDEFlagTable::UserValueRequired }, + + { "Win32Manifest", "win32manifest:", "", "true", 0 }, + + { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, + + { "DefineDebug", "debug", "", "true", cmIDEFlagTable::Continue }, + + { "DebugSymbols", "debug", "", "true", 0 }, + { "DebugSymbols", "debug-", "", "false", 0 }, + { "DebugSymbols", "debug+", "", "true", 0 }, + + { "DebugType", "debug:none", "", "none", 0 }, + { "DebugType", "debug:full", "", "full", 0 }, + { "DebugType", "debug:pdbonly", "", "pdbonly", 0 }, + + { "Optimize", "optimize", "", "true", 0 }, + { "Optimize", "optimize-", "", "false", 0 }, + { "Optimize", "optimize+", "", "true", 0 }, + + { "TreatWarningsAsErrors", "warnaserror", "", "true", 0 }, + { "TreatWarningsAsErrors", "warnaserror-", "", "false", 0 }, + { "TreatWarningsAsErrors", "warnaserror+", "", "true", 0 }, + + { "WarningsAsErrors", "warnaserror", "", "", 0 }, + { "WarningsAsErrors", "warnaserror-", "", "", 0 }, + { "WarningsAsErrors", "warnaserror+", "", "", 0 }, + + { "WarningLevel", "warn:0", "", "0", 0 }, + { "WarningLevel", "warn:1", "", "1", 0 }, + { "WarningLevel", "warn:2", "", "2", 0 }, + { "WarningLevel", "warn:3", "", "3", 0 }, + { "WarningLevel", "warn:4", "", "4", 0 }, + { "DisabledWarnings", "nowarn", "", "", 0 }, + + { "CheckForOverflowUnderflow", "checked", "", "true", 0 }, + { "CheckForOverflowUnderflow", "checked-", "", "false", 0 }, + { "CheckForOverflowUnderflow", "checked+", "", "true", 0 }, + + { "AllowUnsafeBlocks", "unsafe", "", "true", 0 }, + { "AllowUnsafeBlocks", "unsafe-", "", "false", 0 }, + { "AllowUnsafeBlocks", "unsafe+", "", "true", 0 }, + + { "DefineConstants", "define:", "", "", + cmIDEFlagTable::SemicolonAppendable | cmIDEFlagTable::UserValue }, + + { "LangVersion", "langversion:ISO-1", "", "ISO-1", 0 }, + { "LangVersion", "langversion:ISO-2", "", "ISO-2", 0 }, + { "LangVersion", "langversion:3", "", "3", 0 }, + { "LangVersion", "langversion:4", "", "4", 0 }, + { "LangVersion", "langversion:5", "", "5", 0 }, + { "LangVersion", "langversion:6", "", "6", 0 }, + { "LangVersion", "langversion:default", "", "default", 0 }, + + { "DelaySign", "delaysign", "", "true", 0 }, + { "DelaySign", "delaysign-", "", "false", 0 }, + { "DelaySign", "delaysign+", "", "true", 0 }, + + { "AssemblyOriginatorKeyFile", "keyfile", "", "", 0 }, + + { "KeyContainerName", "keycontainer", "", "", 0 }, + + { "NoLogo", "nologo", "", "", 0 }, + + { "NoConfig", "noconfig", "", "true", 0 }, + + { "BaseAddress", "baseaddress:", "", "", 0 }, + + { "CodePage", "codepage", "", "", 0 }, + + { "Utf8Output", "utf8output", "", "", 0 }, + + { "MainEntryPoint", "main:", "", "", 0 }, + + { "GenerateFullPaths", "fullpaths", "", "true", 0 }, + + { "FileAlignment", "filealign", "", "", 0 }, + + { "PdbFile", "pdb:", "", "", 0 }, + + { "NoStandardLib", "nostdlib", "", "true", 0 }, + { "NoStandardLib", "nostdlib-", "", "false", 0 }, + { "NoStandardLib", "nostdlib+", "", "true", 0 }, + + { "SubsystemVersion", "subsystemversion", "", "", 0 }, + + { "AdditionalLibPaths", "lib:", "", "", 0 }, + + { "ErrorReport", "errorreport:none", "Do Not Send Report", "none", 0 }, + { "ErrorReport", "errorreport:prompt", "Prompt Immediately", "prompt", 0 }, + { "ErrorReport", "errorreport:queue", "Queue For Next Login", "queue", 0 }, + { "ErrorReport", "errorreport:send", "Send Automatically", "send", 0 }, + + { 0, 0, 0, 0, 0 }, +}; diff --git a/Source/cmVS141CSharpFlagTable.h b/Source/cmVS141CSharpFlagTable.h new file mode 100644 index 0000000..8508581 --- /dev/null +++ b/Source/cmVS141CSharpFlagTable.h @@ -0,0 +1,120 @@ +static cmVS7FlagTable cmVS141CSharpFlagTable[] = { + { "ProjectName", "out:", "", "", cmIDEFlagTable::UserValueRequired }, + + { "OutputType", "target:exe", "", "Exe", 0 }, + { "OutputType", "target:winexe", "", "Winexe", 0 }, + { "OutputType", "target:library", "", "Library", 0 }, + { "OutputType", "target:module", "", "Module", 0 }, + + { "DocumentationFile", "doc", "", "", cmIDEFlagTable::UserValueRequired }, + + { "Platform", "platform:x86", "", "x86", 0 }, + { "Platform", "platform:Itanium", "", "Itanium", 0 }, + { "Platform", "platform:x64", "", "x64", 0 }, + { "Platform", "platform:arm", "", "arm", 0 }, + { "Platform", "platform:anycpu32bitpreferred", "", "anycpu32bitpreferred", + 0 }, + { "Platform", "platform:anycpu", "", "anycpu", 0 }, + + { "References", "reference:", "mit alias", "", 0 }, + { "References", "reference:", "dateiliste", "", 0 }, + { "AddModules", "addmodule:", "", "", cmIDEFlagTable::SemicolonAppendable }, + { "", "link", "", "", 0 }, + + { "Win32Resource", "win32res", "", "", cmIDEFlagTable::UserValueRequired }, + { "ApplicationIcon", "win32icon", "", "", + cmIDEFlagTable::UserValueRequired }, + + { "Win32Manifest", "win32manifest:", "", "true", 0 }, + + { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, + + { "DefineDebug", "debug", "", "true", cmIDEFlagTable::Continue }, + + { "DebugSymbols", "debug", "", "true", 0 }, + { "DebugSymbols", "debug-", "", "false", 0 }, + { "DebugSymbols", "debug+", "", "true", 0 }, + + { "DebugType", "debug:none", "", "none", 0 }, + { "DebugType", "debug:full", "", "full", 0 }, + { "DebugType", "debug:pdbonly", "", "pdbonly", 0 }, + + { "Optimize", "optimize", "", "true", 0 }, + { "Optimize", "optimize-", "", "false", 0 }, + { "Optimize", "optimize+", "", "true", 0 }, + + { "TreatWarningsAsErrors", "warnaserror", "", "true", 0 }, + { "TreatWarningsAsErrors", "warnaserror-", "", "false", 0 }, + { "TreatWarningsAsErrors", "warnaserror+", "", "true", 0 }, + + { "WarningsAsErrors", "warnaserror", "", "", 0 }, + { "WarningsAsErrors", "warnaserror-", "", "", 0 }, + { "WarningsAsErrors", "warnaserror+", "", "", 0 }, + + { "WarningLevel", "warn:0", "", "0", 0 }, + { "WarningLevel", "warn:1", "", "1", 0 }, + { "WarningLevel", "warn:2", "", "2", 0 }, + { "WarningLevel", "warn:3", "", "3", 0 }, + { "WarningLevel", "warn:4", "", "4", 0 }, + { "DisabledWarnings", "nowarn", "", "", 0 }, + + { "CheckForOverflowUnderflow", "checked", "", "true", 0 }, + { "CheckForOverflowUnderflow", "checked-", "", "false", 0 }, + { "CheckForOverflowUnderflow", "checked+", "", "true", 0 }, + + { "AllowUnsafeBlocks", "unsafe", "", "true", 0 }, + { "AllowUnsafeBlocks", "unsafe-", "", "false", 0 }, + { "AllowUnsafeBlocks", "unsafe+", "", "true", 0 }, + + { "DefineConstants", "define:", "", "", + cmIDEFlagTable::SemicolonAppendable | cmIDEFlagTable::UserValue }, + + { "LangVersion", "langversion:ISO-1", "", "ISO-1", 0 }, + { "LangVersion", "langversion:ISO-2", "", "ISO-2", 0 }, + { "LangVersion", "langversion:3", "", "3", 0 }, + { "LangVersion", "langversion:4", "", "4", 0 }, + { "LangVersion", "langversion:5", "", "5", 0 }, + { "LangVersion", "langversion:6", "", "6", 0 }, + { "LangVersion", "langversion:default", "", "default", 0 }, + + { "DelaySign", "delaysign", "", "true", 0 }, + { "DelaySign", "delaysign-", "", "false", 0 }, + { "DelaySign", "delaysign+", "", "true", 0 }, + + { "AssemblyOriginatorKeyFile", "keyfile", "", "", 0 }, + + { "KeyContainerName", "keycontainer", "", "", 0 }, + + { "NoLogo", "nologo", "", "", 0 }, + + { "NoConfig", "noconfig", "", "true", 0 }, + + { "BaseAddress", "baseaddress:", "", "", 0 }, + + { "CodePage", "codepage", "", "", 0 }, + + { "Utf8Output", "utf8output", "", "", 0 }, + + { "MainEntryPoint", "main:", "", "", 0 }, + + { "GenerateFullPaths", "fullpaths", "", "true", 0 }, + + { "FileAlignment", "filealign", "", "", 0 }, + + { "PdbFile", "pdb:", "", "", 0 }, + + { "NoStandardLib", "nostdlib", "", "true", 0 }, + { "NoStandardLib", "nostdlib-", "", "false", 0 }, + { "NoStandardLib", "nostdlib+", "", "true", 0 }, + + { "SubsystemVersion", "subsystemversion", "", "", 0 }, + + { "AdditionalLibPaths", "lib:", "", "", 0 }, + + { "ErrorReport", "errorreport:none", "Do Not Send Report", "none", 0 }, + { "ErrorReport", "errorreport:prompt", "Prompt Immediately", "prompt", 0 }, + { "ErrorReport", "errorreport:queue", "Queue For Next Login", "queue", 0 }, + { "ErrorReport", "errorreport:send", "Send Automatically", "send", 0 }, + + { 0, 0, 0, 0, 0 }, +}; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 3632663..8ab3b04 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -59,6 +59,16 @@ static bool cmVS10IsTargetsFile(std::string const& path) return cmSystemTools::Strucmp(ext.c_str(), ".targets") == 0; } +static std::string computeProjectFileExtension(cmGeneratorTarget const* t) +{ + std::string res; + res = ".vcxproj"; + if (cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(t)) { + res = ".csproj"; + } + return res; +} + cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator( cmGeneratorTarget* target, cmGlobalVisualStudio10Generator* gg) { @@ -79,12 +89,16 @@ cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator( &this->NsightTegraVersion[0], &this->NsightTegraVersion[1], &this->NsightTegraVersion[2], &this->NsightTegraVersion[3]); this->MSTools = !this->NsightTegra; + this->Managed = false; this->TargetCompileAsWinRT = false; this->BuildFileStream = 0; this->IsMissingFiles = false; this->DefaultArtifactDir = this->LocalGenerator->GetCurrentBinaryDirectory() + std::string("/") + this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget); + this->InSourceBuild = + (strcmp(this->Makefile->GetCurrentSourceDirectory(), + this->Makefile->GetCurrentBinaryDirectory()) == 0); } cmVisualStudio10TargetGenerator::~cmVisualStudio10TargetGenerator() @@ -101,7 +115,7 @@ cmVisualStudio10TargetGenerator::~cmVisualStudio10TargetGenerator() return; } if (this->BuildFileStream->Close()) { - this->GlobalGenerator->FileReplacedDuringGenerate(this->PathToVcxproj); + this->GlobalGenerator->FileReplacedDuringGenerate(this->PathToProjectFile); } delete this->BuildFileStream; } @@ -152,11 +166,20 @@ void cmVisualStudio10TargetGenerator::Generate() this->GeneratorTarget->GetProperty("EXTERNAL_MSPROJECT")) { return; } + this->ProjectFileExtension = + computeProjectFileExtension(this->GeneratorTarget); + if (this->ProjectFileExtension == ".vcxproj") { + this->ProjectType = vcxproj; + this->Managed = false; + } else if (this->ProjectFileExtension == ".csproj") { + this->ProjectType = csproj; + this->Managed = true; + } // Tell the global generator the name of the project file this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME", this->Name.c_str()); - this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME_EXT", - ".vcxproj"); + this->GeneratorTarget->Target->SetProperty( + "GENERATOR_FILE_NAME_EXT", this->ProjectFileExtension.c_str()); if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { if (!this->ComputeClOptions()) { return; @@ -177,9 +200,9 @@ void cmVisualStudio10TargetGenerator::Generate() std::string path = this->LocalGenerator->GetCurrentBinaryDirectory(); path += "/"; path += this->Name; - path += ".vcxproj"; + path += this->ProjectFileExtension; this->BuildFileStream = new cmGeneratedFileStream(path.c_str()); - this->PathToVcxproj = path; + this->PathToProjectFile = path; this->BuildFileStream->SetCopyIfDifferent(true); // Write the encoding header into the file @@ -871,7 +894,8 @@ void cmVisualStudio10TargetGenerator::WriteGroups() std::string path = this->LocalGenerator->GetCurrentBinaryDirectory(); path += "/"; path += this->Name; - path += ".vcxproj.filters"; + path += computeProjectFileExtension(this->GeneratorTarget); + path += ".filters"; cmGeneratedFileStream fout(path.c_str()); fout.SetCopyIfDifferent(true); char magic[] = { char(0xEF), char(0xBB), char(0xBF) }; @@ -1747,6 +1771,15 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( } } + if (csproj != this->ProjectType && clOptions.IsManaged()) { + this->Managed = true; + std::string managedType = clOptions.GetFlag("CompileAsManaged"); + if (managedType == "Safe") { + // force empty calling convention if safe clr is used + clOptions.AddFlag("CallingConvention", ""); + } + } + this->ClOptions[configName] = pOptions.release(); return true; } @@ -2658,8 +2691,9 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() path = lg->GetCurrentBinaryDirectory(); path += "/"; path += dt->GetName(); - path += ".vcxproj"; + path += computeProjectFileExtension(dt); } + this->ConvertToWindowsSlash(path); (*this->BuildFileStream) << cmVS10EscapeXML(path) << "\">\n"; this->WriteString("<Project>", 3); (*this->BuildFileStream) << this->GlobalGenerator->GetGUID(name.c_str()) diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index a4e3adb..e68bf1a 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -145,7 +145,14 @@ private: OptionsMap RcOptions; OptionsMap MasmOptions; OptionsMap LinkOptions; - std::string PathToVcxproj; + std::string PathToProjectFile; + std::string ProjectFileExtension; + enum VsProjectType + { + vcxproj, + csproj + } ProjectType; + bool InSourceBuild; std::vector<std::string> Configurations; std::vector<TargetsFileAndConfigs> TargetsFileAndConfigsVec; cmGeneratorTarget* GeneratorTarget; @@ -154,6 +161,7 @@ private: std::string GUID; std::string Name; bool MSTools; + bool Managed; bool NsightTegra; int NsightTegraVersion[4]; bool TargetCompileAsWinRT; diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx index b928f43..afca216 100644 --- a/Source/cmVisualStudio10ToolsetOptions.cxx +++ b/Source/cmVisualStudio10ToolsetOptions.cxx @@ -7,22 +7,27 @@ #include "cmVisualStudioGeneratorOptions.h" #include "cmVS10CLFlagTable.h" +#include "cmVS10CSharpFlagTable.h" #include "cmVS10LibFlagTable.h" #include "cmVS10LinkFlagTable.h" #include "cmVS10MASMFlagTable.h" #include "cmVS10RCFlagTable.h" #include "cmVS11CLFlagTable.h" +#include "cmVS11CSharpFlagTable.h" #include "cmVS11LibFlagTable.h" #include "cmVS11LinkFlagTable.h" #include "cmVS11MASMFlagTable.h" #include "cmVS11RCFlagTable.h" #include "cmVS12CLFlagTable.h" +#include "cmVS12CSharpFlagTable.h" #include "cmVS12LibFlagTable.h" #include "cmVS12LinkFlagTable.h" #include "cmVS12MASMFlagTable.h" #include "cmVS12RCFlagTable.h" #include "cmVS140CLFlagTable.h" +#include "cmVS140CSharpFlagTable.h" #include "cmVS141CLFlagTable.h" +#include "cmVS141CSharpFlagTable.h" #include "cmVS14LibFlagTable.h" #include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" @@ -48,6 +53,26 @@ cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetClFlagTable( } } +cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetCSharpFlagTable( + std::string const& name, std::string const& toolset) const +{ + std::string const useToolset = this->GetToolsetName(name, toolset); + + if ((useToolset == "v141")) { + return cmVS141CSharpFlagTable; + } else if (useToolset == "v140") { + return cmVS140CSharpFlagTable; + } else if (useToolset == "v120") { + return cmVS12CSharpFlagTable; + } else if (useToolset == "v110") { + return cmVS11CSharpFlagTable; + } else if (useToolset == "v100") { + return cmVS10CSharpFlagTable; + } else { + return 0; + } +} + cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetRcFlagTable( std::string const& name, std::string const& toolset) const { diff --git a/Source/cmVisualStudio10ToolsetOptions.h b/Source/cmVisualStudio10ToolsetOptions.h index bb0be15..2459f5e 100644 --- a/Source/cmVisualStudio10ToolsetOptions.h +++ b/Source/cmVisualStudio10ToolsetOptions.h @@ -19,6 +19,8 @@ class cmVisualStudio10ToolsetOptions public: cmIDEFlagTable const* GetClFlagTable(std::string const& name, std::string const& toolset) const; + cmIDEFlagTable const* GetCSharpFlagTable(std::string const& name, + std::string const& toolset) const; cmIDEFlagTable const* GetRcFlagTable(std::string const& name, std::string const& toolset) const; cmIDEFlagTable const* GetLibFlagTable(std::string const& name, diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index dee288c..b8e227f 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -160,7 +160,9 @@ int main(int ac, char const* const* av) #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) // Replace streambuf so we can output Unicode to console cmsys::ConsoleBuf::Manager consoleOut(std::cout); + consoleOut.SetUTF8Pipes(); cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); + consoleErr.SetUTF8Pipes(); #endif cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(ac, av); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 1acd240..1cf75c8 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -116,7 +116,9 @@ int main(int argc, char const* const* argv) #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) // Replace streambuf so we can output Unicode to console cmsys::ConsoleBuf::Manager consoleOut(std::cout); + consoleOut.SetUTF8Pipes(); cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true); + consoleErr.SetUTF8Pipes(); #endif cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 405917a..d680205 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -31,6 +31,9 @@ create_test_sourcelist(CMakeLib_TEST_SRCS CMakeLibTests.cxx ${CMakeLib_TESTS}) add_executable(CMakeLibTests ${CMakeLib_TEST_SRCS}) target_link_libraries(CMakeLibTests CMakeLib) +add_executable(testEncoding testEncoding.cxx) +target_link_libraries(testEncoding cmsys) + # Xcode 2.x forgets to create the output directory before linking # the individual architectures. if(CMAKE_OSX_ARCHITECTURES AND XCODE diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx new file mode 100644 index 0000000..88743b0 --- /dev/null +++ b/Tests/CMakeLib/testEncoding.cxx @@ -0,0 +1,49 @@ +#include <fstream> +#include <iostream> +#include <string> + +#include <cmsys/ConsoleBuf.hxx> + +#ifdef _WIN32 +void setEncoding(cmsys::ConsoleBuf::Manager& buf, UINT codepage) +{ + cmsys::ConsoleBuf* cb = buf.GetConsoleBuf(); + if (cb) { + cb->input_pipe_codepage = codepage; + cb->output_pipe_codepage = codepage; + cb->input_file_codepage = codepage; + cb->output_file_codepage = codepage; + cb->activateCodepageChange(); + } +} +#endif + +int main(int argc, char* argv[]) +{ +#ifdef _WIN32 + cmsys::ConsoleBuf::Manager consoleOut(std::cout); +#endif + if (argc <= 2) { + std::cout << "Usage: testEncoding <encoding> <file>" << std::endl; + return 1; + } + const std::string encoding(argv[1]); +#ifdef _WIN32 + if (encoding == "UTF8") { + setEncoding(consoleOut, CP_UTF8); + } else if (encoding == "ANSI") { + setEncoding(consoleOut, CP_ACP); + } else if (encoding == "OEM") { + setEncoding(consoleOut, CP_OEMCP); + } // else AUTO +#endif + std::ifstream file(argv[2]); + if (!file.is_open()) { + std::cout << "Failed to open file: " << argv[2] << std::endl; + return 2; + } + std::string text((std::istreambuf_iterator<char>(file)), + std::istreambuf_iterator<char>()); + std::cout << text; + return 0; +} diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 9dc540f..c02b917 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -179,6 +179,9 @@ add_RunCMake_test(add_custom_target) add_RunCMake_test(add_dependencies) add_RunCMake_test(add_subdirectory) add_RunCMake_test(build_command) +if(NOT CMake_TEST_EXTERNAL_CMAKE) + set(execute_process_ARGS -DTEST_ENCODING_EXE=$<TARGET_FILE:testEncoding>) +endif() add_RunCMake_test(execute_process) add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 247855a..6cc3054 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -75,6 +75,7 @@ function(run_cmake test) OUTPUT_VARIABLE actual_stdout ERROR_VARIABLE ${actual_stderr_var} RESULT_VARIABLE actual_result + ENCODING UTF8 ${maybe_timeout} ) else() @@ -90,6 +91,7 @@ function(run_cmake test) OUTPUT_VARIABLE actual_stdout ERROR_VARIABLE ${actual_stderr_var} RESULT_VARIABLE actual_result + ENCODING UTF8 ${maybe_timeout} ) endif() diff --git a/Tests/RunCMake/execute_process/CMakeLists.txt b/Tests/RunCMake/execute_process/CMakeLists.txt new file mode 100644 index 0000000..a640c56 --- /dev/null +++ b/Tests/RunCMake/execute_process/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.7) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/execute_process/Encoding.cmake b/Tests/RunCMake/execute_process/Encoding.cmake new file mode 100644 index 0000000..3dc7c39 --- /dev/null +++ b/Tests/RunCMake/execute_process/Encoding.cmake @@ -0,0 +1,6 @@ +execute_process( + COMMAND ${TEST_ENCODING_EXE} ${TEST_ENCODING} ${CMAKE_CURRENT_LIST_DIR}/EncodingUTF8-stderr.txt + OUTPUT_VARIABLE out + ENCODING ${TEST_ENCODING} + ) +message("${out}") diff --git a/Tests/RunCMake/execute_process/EncodingMissing-result.txt b/Tests/RunCMake/execute_process/EncodingMissing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/execute_process/EncodingMissing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/execute_process/EncodingMissing-stderr.txt b/Tests/RunCMake/execute_process/EncodingMissing-stderr.txt new file mode 100644 index 0000000..1a69579 --- /dev/null +++ b/Tests/RunCMake/execute_process/EncodingMissing-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at EncodingMissing.cmake:[0-9]+ \(execute_process\): + execute_process called with no value for ENCODING. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/execute_process/EncodingMissing.cmake b/Tests/RunCMake/execute_process/EncodingMissing.cmake new file mode 100644 index 0000000..ae97480 --- /dev/null +++ b/Tests/RunCMake/execute_process/EncodingMissing.cmake @@ -0,0 +1 @@ +execute_process(ENCODING) diff --git a/Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt b/Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt new file mode 100644 index 0000000..0ac68de --- /dev/null +++ b/Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt @@ -0,0 +1 @@ +यूनिकोड είναι very здорово! diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake index 2080437..62e18c6 100644 --- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake +++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake @@ -6,3 +6,8 @@ unset(RunCMake_TEST_OUTPUT_MERGE) run_cmake_command(MergeOutputFile ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/MergeOutputFile.cmake) run_cmake_command(MergeOutputVars ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/MergeOutputVars.cmake) + +run_cmake(EncodingMissing) +if(TEST_ENCODING_EXE) + run_cmake_command(EncodingUTF8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake) +endif() |