summaryrefslogtreecommitdiffstats
path: root/labb8/Trailblazer.pro
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-12-03 17:11:43 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-12-08 10:21:07 +0100
commit0c39051ba80f04b1177833a006f2d442a7170b56 (patch)
tree9e657946a061b5b305f9cf75634db7b37e979eb3 /labb8/Trailblazer.pro
parent7b7f6808a7b2db2ed21103767434c1445f7815c2 (diff)
downloadtddd86-0c39051ba80f04b1177833a006f2d442a7170b56.tar.gz
add initial files l8
Diffstat (limited to 'labb8/Trailblazer.pro')
-rwxr-xr-xlabb8/Trailblazer.pro68
1 files changed, 68 insertions, 0 deletions
diff --git a/labb8/Trailblazer.pro b/labb8/Trailblazer.pro
new file mode 100755
index 0000000..75d3122
--- /dev/null
+++ b/labb8/Trailblazer.pro
@@ -0,0 +1,68 @@
+TEMPLATE = app
+
+# Make sure we do not accidentally #include files placed in 'resources'
+CONFIG += no_include_pwd
+
+# Reduce compile times and avoid configuration confusion by excluding Qt libs
+#CONFIG -= qt
+
+# Do not create an app bundle when running on OS X
+#CONFIG -= app_bundle
+
+SOURCES = $$PWD/src/*.cpp
+SOURCES += $$PWD/lib/StanfordCPPLib/*.cpp
+
+HEADERS = $$PWD/src/*.h
+HEADERS += $$PWD/lib/StanfordCPPLib/*.h
+# HEADERS += $$PWD/lib/StanfordCPPLib/private/*.h
+
+# GCC defaults to not warning about failing to return from a non-void function
+# We enable this warning manually, since Clang warns by default
+QMAKE_CXXFLAGS += -std=c++11 -Wreturn-type
+
+# These flags increase the recursion stack size so that recursive DFS doesn't
+# exhaust all available stack space on large graphs
+QMAKE_CXXFLAGS += -fno-stack-limit -fstack-check
+
+INCLUDEPATH += $$PWD/lib/StanfordCPPLib/
+
+# Copies the given files to the destination directory
+# The rest of this file defines how to copy the resources folder
+defineTest(copyToDestdir) {
+ files = $$1
+
+ for(FILE, files) {
+ DDIR = $$OUT_PWD
+
+ # Replace slashes in paths with backslashes for Windows
+ win32:FILE ~= s,/,\\,g
+ win32:DDIR ~= s,/,\\,g
+
+ !win32 {
+ copyResources.commands += cp -r '"'$$FILE'"' '"'$$DDIR'"' $$escape_expand(\\n\\t)
+ }
+ win32 {
+ copyResources.commands += xcopy '"'$$FILE'"' '"'$$DDIR'"' /e /y $$escape_expand(\\n\\t)
+ }
+ }
+ export(copyResources.commands)
+}
+
+!win32 {
+ copyToDestdir($$files($$PWD/res/*))
+ copyToDestdir($$files($$PWD/lib/*.jar))
+}
+win32 {
+ QMAKE_LFLAGS += -Wl,--stack,100000000 # stop stack from overflowing
+ copyToDestdir($$PWD/res)
+ copyToDestdir($$PWD/lib/*.jar)
+}
+
+copyResources.input = $$files($$PWD/res/*)
+OTHER_FILES = $$files(res/*)
+QMAKE_EXTRA_TARGETS += copyResources
+POST_TARGETDEPS += copyResources
+
+macx {
+ cache()
+}