From 4afacac4643efd03cf9d1fd5578e647ba1f32ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 31 Dec 2012 13:39:39 +0100 Subject: Remove obsolete CLang & MSVS tools. Change-Id: I5fbe1a44ae95c80eaf11bda466576154633abda8 diff --git a/BuildTools/CLang/.gitignore b/BuildTools/CLang/.gitignore deleted file mode 100644 index df682c0..0000000 --- a/BuildTools/CLang/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -CLangDiagnosticsFlags -CLangDiagnosticsFlagsTool.sh -CLangDiagnosticsFlagsTool -clang-diagnostics-overview.* diff --git a/BuildTools/CLang/CLangDiagnosticsFlagsTool.cpp b/BuildTools/CLang/CLangDiagnosticsFlagsTool.cpp deleted file mode 100644 index ccd5925..0000000 --- a/BuildTools/CLang/CLangDiagnosticsFlagsTool.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2011 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// ----------------------------------------------------------------------------- -// Include diagnostics data from CLang -// ----------------------------------------------------------------------------- - -#define DIAG(name, a, b, c, d, e, f, g) name, - -namespace diag { - enum LexKinds { -#include -#include -#include -#include -#include -#include - }; -} - -#define GET_DIAG_ARRAYS -#include -#undef GET_DIAG_ARRAYS - -struct DiagTableEntry { - const char* name; - const short* array; - const short* group; -}; - -static const DiagTableEntry diagnostics[] = { -#define GET_DIAG_TABLE -#include -#undef GET_DIAG_TABLE -}; -static const size_t diagnostics_count = sizeof(diagnostics) / sizeof(diagnostics[0]); - -// ----------------------------------------------------------------------------- - -using namespace boost; - -struct Properties { - Properties() : have(false), implicitHave(false), dontWant(false), implicitDontWant(false), ignored(false), available(false), missing(false), redundant(false), alreadyCovered(false) { - } - - std::string name; - bool have; - bool implicitHave; - bool dontWant; - bool implicitDontWant; - bool ignored; - bool available; - bool missing; - bool redundant; - bool alreadyCovered; -}; - -class GraphVizLabelWriter { - public: - GraphVizLabelWriter(const std::vector& properties) : properties(properties) { - } - - template - void operator()(std::ostream& out, const VertexOrEdge& v) const { - std::string color; - if (properties[v].missing) { - color = "orange"; - } - else if (properties[v].redundant) { - color = "lightblue"; - } - else if (properties[v].have) { - color = "darkgreen"; - } - else if (properties[v].implicitHave) { - color = "green"; - } - else if (properties[v].dontWant) { - color = "red"; - } - else if (properties[v].implicitDontWant) { - color = "pink"; - } - else if (properties[v].ignored) { - color = "white"; - } - else if (properties[v].available) { - color = "yellow"; - } - else { - assert(false); - } - out << "[label=" << escape_dot_string(properties[v].name) << " fillcolor=\"" << color << "\" style=filled]"; - } - - private: - const std::vector properties; -}; - -int main(int argc, char* argv[]) { - // Parse command-line arguments - std::set have; - std::set dontWant; - std::string outputDir; - for (int i = 1; i < argc; ++i) { - std::string arg(argv[i]); - if (starts_with(arg, "-W")) { - have.insert(arg.substr(2, arg.npos)); - } - else if (starts_with(arg, "-w")) { - dontWant.insert(arg.substr(2, arg.npos)); - } - else if (starts_with(arg, "-O")) { - outputDir = arg.substr(2, arg.npos) + "/"; - } - } - - // Build the graph and initialize properties - typedef adjacency_list Graph; - typedef graph_traits::vertex_descriptor Vertex; - Graph g(diagnostics_count); - std::vector properties(num_vertices(g)); - for (size_t i = 0; i < diagnostics_count; ++i) { - std::string name(diagnostics[i].name); - properties[i].name = name; - properties[i].implicitHave = properties[i].have = have.find(name) != have.end(); - properties[i].implicitDontWant = properties[i].dontWant = dontWant.find(name) != dontWant.end(); - properties[i].ignored = diagnostics[i].group == 0 && diagnostics[i].array == 0; - properties[i].alreadyCovered = false; - properties[i].available = true; - for (const short* j = diagnostics[i].group; j && *j != -1; ++j) { - add_edge(i, *j, g); - } - } - - // Sort the diagnostics - std::list sortedDiagnostics; - boost::topological_sort(g, std::front_inserter(sortedDiagnostics)); - - // Propagate dontWant and have properties down - for(std::list::const_iterator i = sortedDiagnostics.begin(); i != sortedDiagnostics.end(); ++i) { - graph_traits::adjacency_iterator adjacentIt, adjacentEnd; - for (tie(adjacentIt, adjacentEnd) = adjacent_vertices(*i, g); adjacentIt != adjacentEnd; ++adjacentIt) { - properties[*adjacentIt].implicitDontWant = properties[*i].implicitDontWant || properties[*adjacentIt].implicitDontWant; - properties[*adjacentIt].implicitHave = properties[*i].implicitHave || properties[*adjacentIt].implicitHave; - } - } - - // Propagate 'available' property upwards - for(std::list::const_reverse_iterator i = sortedDiagnostics.rbegin(); i != sortedDiagnostics.rend(); ++i) { - properties[*i].available = properties[*i].available && !properties[*i].implicitDontWant; - graph_traits::in_edge_iterator edgesIt, edgesEnd; - graph_traits::edge_descriptor edge; - for (tie(edgesIt, edgesEnd) = in_edges(*i, g); edgesIt != edgesEnd; ++edgesIt) { - properties[source(*edgesIt, g)].available = properties[source(*edgesIt, g)].available && properties[*i].available; - } - } - - // Collect missing & redundant flags - std::set missing; - std::set redundant; - for(std::list::const_iterator i = sortedDiagnostics.begin(); i != sortedDiagnostics.end(); ++i) { - bool markChildrenCovered = true; - if (properties[*i].alreadyCovered) { - if (properties[*i].have) { - properties[*i].redundant = true; - redundant.insert(properties[*i].name); - } - } - else { - if (properties[*i].available) { - if (!properties[*i].implicitHave && !properties[*i].ignored) { - properties[*i].missing = true; - missing.insert(properties[*i].name); - } - } - else { - markChildrenCovered = false; - } - } - if (markChildrenCovered) { - graph_traits::adjacency_iterator adjacentIt, adjacentEnd; - for (tie(adjacentIt, adjacentEnd) = adjacent_vertices(*i, g); adjacentIt != adjacentEnd; ++adjacentIt) { - properties[*adjacentIt].alreadyCovered = true; - } - } - } - - // Write information - if (!missing.empty()) { - std::cout << "Missing diagnostic flags: "; - for(std::set::const_iterator i = missing.begin(); i != missing.end(); ++i) { - std::cout << "-W" << *i << " "; - } - std::cout<< std::endl; - } - - if (!redundant.empty()) { - std::cout << "Redundant diagnostic flags: "; - for(std::set::const_iterator i = redundant.begin(); i != redundant.end(); ++i) { - std::cout << "-W" << *i << " "; - } - std::cout<< std::endl; - } - - // Write graphviz file - if (!outputDir.empty()) { - std::ofstream f((outputDir + "clang-diagnostics-overview.dot").c_str()); - write_graphviz(f, g, GraphVizLabelWriter(properties)); - f.close(); - } - - return 0; -} diff --git a/BuildTools/CLang/SConscript b/BuildTools/CLang/SConscript deleted file mode 100644 index 850c35c..0000000 --- a/BuildTools/CLang/SConscript +++ /dev/null @@ -1,15 +0,0 @@ -Import("env") - -#myenv = Environment() -#myenv.Append(CPPPATH = ["."]) -#myenv.Program("CLangDiagnosticsFlagsTool", ["CLangDiagnosticsFlagsTool.cpp"]) -# -#disabledDiagnostics = ["-wunreachable-code", "-wunused-macros", "-wmissing-noreturn", "-wlong-long", "-wcast-align", "-wglobal-constructors", "-wmissing-prototypes", "-wpadded", "-wshadow"] -#clangDiagnosticsFlagsToolCommand = "BuildTools/CLang/CLangDiagnosticsFlagsTool -O" + env.Dir(".").abspath + " " + " ".join(disabledDiagnostics) + " " -#clangDiagnosticsFlagsToolCommand += " ".join([flag for flag in env["CXXFLAGS"] if flag.startswith("-W")]) -#clangDiagnosticsFlagsToolCommand += "\n" -#clangDiagnosticsFlagsToolCommand += "dot -Tpng " + env.Dir(".").abspath + "/clang-diagnostics-overview.dot > " + env.Dir(".").abspath + "/clang-diagnostics-overview.png\n" -#v = env.WriteVal("#/BuildTools/CLang/CLangDiagnosticsFlagsTool.sh", env.Value(clangDiagnosticsFlagsToolCommand)) -#env.AddPostAction(v, Chmod(v[0], 0755)) -# -# diff --git a/BuildTools/MSVS/.gitignore b/BuildTools/MSVS/.gitignore deleted file mode 100644 index 95a4834..0000000 --- a/BuildTools/MSVS/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.suo -*.ncp -Slimber -Swift diff --git a/BuildTools/MSVS/GenerateProjects.py b/BuildTools/MSVS/GenerateProjects.py deleted file mode 100644 index d13df08..0000000 --- a/BuildTools/MSVS/GenerateProjects.py +++ /dev/null @@ -1,100 +0,0 @@ -import os, os.path - -projects = [("Swift", "Swift\QtUI\Swift.exe"), ("Slimber", "Slimber\Qt\Slimber.exe")] - -for (project, outputbin) in projects : - if not os.path.exists(project) : - os.mkdir(project) - output = open(os.path.join(project, project + ".vcproj"), "w") - - headers = [] - sources = [] - for root, dirs, files in os.walk(os.path.join("..", "..", project)) : - for file in files : - if file.endswith(".h") : - headers.append('') - elif file.endswith(".cpp") : - sources.append('') - - output.write(""" - - - - - - - - - - - - - - - - - - - %(sources)s - - - %(headers)s - - - - - - -""" % { "project": project, "output" : outputbin, "headers" : '\n'.join(headers), "sources": '\n'.join(sources) }) - output.close() diff --git a/BuildTools/MSVS/Swift.sln b/BuildTools/MSVS/Swift.sln deleted file mode 100644 index 2724f81..0000000 --- a/BuildTools/MSVS/Swift.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Swift", "Swift\Swift.vcproj", "{C67C3A5B-1382-4B4A-88F7-3BFC98DA43A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Slimber", "Slimber\Slimber.vcproj", "{597242B2-A667-47A1-B69E-D2C4281183D0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C67C3A5B-1382-4B4A-88F7-3BFC98DA43A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {C67C3A5B-1382-4B4A-88F7-3BFC98DA43A2}.Debug|Win32.Build.0 = Debug|Win32 - {C67C3A5B-1382-4B4A-88F7-3BFC98DA43A2}.Release|Win32.ActiveCfg = Release|Win32 - {C67C3A5B-1382-4B4A-88F7-3BFC98DA43A2}.Release|Win32.Build.0 = Release|Win32 - {597242B2-A667-47A1-B69E-D2C4281183D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {597242B2-A667-47A1-B69E-D2C4281183D0}.Debug|Win32.Build.0 = Debug|Win32 - {597242B2-A667-47A1-B69E-D2C4281183D0}.Release|Win32.ActiveCfg = Release|Win32 - {597242B2-A667-47A1-B69E-D2C4281183D0}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index f18adc5..3f02106 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -525,9 +525,6 @@ else : # Project files ################################################################################ -# Build tools -env.SConscript(dirs = ["#/BuildTools/CLang"]) - # Modules modules = [] for dir in os.listdir(Dir("#/3rdParty").abspath) : -- cgit v0.10.2-6-g49f6