-
Notifications
You must be signed in to change notification settings - Fork 212
/
CMakeLists.txt
44 lines (40 loc) · 1.08 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
35
36
37
38
39
40
41
42
43
44
IF(BIICODE)
INIT_BIICODE_BLOCK()
ADD_BIICODE_TARGETS()
IF(NOT WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_options(${BII_BLOCK_TARGET} INTERFACE -Wall -g -ggdb -O0 )
else()
target_compile_options(${BII_BLOCK_TARGET} INTERFACE -Wall -O2 -DNDEBUG )
endif()
ENDIF()
if(WIN32)
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE shlwapi)
else()
TARGET_LINK_LIBRARIES(${BII_BLOCK_TARGET} INTERFACE pthread)
endif()
ELSE()
cmake_minimum_required(VERSION 2.6)
project(log4z)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "")
set(LIB_SUFFIX "")
if (WIN32)
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(LIB_SUFFIX "")
else()
set(LIB_SUFFIX "_d")
endif()
else(WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-Wall -g -ggdb -O0 )
set(LIB_SUFFIX "_d")
else()
add_definitions(-Wall -O2 -DNDEBUG )
set(LIB_SUFFIX "")
endif()
endif(WIN32)
SET(LOG4Z_LIB_OUT_PATH ${log4z_SOURCE_DIR}/lib)
SET(LOG4Z_BIN_OUT_PATH ${log4z_SOURCE_DIR}/test/bin)
add_subdirectory(g++)
add_subdirectory(test)
ENDIF(BIICODE)