Skip to content

Commit

Permalink
Merge pull request #226 from sabel83/auto_engine
Browse files Browse the repository at this point in the history
auto engine
  • Loading branch information
sabel83 committed Mar 8, 2019
2 parents 4aede24 + 219e48d commit 79de287
Show file tree
Hide file tree
Showing 46 changed files with 2,262 additions and 330 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ enable_testing()

add_subdirectory(app/metashell)
add_subdirectory(app/reference_gen)
add_subdirectory(app/stub/clang)
add_subdirectory(app/stub/cl_de)
add_subdirectory(app/stub/cl_en)
add_subdirectory(app/stub/gcc)

add_subdirectory(test/system/auto_engine)
add_subdirectory(test/system/core)
add_subdirectory(test/system/mdb)
add_subdirectory(test/system/pdb)
Expand All @@ -124,9 +129,11 @@ add_subdirectory(test/unit/pragma)
add_subdirectory(test/unit/replace_part)
add_subdirectory(test/unit/system_test)

add_subdirectory(lib/compiler_stub)
add_subdirectory(lib/core)
add_subdirectory(lib/data)
add_subdirectory(lib/defaults)
add_subdirectory(lib/engine/auto)
add_subdirectory(lib/engine/clang)
add_subdirectory(lib/engine/constant)
add_subdirectory(lib/engine/gcc)
Expand Down
4 changes: 2 additions & 2 deletions app/metashell/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ int main(int argc_, const char* argv_[])
else
{
return eentry->second.build(config_, shell_dir, temp_dir,
env_filename, det, ccfg.displayer(),
&logger);
env_filename, engines, det,
ccfg.displayer(), &logger);
}
},
metashell::defaults::pragma_map(
Expand Down
28 changes: 28 additions & 0 deletions app/stub/cl_de/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Metashell - Interactive C++ template metaprogramming shell
# Copyright (C) 2019, Abel Sinkovics (abel@sinkovics.hu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

project(app_stub_cl_de)

aux_source_directory(. SOURCES)
add_executable(${PROJECT_NAME} ${SOURCES})

enable_warnings(${PROJECT_NAME})

target_link_libraries(
${PROJECT_NAME}

metashell::compiler_stub
)
39 changes: 39 additions & 0 deletions app/stub/cl_de/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Metashell - Interactive C++ template metaprogramming shell
// Copyright (C) 2019, Abel Sinkovics (abel@sinkovics.hu)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

#include <metashell/compiler_stub/cl_stub.hpp>

using namespace metashell;

int main(int argc_, const char* argv_[])
{
compiler_stub::cl_stub compiler(
"Microsoft (R) C/C++-Optimierungscompiler Version 19.16.27025.1 "
"f\xc3\xbcr x86\n"
"Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.\n"
"\n",

"Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ]\n\n",

[](const std::string& option_) {
return "cl : Befehlszeile warning D9002 : Unbekannte Option \"" +
option_ +
"\" wird ignoriert.\n"
"cl : Befehlszeile error D8003 : Name der Quelldatei fehlt.\n";
});

return compiler.run(argc_, argv_).value();
}
28 changes: 28 additions & 0 deletions app/stub/cl_en/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Metashell - Interactive C++ template metaprogramming shell
# Copyright (C) 2019, Abel Sinkovics (abel@sinkovics.hu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

project(app_stub_cl_en)

aux_source_directory(. SOURCES)
add_executable(${PROJECT_NAME} ${SOURCES})

enable_warnings(${PROJECT_NAME})

target_link_libraries(
${PROJECT_NAME}

metashell::compiler_stub
)
38 changes: 38 additions & 0 deletions app/stub/cl_en/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Metashell - Interactive C++ template metaprogramming shell
// Copyright (C) 2019, Abel Sinkovics (abel@sinkovics.hu)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

#include <metashell/compiler_stub/cl_stub.hpp>

using namespace metashell;

int main(int argc_, const char* argv_[])
{
compiler_stub::cl_stub compiler(
"Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27025.1 for x86\n"
"Copyright (C) Microsoft Corporation. All rights reserved.\n"
"\n",

"usage: cl [ option... ] filename... [ /link linkoption... ]\n",

[](const std::string& option_) {
return "cl : Command line warning D9002 : ignoring unknown option '" +
option_ +
"'\n"
"cl : Command line error D8003 : missing source filename\n";
});

return compiler.run(argc_, argv_).value();
}
28 changes: 28 additions & 0 deletions app/stub/clang/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Metashell - Interactive C++ template metaprogramming shell
# Copyright (C) 2019, Abel Sinkovics (abel@sinkovics.hu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

project(app_stub_clang)

aux_source_directory(. SOURCES)
add_executable(${PROJECT_NAME} ${SOURCES})

enable_warnings(${PROJECT_NAME})

target_link_libraries(
${PROJECT_NAME}

metashell::compiler_stub
)

0 comments on commit 79de287

Please sign in to comment.