Created
October 9, 2010 04:03
-
-
Save Asher-/617870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.6) | |
project( rb_rpdb C ) | |
# add local modules path for project | |
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/" ) | |
# where to look for source files (headers and source) | |
include_directories( rpdb/include ) | |
# define sub-directories of source that cmake knows about as well a where their output will be put | |
add_subdirectory( rpdb ) | |
# compiler-dependent flags: | |
if( CMAKE_COMPILER_IS_GNUCC ) | |
# gcc | |
add_definitions(-ggdb -fsigned-char -freg-struct-return -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Winline -Werror) | |
else( CMAKE_COMPILER_IS_GNUCC ) | |
# non-gcc (intended for clang) | |
add_definitions(-ggdb -fsigned-char -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Winline -Werror) | |
endif( CMAKE_COMPILER_IS_GNUCC ) | |
message( STATUS "Compiling with flags: ${CMAKE_C_FLAGS}" ) | |
# distribution configuration | |
set(CMAKE_C_FLAGS_DISTRIBUTION "-O3") | |
set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3") | |
set( CMAKE_VERBOSE_MAKEFILE ON ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment