From a4b4b41577d4d8d1e86d800beef3d65cb6d4d33c Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 25 Jan 2019 04:18:04 +0100 Subject: [PATCH] Allow # and ; as comment indicators --- CMakeLists.txt | 2 +- src/main.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e14fceb..b582d3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.2) project(compilescript - VERSION 0.3.2 + VERSION 0.3.3 LANGUAGES CXX ) diff --git a/src/main.cpp b/src/main.cpp index d3a58d9..f2dc13c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -174,6 +174,11 @@ int main(int argc, char *argv[]) { compiler_arguments = buf.substr(16); } + else if ((buf.substr(0, 15) == "#compilescript:") || + (buf.substr(0, 15) == ";compilescript:")) + { + compiler_arguments = buf.substr(15); + } else { out << buf << endl;