Skip to content

Commit e4b3f85

Browse files
committed
build: add NodesetLoader prefix for CMake targets
Rename coverageLib -> NodesetLoaderCoverage
1 parent 02ab413 commit e4b3f85

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif()
3838
# LibXML2 is always required
3939
find_package(LibXml2 REQUIRED QUIET)
4040

41-
add_library(coverageLib INTERFACE)
41+
add_library(NodesetLoaderCoverage INTERFACE)
4242

4343
if(NOT ${NODESETLOADER_ENABLE_BUILD_INTO_OPEN62541})
4444
# open62541 ia always required.
@@ -56,12 +56,12 @@ if(NOT ${NODESETLOADER_ENABLE_BUILD_INTO_OPEN62541})
5656
# compiling and -lgcov when linking
5757
#add_compile_options(--coverage -O0)
5858
#add_link_options(--coverage)
59-
target_compile_options(coverageLib INTERFACE
59+
target_compile_options(NodesetLoaderCoverage INTERFACE
6060
-O0 # no optimization
6161
-g # generate debug info
6262
--coverage # sets all required flags)
6363
)
64-
target_link_libraries(coverageLib INTERFACE --coverage)
64+
target_link_libraries(NodesetLoaderCoverage INTERFACE --coverage)
6565
endif()
6666

6767
if(MSVC)
@@ -256,7 +256,7 @@ if(NOT ${NODESETLOADER_ENABLE_BUILD_INTO_OPEN62541})
256256
target_link_libraries(NodesetLoader PRIVATE open62541::open62541)
257257

258258
if(${NODESETLOADER_CALC_COVERAGE})
259-
target_link_libraries(NodesetLoader PUBLIC coverageLib)
259+
target_link_libraries(NodesetLoader PUBLIC NodesetLoaderCoverage)
260260
endif()
261261

262262
# TODO: Speficy cleanup of custom data types for a specific open62541 version

tests/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ add_executable(sort sort.c
22
${CMAKE_CURRENT_SOURCE_DIR}/../src/Sort.c
33
${CMAKE_CURRENT_SOURCE_DIR}/../src/nodes/InstanceNode.c)
44
target_include_directories(sort PRIVATE ${CHECK_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../src ${CMAKE_CURRENT_SOURCE_DIR}/../include)
5-
target_link_libraries(sort PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} coverageLib open62541::open62541)
5+
target_link_libraries(sort PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} NodesetLoaderCoverage open62541::open62541)
66
add_test(NAME sort_Test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND sort ${CMAKE_CURRENT_LIST_DIR})
77

88
add_executable(nodeContainer
@@ -13,21 +13,21 @@ add_executable(nodeContainer
1313
${CMAKE_CURRENT_SOURCE_DIR}/../src/Value.c
1414
)
1515
target_include_directories(nodeContainer PRIVATE ${CHECK_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../include ${CMAKE_CURRENT_SOURCE_DIR}/../src)
16-
target_link_libraries(nodeContainer PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} coverageLib open62541::open62541)
16+
target_link_libraries(nodeContainer PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} NodesetLoaderCoverage open62541::open62541)
1717
add_test(NAME nodeContainer_Test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND nodeContainer ${CMAKE_CURRENT_LIST_DIR})
1818

1919
add_executable(value ValueTest.c ${CMAKE_CURRENT_SOURCE_DIR}/../src/Value.c)
2020
target_include_directories(value PRIVATE ${CHECK_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../include)
21-
target_link_libraries(value PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} coverageLib open62541::open62541)
21+
target_link_libraries(value PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} NodesetLoaderCoverage open62541::open62541)
2222
add_test(NAME value_Test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND value ${CMAKE_CURRENT_LIST_DIR})
2323

2424
add_executable(allocator allocator.c ${CMAKE_CURRENT_SOURCE_DIR}/../src/CharAllocator.c)
2525
target_include_directories(allocator PRIVATE ${CHECK_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../src)
26-
target_link_libraries(allocator PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} coverageLib open62541::open62541)
26+
target_link_libraries(allocator PRIVATE ${CHECK_LIBRARIES} ${PTHREAD_LIB} NodesetLoaderCoverage open62541::open62541)
2727
add_test(NAME allocatorTest WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND allocator ${CMAKE_CURRENT_LIST_DIR})
2828

2929
add_executable(parser parser.c)
30-
target_link_libraries(parser PRIVATE NodesetLoader ${CHECK_LIBRARIES} ${PTHREAD_LIB} coverageLib open62541::open62541)
30+
target_link_libraries(parser PRIVATE NodesetLoader ${CHECK_LIBRARIES} ${PTHREAD_LIB} NodesetLoaderCoverage open62541::open62541)
3131
target_include_directories(parser PRIVATE ${CHECK_INCLUDE_DIR})
3232
add_test(NAME parser_Test
3333
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

0 commit comments

Comments
 (0)