| # |
| # 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_32) |
| |
| SET(CMAKE_OSX_ARCHITECTURES i386) |
| |
| include(CMakeForceCompiler) |
| CMAKE_FORCE_C_COMPILER(clang clang) |
| CMAKE_FORCE_CXX_COMPILER(clang++ clang) |
| |
| SET(CMAKE_C_FLAGS_DEBUG "-m32 -arch i386 -ggdb -Wall -D_DEBUG") |
| SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") |
| |
| SET(CMAKE_C_FLAGS_RELEASE "-m32 -arch i386 -Wall -O3 -DNDEBUG") |
| SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") |
| |
| add_definitions("-DTARGET_OS=MacOSX") |
| add_definitions("-DTARGET_ARCH=X86_32") |
| add_definitions("-DOS_MacOSX") |
| add_definitions("-DARCH_X86_32") |
| |
| #Use GTEST own tuple implementation for OSX |
| ADD_DEFINITIONS ("-DGTEST_USE_OWN_TR1_TUPLE=1") |