-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (28 loc) · 960 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (28 loc) · 960 Bytes
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
cmake_minimum_required(VERSION 3.4.1)
project(libcli)
message("MINGW=${MINGW}")
message("CYGWIN=${CYGWIN}")
message("WIN32=${WIN32}")
MESSAGE(STATUS "operation system is ${CMAKE_SYSTEM}")
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
message(STATUS "current platform: Linux ")
add_definitions("-D_LINUX_")
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
message(STATUS "current platform: Windows")
add_definitions("-DWIN32")
if (MINGW)
add_definitions("-DMINGW")
endif()
if (CYGWIN)
add_definitions("-DCYGWIN")
endif()
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
message(STATUS "current platform: FreeBSD")
else ()
message(STATUS "other platform: ${CMAKE_SYSTEM_NAME}")
endif (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions("-w -c -std=gnu++0x -DGTEST_ENABLE")
message("CMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}")
message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
message("CMAKE_SYSTEM=${CMAKE_SYSTEM}")
add_subdirectory(src)