blob: 2fe41d37a5c7ba0ac8307a0732a0aba0e93bff19 [file] [log] [blame]
Pascal Bachd5f87e12014-12-12 15:59:17 +01001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
20
21# Always include srcdir and builddir in include path
22# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
23# about every subdir
24# since cmake 2.4.0
25set(CMAKE_INCLUDE_CURRENT_DIR ON)
26
27# Put the include dirs which are in the source or build tree
28# before all other include dirs, so the headers in the sources
29# are prefered over the already installed ones
30# since cmake 2.4.1
31set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
32
33# Use colored output
34# since cmake 2.4.0
35set(CMAKE_COLOR_MAKEFILE ON)
36
37# Define the generic version of the libraries here
38set(GENERIC_LIB_VERSION "0.1.0")
39set(GENERIC_LIB_SOVERSION "0")
40
41# Set the default build type to release with debug info
42if (NOT CMAKE_BUILD_TYPE)
43 set(CMAKE_BUILD_TYPE RelWithDebInfo
44 CACHE STRING
45 "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
46 )
47endif (NOT CMAKE_BUILD_TYPE)
48
49# Create the compile command database for clang by default
50set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
51
52# Put the libraries and binaries that get built into directories at the
53# top of the build tree rather than in hard-to-find leaf
54# directories. This simplifies manual testing and the use of the build
55# tree rather than installed thrift libraries.
56set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
57set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
58set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)