Skip to content

Commit 943d6ff

Browse files
move to pulling in the core cpputest-for-qpc library as a git submodule.
1 parent feae199 commit 943d6ff

33 files changed

+13
-1858
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "externals/qpc"]
22
path = externals/qpc
33
url = git@github.com:QuantumLeaps/qpc.git
4+
[submodule "externals/cpputest-for-qpc"]
5+
path = externals/cpputest-for-qpc
6+
url = https://github.com/covemountainsoftware/cpputest-for-qpc.git

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(cpputest-for-qpc)
2+
project(cpputest-for-qpc-examples)
33

44
set(CMAKE_CXX_STANDARD 14)
55
set(CMAKE_C_STANDARD 11)
@@ -9,16 +9,17 @@ add_compile_options(-Wall -Wextra -Werror)
99
include_directories(include)
1010

1111
set(EXTERNALS_TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/externals)
12+
13+
# set CMS_QPC_TOP_DIR to avoid cpputest-for-qpc-lib from fetching its own copy of QP/C
1214
set(CMS_QPC_TOP_DIR ${EXTERNALS_TOP_DIR}/qpc)
1315

14-
include(externals/qpcCMakeSupport.txt)
16+
add_subdirectory(externals/cpputest-for-qpc)
1517

1618
set(CMS_TEST_SUPPORT_TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test_support)
1719
set(MOCKS_TOP_DIR ${CMS_TEST_SUPPORT_TOP_DIR}/mocks)
1820
set(DRIVERS_TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/drivers)
19-
set(CMS_UTILS_TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/utilities)
2021

21-
add_subdirectory(utilities)
22-
add_subdirectory(test_support)
22+
set(QP_CPP_INCLUDE_DIR ${CMS_QPC_TOP_DIR}/include)
23+
2324
add_subdirectory(drivers)
2425
add_subdirectory(examples)

examples/hwLockCtrlService/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ target_include_directories(hwLockCtrlService PUBLIC include)
77
# TODO: setting up QP should probably be a higher level build option
88
add_compile_definitions(QACTIVE_CAN_STOP)
99
include_directories(${QP_CPP_INCLUDE_DIR})
10-
include(${EXTERNALS_TOP_DIR}/qpcPosixPortCMakeSupport.txt)
10+
include(${CMS_CMAKE_DIR}/qpcPosixPortCMakeSupport.cmake)

examples/hwLockCtrlService/test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ set(TEST_SOURCES
1414

1515
# this include expects TEST_SOURCES and TEST_APP_NAME to be
1616
# defined, and creates the cpputest based test executable target
17-
include(${CMS_TEST_SUPPORT_TOP_DIR}/common/cpputestCMake.txt)
17+
include(${CMS_CMAKE_DIR}/cpputestCMake.cmake)
1818

19-
target_link_libraries(${TEST_APP_NAME} cpputest-qpc-lib ${CPPUTEST_LDFLAGS})
19+
target_link_libraries(${TEST_APP_NAME} cpputest-for-qpc-lib ${CPPUTEST_LDFLAGS})

externals/cpputest-for-qpc

Submodule cpputest-for-qpc added at 77cd5b6

externals/qpcCMakeSupport.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

externals/qpcPosixPortCMakeSupport.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

test_support/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

test_support/common/cpputestCMake.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

test_support/common/cpputestMain.cpp

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)