-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (36 loc) · 1.21 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
45
46
47
48
49
#Copyright (c) Microsoft. All rights reserved.
#Licensed under the MIT license. See LICENSE file in the project root for full license information.
#this is CMakeLists.txt for iothub_client_sample_amqp
cmake_minimum_required(VERSION 2.8.11)
project(whiskey)
#Use solution folders.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
IF(WIN32)
#windows needs this define
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4232")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /wd4232")
# Make warning as error
add_definitions(/WX)
ELSE()
# Make warning as error
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif(WIN32)
set(whiskey_c_files
binary_tree.c
stopwatch.c
main.c
)
set(whiskey_h_files
binary_tree.h
stopwatch.h
)
#Conditionally use the SDK trusted certs in the samples
include_directories(.)
add_executable(binary_tree ${whiskey_c_files} ${whiskey_h_files})
set(CTEST_INCLUDES ${CMAKE_CURRENT_LIST_DIR}/deps/ctest/inc)
add_subdirectory(./deps/testrunnerswitcher)
add_subdirectory(./deps/ctest)
add_subdirectory(tests)