Fixes for arm64
This commit is contained in:
parent
ac1e5294b4
commit
05a6df43d6
|
@ -75,6 +75,13 @@ if(NOT CXX_MARCH)
|
||||||
set(CXX_MARCH native)
|
set(CXX_MARCH native)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
IF(NOT APPLE OR NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||||
|
set(BASALT_MARCH_FLAGS "-march=${CXX_MARCH}")
|
||||||
|
ELSE()
|
||||||
|
message(STATUS "Running on Apple ${CMAKE_SYSTEM_PROCESSOR}. Disabled -march flag.")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
@ -239,7 +246,7 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
# setup combined compiler flags
|
# setup combined compiler flags
|
||||||
set(CMAKE_CXX_FLAGS "${BASALT_CXX_FLAGS} -march=${CXX_MARCH} ${BASALT_PASSED_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${BASALT_CXX_FLAGS} ${BASALT_MARCH_FLAGS} ${BASALT_PASSED_CXX_FLAGS}")
|
||||||
|
|
||||||
|
|
||||||
set(EIGEN_INCLUDE_DIR_HINTS ${EIGEN_ROOT})
|
set(EIGEN_INCLUDE_DIR_HINTS ${EIGEN_ROOT})
|
||||||
|
|
|
@ -50,7 +50,7 @@ set_target_properties(opengv PROPERTIES
|
||||||
# fix opengv: compile options (CMAKE_CXX_FLAGS is overwritten by Opengv)
|
# fix opengv: compile options (CMAKE_CXX_FLAGS is overwritten by Opengv)
|
||||||
target_compile_options(opengv PRIVATE
|
target_compile_options(opengv PRIVATE
|
||||||
-Wno-unused-private-field
|
-Wno-unused-private-field
|
||||||
-march=${CXX_MARCH}
|
${BASALT_MARCH_FLAGS}
|
||||||
${BASALT_PASSED_CXX_FLAGS})
|
${BASALT_PASSED_CXX_FLAGS})
|
||||||
|
|
||||||
# TODO: enable once mpark issue is fixed upstream pangolin
|
# TODO: enable once mpark issue is fixed upstream pangolin
|
||||||
|
@ -69,7 +69,7 @@ endif()
|
||||||
|
|
||||||
# fix pangolin: macOS >= 10.14 Mojave
|
# fix pangolin: macOS >= 10.14 Mojave
|
||||||
if(APPLE AND CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 18.0.0)
|
if(APPLE AND CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 18.0.0)
|
||||||
target_compile_options(pangolin PRIVATE "-Wno-deprecated-declarations")
|
target_compile_options(pangolin PRIVATE "-Wno-deprecated-declarations" "-Wno-deprecated-copy")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# fix pangolin: clang
|
# fix pangolin: clang
|
||||||
|
|
Loading…
Reference in New Issue