File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1717 - name : Install dependencies
1818 run : sudo apt-get update && sudo apt install -y --fix-missing --no-install-recommends git build-essential software-properties-common cmake libtbb-dev libboost-system-dev libboost-serialization-dev libpdal-dev libeigen3-dev
1919 - name : Build
20- run : mkdir build && cd build && cmake -DWITH_GBT=ON .. && make -j$(nproc)
20+ run : mkdir build && cd build && cmake -DWITH_GBT=ON -DPORTABLE_BUILD=ON .. && make -j$(nproc)
2121 - name : Archive compiled binaries
2222 run : cd build && tar -czvf opc.tar.gz pcclassify pctrain
2323 - name : Upload Distribution Files
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ SET(WITH_GBT OFF CACHE BOOL "Build GBT support")
55SET (WITH_PDAL ON CACHE BOOL "Build PDAL readers support" )
66SET (BUILD_PCTRAIN ON CACHE BOOL "Build pctrain" )
77SET (BUILD_PCCLASSIFY ON CACHE BOOL "Build pcclassify" )
8-
8+ SET (PORTABLE_BUILD OFF CACHE BOOL "Build portable binaries" )
99
1010if (NOT CMAKE_BUILD_TYPE )
1111 set (CMAKE_BUILD_TYPE "Release" CACHE STRING
@@ -23,8 +23,14 @@ if (NOT WIN32 AND NOT APPLE)
2323endif ()
2424
2525if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU" ))
26- if ( NOT ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64" ) OR (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64" )) )
27- add_compile_options (-march=native)
26+ if (NOT ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64" ) OR (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64" )))
27+ if (NOT PORTABLE_BUILD)
28+ message ("Building with native optimizations" )
29+ add_compile_options (-march=native)
30+ else ()
31+ message ("Building portable binaries" )
32+ add_compile_options (-march=nehalem)
33+ endif ()
2834 endif ()
2935endif ()
3036
You can’t perform that action at this time.
0 commit comments