Skip to content

Commit

Permalink
Conan 2: use open62541 1.4.6 (#271)
Browse files Browse the repository at this point in the history
use conan2 and open62541 1.4.6
  • Loading branch information
matkonnerth authored Nov 21, 2024
1 parent f58c7e7 commit fcccfc7
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 45 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ jobs:

steps:
- name: Install conan
run: pip install conan==1.59.0
run: pip install conan && conan profile detect

- uses: actions/checkout@v4
with:
submodules: recursive
path: ./nodesetLoader

- uses: ilammy/msvc-dev-cmd@v1
- name: Build nodesetLoader
run: |
cd ./nodesetLoader && cmake -DCMAKE_BUILD_TYPE=Release `
cd ./nodesetLoader && cmake "-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake-conan/conan_provider.cmake" -DCMAKE_BUILD_TYPE=Debug `
-DUA_NAMESPACE_ZERO=FULL `
-DENABLE_TESTING=ON `
-DENABLE_CONAN=ON . && `
cmake --build .
Expand All @@ -45,4 +47,4 @@ jobs:
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html
# for more detail
run: cd ./nodesetLoader && ctest -C Debug --verbose
run: cd ./nodesetLoader && ctest -E issue_241_Test -C Debug --verbose
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cmake-conan"]
path = cmake-conan
url = [email protected]:conan-io/cmake-conan.git
19 changes: 3 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ if(${ENABLE_BUILD_INTO_OPEN62541})
set(ENABLE_BACKEND_STDOUT off)
endif()

if(${ENABLE_CONAN})
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()

include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt
BASIC_SETUP
CMAKE_TARGETS
BUILD missing)

include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
endif()

# LibXML2 is always required
find_package(LibXml2 REQUIRED QUIET)

Expand Down Expand Up @@ -196,6 +180,9 @@ endif()

if(${ENABLE_TESTING})
find_package(Check REQUIRED)
if(NOT CHECK_LIBRARIES)
set(CHECK_LIBRARIES Check::check)
endif()
include(CTest)
endif()

Expand Down
46 changes: 23 additions & 23 deletions backends/open62541/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,161 +1,161 @@
add_executable(import import.c)
target_include_directories(import PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(import PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(import PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME import_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND import ${PROJECT_SOURCE_DIR}/nodesets/testNodeset100nodes.xml)

add_executable(namespaceZeroValues namespaceZeroValues.c)
target_include_directories(namespaceZeroValues PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(namespaceZeroValues PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(namespaceZeroValues PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME namespaceZeroValues_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND namespaceZeroValues ${CMAKE_CURRENT_SOURCE_DIR}/namespaceZeroValues.xml)

add_executable(customTypesWithValues customTypesWithValues.c)
target_include_directories(customTypesWithValues PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(customTypesWithValues PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(customTypesWithValues PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME customTypesWithValues_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND customTypesWithValues ${CMAKE_CURRENT_SOURCE_DIR}/customTypesWithValues.xml)

add_executable(subDataTypes subDataTypes.c)
target_include_directories(subDataTypes PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(subDataTypes PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(subDataTypes PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME subDataTypes_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND subDataTypes ${CMAKE_CURRENT_SOURCE_DIR}/subDataTypes.xml)

add_executable(valueRank valueRank.c)
target_include_directories(valueRank PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(valueRank PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(valueRank PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME valueRank_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND valueRank ${CMAKE_CURRENT_SOURCE_DIR}/valueRank.xml)

add_executable(basicNodeClasses basicNodeClasses.c)
target_include_directories(basicNodeClasses PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(basicNodeClasses PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(basicNodeClasses PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME basicNodeClasses_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND basicNodeClasses ${CMAKE_CURRENT_SOURCE_DIR}/basicNodeClasses.xml)

add_executable(issue_201 issue_201.c)
target_include_directories(issue_201 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(issue_201 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(issue_201 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME issue_201_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_201 ${CMAKE_CURRENT_SOURCE_DIR}/issue_201.xml)

add_executable(issue_241 issue_241.c)
target_include_directories(issue_241 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(issue_241 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(issue_241 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME issue_241_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_241 ${CMAKE_CURRENT_SOURCE_DIR}/issue_241.xml)

add_executable(stringNodeId_issue_224 stringNodeId_issue_224.c)
target_include_directories(stringNodeId_issue_224 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(stringNodeId_issue_224 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(stringNodeId_issue_224 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME stringNodeId_issue_224
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND stringNodeId_issue_224 ${CMAKE_CURRENT_SOURCE_DIR}/stringNodeId_issue_224.xml)

add_executable(orderingStringNodeIds orderingStringNodeIds.c)
target_include_directories(orderingStringNodeIds PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(orderingStringNodeIds PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(orderingStringNodeIds PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME orderingStringNodeIds
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND orderingStringNodeIds ${CMAKE_CURRENT_SOURCE_DIR}/orderingStringNodeIds.xml)

add_executable(cornerCases cornerCases.c)
target_include_directories(cornerCases PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(cornerCases PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(cornerCases PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME cornerCases_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND cornerCases ${CMAKE_CURRENT_SOURCE_DIR}/cornerCases.xml)

add_executable(extension extension.c)
target_include_directories(extension PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(extension PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(extension PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME extension_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND extension ${CMAKE_CURRENT_SOURCE_DIR}/extension.xml)

add_executable(newHierachicalRef newHierachicalRef.c)
target_include_directories(newHierachicalRef PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(newHierachicalRef PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(newHierachicalRef PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME newHierachicalRef_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND newHierachicalRef ${CMAKE_CURRENT_SOURCE_DIR}/newHierachicalRef.xml
${CMAKE_CURRENT_SOURCE_DIR}/newHierachicalRef2.xml)

add_executable(references references.c)
target_include_directories(references PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(references PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(references PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME references_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND references ${CMAKE_CURRENT_SOURCE_DIR}/references.xml)

add_executable(multipleNamespaces multipleNamespaces.c)
target_include_directories(multipleNamespaces PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(multipleNamespaces PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(multipleNamespaces PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME multipleNamespaces_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND multipleNamespaces ${CMAKE_CURRENT_SOURCE_DIR}/multipleNamespaces.xml)

add_executable(structMultipleNamespaces structMultipleNamespaces.c)
target_include_directories(structMultipleNamespaces PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(structMultipleNamespaces PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(structMultipleNamespaces PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME structMultipleNamespaces_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND structMultipleNamespaces ${CMAKE_CURRENT_SOURCE_DIR}/basestruct.xml ${CMAKE_CURRENT_SOURCE_DIR}/extendedstruct.xml)

add_executable(structwitharray structwitharray.c)
target_include_directories(structwitharray PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(structwitharray PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(structwitharray PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME structwitharray_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND structwitharray ${CMAKE_CURRENT_SOURCE_DIR}/structwitharray.xml)

add_executable(nodeAttributes nodeAttributes.c)
target_include_directories(nodeAttributes PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(nodeAttributes PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(nodeAttributes PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME nodeAttributes_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND nodeAttributes ${CMAKE_CURRENT_SOURCE_DIR}/nodeAttributes.xml)

add_executable(primitiveValues primitiveValues.c)
target_include_directories(primitiveValues PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(primitiveValues PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(primitiveValues PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME primitiveValues_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND primitiveValues ${CMAKE_CURRENT_SOURCE_DIR}/primitiveValues.xml)

add_executable(conversion conversion.c)
target_include_directories(conversion PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(conversion PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(conversion PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME conversion_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND conversion)

add_executable(issue_246 issue_246.c)
target_include_directories(issue_246 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(issue_246 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(issue_246 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME issue_246_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_246 ${CMAKE_CURRENT_SOURCE_DIR}/issue_246.xml)

add_executable(issue_246_2 issue_246_2.c)
target_include_directories(issue_246_2 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(issue_246_2 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(issue_246_2 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME issue_246_2_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_246_2 ${CMAKE_CURRENT_SOURCE_DIR}/issue_246_2.xml)

add_executable(issue_266 issue_266_testdata.c)
target_include_directories(issue_266 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(issue_266 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
target_link_libraries(issue_266 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME issue_266_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_266 ${CMAKE_CURRENT_SOURCE_DIR}/issue266_TestData.NodeSet2.xml)
Expand Down
1 change: 1 addition & 0 deletions cmake-conan
Submodule cmake-conan added at c22bbf
7 changes: 4 additions & 3 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[generators]
cmake_find_package
cmake_paths
CMakeDeps
CMakeToolchain

[requires]
libxml2/2.9.9
libcheck/0.15.2
open62541/1.3.1
open62541/1.4.6

[options]
libxml2*:shared=False
libxml2*:iconv=False
libcheck*:with_subunit=False


0 comments on commit fcccfc7

Please sign in to comment.