-
Notifications
You must be signed in to change notification settings - Fork 25
/
CMakeLists.txt
35 lines (28 loc) · 1.43 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 )
PROJECT( uffs )
SET(CMAKE_CXX_FLAGS_VGL "-O0 -g")
SET(CMAKE_C_FLAGS_VGL "-O0 -g")
SET(CMAKE_C_FLAGS_GCOV "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
SET(CMAKE_CXX_FLAGS_GCOV "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
SET(CMAKE_EXE_LINKER_FLAGS_GCOV "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov")
IF (CMAKE_COMPILER_IS_GNUCC)
IF (APPLE)
SET(CMAKE_CXX_FLAGS "-fPIC -Wall -Werror -g")
SET(CMAKE_C_FLAGS "-fPIC -Wall -Werror -g")
ELSEIF (CYGWIN)
SET(CMAKE_CXX_FLAGS "-Wall -Werror -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-parameter-type -Woverride-init -Wtype-limits -Wuninitialized -g")
SET(CMAKE_C_FLAGS "-Wall -Werror -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-parameter-type -Woverride-init -Wtype-limits -Wuninitialized -g ")
ELSE ()
SET(CMAKE_CXX_FLAGS "-fPIC -Wall -Werror -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-parameter-type -Woverride-init -Wtype-limits -Wuninitialized -g -rdynamic")
SET(CMAKE_C_FLAGS "-fPIC -Wall -Werror -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-parameter-type -Woverride-init -Wtype-limits -Wuninitialized -g -rdynamic")
ENDIF()
ENDIF()
IF (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOS_APPLE")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOS_APPLE")
ENDIF()
IF (UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNIX")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUNIX")
ENDIF()
ADD_SUBDIRECTORY( src )