diff options
Diffstat (limited to 'indra/cmake/00-Common.cmake')
| -rw-r--r-- | indra/cmake/00-Common.cmake | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c8520b53ab..42e211c84d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -33,8 +33,10 @@ add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE}) # -- which we do. Without one or the other, we get a ton of Boost warnings. add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS) -if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) +if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_NEON=1 GLM_ENABLE_EXPERIMENTAL=1) +elseif($ENV{MSYSTEM_CARCH} MATCHES aarch64) +add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_ENABLE_EXPERIMENTAL=1) else() # Force enable SSE2 instructions in GLM per the manual # https://github.com/g-truc/glm/blob/master/manual.md#section2_10 @@ -83,6 +85,8 @@ if (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU AND WINDOWS) NOMINMAX # DOM_DYNAMIC # For shared library colladadom _CRT_SECURE_NO_WARNINGS # Allow use of sprintf etc + _CRT_NONSTDC_NO_DEPRECATE # Allow use of sprintf etc + _CRT_OBSOLETE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS # Disable deprecated WinSock API warnings ) add_compile_options( @@ -224,26 +228,17 @@ if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if (DARWIN) + # Use rpath loading on macos + set(CMAKE_MACOSX_RPATH TRUE) + # Warnings should be fatal -- thanks, Nicky Perian, for spotting reversed default set(CLANG_DISABLE_FATAL_WARNINGS OFF) set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") - set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations") - # Ensure that CMAKE_CXX_FLAGS has the correct -g debug information format -- - # see Variables.cmake. - string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}" - CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") - # NOTE: it's critical that the optimization flag is put in front. - # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. -## Really?? On developer machines too? -##set(ENABLE_SIGNING TRUE) -##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") # required for clang-15/xcode-15 since our boost package still uses deprecated std::unary_function/binary_function # see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#C++-Standard-Library - add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) + #add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs) |
