From 9eb18e0c95b5b0d9b495be9cd0baa29435ddba2b Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 9 Feb 2019 00:20:05 +0100 Subject: [PATCH] Change default compiler from g++ to g++ -x c++ g++ guesses the language from file extensions. -x c++ forces the language to C++, so you don't need file extensions on your scripts. --- CMakeLists.txt | 2 +- compilescript.1.adoc | 2 +- src/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index baf4c11..e231660 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.2) project(compilescript - VERSION 0.3.4 + VERSION 0.3.5 LANGUAGES CXX ) diff --git a/compilescript.1.adoc b/compilescript.1.adoc index d8c1e1c..5247cf7 100644 --- a/compilescript.1.adoc +++ b/compilescript.1.adoc @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) [source,conf] ---- -compiler = "g++"; +compiler = "g++ -x c++"; clean_after_hours = 720; cache_dir = "/home/user/.cache/compilescript"; ---- diff --git a/src/main.cpp b/src/main.cpp index 1f58696..8694a76 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,7 +42,7 @@ using std::chrono::system_clock; using std::chrono::hours; using std::chrono::duration_cast; -string compiler = "g++"; +string compiler = "g++ -x c++"; fs::path cache_dir; int clean_after_hours = 30 * 24;