File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.11 )
1
+ cmake_minimum_required (VERSION 3.9 )
2
2
set (CMAKE_CXX_STANDARD 11 )
3
3
project (aws-lambda-runtime
4
4
VERSION 0.0.0
5
5
LANGUAGES CXX )
6
6
7
7
option (ENABLE_LTO "Enables link-time optimization, requires compiler support." OFF )
8
- option (ENABLE_TESTS "Enables building all tests." OFF )
9
- option (ENABLE_INTEGRATION_TESTS "Enables building integration tests, requires AWS C++ SDK." OFF )
8
+ option (ENABLE_TESTS "Enables building integration tests, requires AWS C++ SDK." OFF )
10
9
option (ENABLE_SANITIZERS "Enables ASan and UBSan." OFF )
11
10
12
11
add_library (${PROJECT_NAME}
@@ -91,18 +90,12 @@ else ()
91
90
target_compile_definitions (${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=0" )
92
91
endif ()
93
92
94
-
95
93
#tests
96
94
if (ENABLE_TESTS )
97
95
enable_testing ()
98
96
add_subdirectory (tests )
99
- elseif (ENABLE_INTEGRATION_TESTS )
100
- enable_testing ()
101
- add_subdirectory (tests )
102
97
endif ()
103
98
104
-
105
-
106
99
#versioning
107
100
configure_file (
108
101
"${CMAKE_CURRENT_SOURCE_DIR} /src/version.cpp.in"
Original file line number Diff line number Diff line change 9
9
cmake .. -GNinja \
10
10
-DBUILD_SHARED_LIBS=ON \
11
11
-DCMAKE_BUILD_TYPE=Debug \
12
- -DENABLE_INTEGRATION_TESTS =ON \
12
+ -DENABLE_TESTS =ON \
13
13
-DCMAKE_INSTALL_PREFIX=/install $@
14
14
ninja
15
15
ninja install
Original file line number Diff line number Diff line change @@ -14,12 +14,11 @@ if(DEFINED ENV{GITHUB_ACTIONS})
14
14
set (INSTALL_GTEST OFF )
15
15
FetchContent_MakeAvailable (gtest )
16
16
17
- # Unit tests executable
18
17
add_executable (unit_tests
19
18
unit/no_op_test.cpp )
20
19
target_link_libraries (unit_tests PRIVATE gtest_main aws-lambda-runtime )
21
20
22
- # Register unit tests with CTest
21
+ # Register unit tests
23
22
include (GoogleTest )
24
23
gtest_discover_tests (unit_tests
25
24
PROPERTIES
@@ -42,7 +41,7 @@ if(AWSSDK_FOUND)
42
41
target_link_libraries (${PROJECT_NAME} PRIVATE ${AWSSDK_LINK_LIBRARIES} aws-lambda-runtime )
43
42
44
43
include (GoogleTest )
45
- gtest_discover_tests (${PROJECT_NAME} EXTRA_ARGS "--aws_prefix=${TEST_RESOURCE_PREFIX} " ) # requires CMake 3.10 or later
44
+ gtest_discover_tests (${PROJECT_NAME} EXTRA_ARGS "--aws_prefix=${TEST_RESOURCE_PREFIX} " )
46
45
47
46
add_subdirectory (resources )
48
47
else ()
You can’t perform that action at this time.
0 commit comments