WSL/SLF GitLab Repository

Commit f2e2ed87 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Ported support for Mac fat binaries from MeteoIO

parent 4b20d846
#SPDX-License-Identifier: GPL-3.0-or-later
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) # High Sierra
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake/")
SET(VERSION_MAJOR 2 CACHE INTERNAL "")
......@@ -56,6 +55,7 @@ IF(WIN32)
SET(DLL_EXT "dll")
ENDIF(WIN32)
IF(APPLE)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) # High Sierra
SET(TARGET_TYPE "MACOSX_BUNDLE")
SET(INSTALL_OSX BUNDLE DESTINATION bin)
SET(DLL_EXT "dylib")
......
......@@ -117,9 +117,16 @@ MACRO (SET_COMPILER_OPTIONS)
SET(DEEP_WARNINGS "-Wunused-value -Wshadow -Wpointer-arith -Wconversion -Winline -Wdisabled-optimization -Wctor-dtor-privacy") #-Rpass=.* for static analysis
SET(EXTRA_WARNINGS "-Wextra -pedantic ${DEEP_WARNINGS}") #-Weffc++
SET(OPTIM "-g -O3 -DNDEBUG -DNOSAFECHECKS -flto")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
SET(ARCH_SAFE "-march=nocona -mtune=nocona")
ENDIF()
IF(APPLE)
OPTION(BUILD_FAT_BINARIES "Compile fat binaries, for x86_64 and arm64" OFF)
IF(BUILD_FAT_BINARIES)
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
ENDIF()
ELSE(APPLE)
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
SET(ARCH_SAFE "-march=nocona -mtune=nocona")
ENDIF()
ENDIF(APPLE)
SET(DEBUG "-g3 -O0 -D__DEBUG")
SET(PROFILING "-pg") #add ${PROFILING} to the CFLAGS when necessary
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment