# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version # 2.0 (the "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. SET(CMAKE_SYSTEM_NAME MacOSX) SET(CMAKE_SYSTEM_VERSION 1) SET(TARGET_OS MacOSX) SET(TARGET_ARCH X86_64) include(CMakeForceCompiler) CMAKE_FORCE_C_COMPILER(clang clang) CMAKE_FORCE_CXX_COMPILER(clang++ clang) SET(CMAKE_C_FLAGS_DEBUG "-m64 -ggdb -Wall -D_DEBUG" CACHE STRING "C Flags Debug" FORCE) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CACHE STRING "CXX Flags Debug" FORCE) SET(CMAKE_C_FLAGS_RELEASE "-m64 -Wall -O3 -DNDEBUG" CACHE STRING "C Flags Release" FORCE) SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "CXX Flags Release" FORCE) add_definitions("-DTARGET_OS=MacOSX") add_definitions("-DTARGET_ARCH=X86_64") add_definitions("-DOS_MacOSX") add_definitions("-DARCH_X86_64") #Use GTEST own tuple implementation for OSX ADD_DEFINITIONS ("-DGTEST_USE_OWN_TR1_TUPLE=1")