Add nvidia config to build nvidia-compatible binary on osx/linux

Also added config to build a cpu-native binary to take advantage of additional CPU features
This commit is contained in:
Simon Detheridge 2015-01-26 17:50:41 +00:00
parent 6e929a7aaf
commit 52f6415085
2 changed files with 17 additions and 0 deletions

View File

@ -23,6 +23,17 @@ macx {
QMAKE_LFLAGS_RELEASE += -s
}
nvidia {
QMAKE_CXXFLAGS += -DNVIDIA
}
native {
QMAKE_CXXFLAGS += -march=native
} else {
QMAKE_CXXFLAGS += -march=k8
}
DESTDIR = $$(HOME)/Dev/fractorium/Bin
LIBS += -L/usr/lib -ljpeg

View File

@ -21,6 +21,12 @@
#endif
#include <utility>
#ifdef NVIDIA
#undef CL_VERSION_1_2
#define CL_VERSION_1_1
#endif
#include <CL/cl.hpp>
#include <algorithm>