Files
fail/cmake/compilerconfig.cmake
hsc 4a4b3ea7e2 FailBochs build process reversed
The FailBochs client is not linked by the Bochs build system anymore, but
by our cmake scripts (make fail-client):
 -  All Bochs libraries are merged into libfailbochs.a (a new target
    within the Bochs Autotools scripts).
 -  The previous libfail.a is *not* a merge of all Fail* libraries anymore,
    but pulls these in via library dependencies.

Additionally I did a lot of build system cleanup, e.g. additional external
libraries may now be pulled in where they're needed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1390 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-06-29 22:22:41 +00:00

28 lines
949 B
CMake

##### Verbose make ####
option( VERBOSE_MAKE "Verbose Makefile output" OFF) # defaults to OFF
set(CMAKE_VERBOSE_MAKEFILE ${VERBOSE_MAKE})
##### Compilers #####
SET( COMPILER "ag++" CACHE STRING "Use clang/gcc/ag++") # Defaults to ag++
if(${COMPILER} STREQUAL "clang")
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
elseif(${COMPILER} STREQUAL "gcc")
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
elseif(${COMPILER} STREQUAL "ag++")
set(CMAKE_C_COMPILER "ag++")
set(CMAKE_CXX_COMPILER "ag++")
## Here we add the build dir holding the generated header files (protobuf)
add_definitions("-p ${CMAKE_SOURCE_DIR} --real-instances --Xcompiler" )
else(${COMPILER} STREQUAL "clang")
message(FATAL_ERROR "COMPILER must be exactly one of clang/gcc/ag++. If unsure, use 'ag++'.")
endif(${COMPILER} STREQUAL "clang")
message(STATUS "[${PROJECT_NAME}] Compiler: ${CMAKE_C_COMPILER}/${CMAKE_CXX_COMPILER}" )