From 5836a99f7b2c0aa454e3c256cad15a2c1d02d83a Mon Sep 17 00:00:00 2001 From: Carlos Estrague Date: Sat, 18 Apr 2020 21:30:06 +0200 Subject: [PATCH] Initial Nvidia jetson nano with Vulkan Support --- neo/CMakeLists.txt | 4 +++- neo/cmake-linux-nvidia-jetson-vulkan-release.sh | 5 +++++ neo/idlib/sys/sys_defines.h | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 neo/cmake-linux-nvidia-jetson-vulkan-release.sh diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 1a36eef6..71f7102b 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -62,7 +62,9 @@ option(USE_SYSTEM_RAPIDJSON set(CPU_TYPE "" CACHE STRING "When set, passes this string as CPU-ID which will be embedded into the binary.") -set(CPU_OPTIMIZATION "-mmmx -msse -msse2" CACHE STRING "Which CPU specific optimitations should be used beside the compiler's default?") +if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)") + set(CPU_OPTIMIZATION "-mmmx -msse -msse2" CACHE STRING "Which CPU specific optimitations should be used beside the compiler's default?") +endif() option(USE_INTRINSICS "Compile using intrinsics (e.g mmx, sse, msse2)" ON) diff --git a/neo/cmake-linux-nvidia-jetson-vulkan-release.sh b/neo/cmake-linux-nvidia-jetson-vulkan-release.sh new file mode 100755 index 00000000..4f022002 --- /dev/null +++ b/neo/cmake-linux-nvidia-jetson-vulkan-release.sh @@ -0,0 +1,5 @@ +cd .. +rm -rf build +mkdir build +cd build +cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DUSE_INTRINSICS=OFF -DUSE_VULKAN=ON -DSPIRV_SHADERC=OFF ../neo diff --git a/neo/idlib/sys/sys_defines.h b/neo/idlib/sys/sys_defines.h index 18337811..5163a1a9 100644 --- a/neo/idlib/sys/sys_defines.h +++ b/neo/idlib/sys/sys_defines.h @@ -111,7 +111,9 @@ If you have questions concerning this license or the applicable additional terms #define CPUSTRING "x86_64" #elif defined(__e2k__) #define CPUSTRING "e2k" - #else + #elif defined(__aarch64__) || defined(__ARM64__) || defined(_M_ARM64) + #define CPUSTRING "aarch64" + #else #error unknown CPU #endif #endif