-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
49 lines (37 loc) · 1.07 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
cmake_minimum_required(VERSION 3.9)
enable_testing()
include(ExternalProject)
set(DEFAULT_INSTALL_DIR ${CMAKE_BINARY_DIR}/install)
set(ARGS "-DCMAKE_INSTALL_PREFIX=${DEFAULT_INSTALL_DIR}")
message("${CMAKE_BUILD_TYPE}")
if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "")
message("appending CMAKE_BUILD_TYPE")
list(APPEND ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "")
message("ARGS is ${ARGS}")
ExternalProject_Add(esphttpd
SOURCE_DIR "${CMAKE_SOURCE_DIR}/libesphttpd"
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
CMAKE_ARGS "${ARGS}"
)
ExternalProject_Add(httpd
SOURCE_DIR "${CMAKE_SOURCE_DIR}/httpd"
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
CMAKE_ARGS "${ARGS}"
)
ExternalProject_Add(tests
SOURCE_DIR "${CMAKE_SOURCE_DIR}/tests"
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
CMAKE_ARGS "${ARGS}"
)
add_test(NAME test_post
COMMAND ${DEFAULT_INSTALL_DIR}/bin/test_post.sh
WORKING_DIRECTORY ${DEFAULT_INSTALL_DIR}/bin
)
add_test(NAME test_too_long_url
COMMAND ${DEFAULT_INSTALL_DIR}/bin/test_too_long_url.sh
WORKING_DIRECTORY ${DEFAULT_INSTALL_DIR}/bin
)