From 241e53b97e669d2b5c5c0da98f0561dd8887b750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sj=C3=B6lund?= <martin.sjolund@liu.se> Date: Tue, 25 Jun 2019 04:48:16 +0200 Subject: [PATCH] Add Qt copy_file parts --- .gitignore | 1 + copy_file/.gitignore | 3 +++ copy_file/Makefile | 10 ++++++++++ copy_file/Qt.pro | 5 +++++ copy_file/qt.cpp | 8 ++++++++ 5 files changed, 27 insertions(+) create mode 100644 copy_file/Qt.pro create mode 100644 copy_file/qt.cpp diff --git a/.gitignore b/.gitignore index 38d66e7..a4caf5b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.o *.out *.exe +.qmake.stash diff --git a/copy_file/.gitignore b/copy_file/.gitignore index 40825ea..1d68f3f 100644 --- a/copy_file/.gitignore +++ b/copy_file/.gitignore @@ -1,3 +1,6 @@ cpp-linux cpp-*.txt win32.txt +Makefile.qt +QtCopyFile +qt.txt diff --git a/copy_file/Makefile b/copy_file/Makefile index 14a8e6d..b7489da 100644 --- a/copy_file/Makefile +++ b/copy_file/Makefile @@ -25,3 +25,13 @@ cpp-linux.txt: cpp-linux $(SOURCE) cpp-linux: cpp17.cpp clang++ -Wall -std=c++17 -o $@ $< -lstdc++fs + +qt.txt: QtCopyFile + rm -f $@ + ./$< $@ + +QtCopyFile: Makefile.qt qt.cpp + $(MAKE) -f Makefile.qt + +Makefile.qt: Qt.pro + qmake -o $@ $< diff --git a/copy_file/Qt.pro b/copy_file/Qt.pro new file mode 100644 index 0000000..9a5f0af --- /dev/null +++ b/copy_file/Qt.pro @@ -0,0 +1,5 @@ +QT += core + +TARGET = QtCopyFile + +SOURCES += qt.cpp diff --git a/copy_file/qt.cpp b/copy_file/qt.cpp new file mode 100644 index 0000000..ddf77c5 --- /dev/null +++ b/copy_file/qt.cpp @@ -0,0 +1,8 @@ +#include <assert.h> + +int main(int argc, char** argv) +{ + assert(argc==2); /* argv[1] is the destination file */ + /* Your code here */ + return 0; +} -- GitLab