diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-12 13:14:01 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-12 13:14:01 +0200 |
commit | 4fad20f754c754b6bd1cacadc3016babb3188bcf (patch) | |
tree | 119101ea62d90dde7d6d6da89b651c52f6835d33 /task.cc | |
parent | ee825bf2e966a1b565473753adb3f2b74f6d0ce4 (diff) |
Comparison using dg sources
Diffstat (limited to 'task.cc')
-rw-r--r-- | task.cc | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -156,9 +156,16 @@ void Task::start() if(recompile) { - std::string cmd = - "g++ -MMD -c " + std::string(sourceFile) + " " + - config.cxxflags + " " + + std::string comp = "g++"; + std::string flags = config.cxxflags; + if(std::string(sourceFile.extension()) == ".c") + { + comp = "gcc"; + flags = config.cflags; + } + std::string cmd = comp + + " -MMD -c " + std::string(sourceFile) + " " + + flags + " " + "-o " + std::string(targetFile); std::cout << cmd << "\n"; |