Skip to content

Commit

Permalink
Fix Python module compatibility and fix some warnings
Browse files Browse the repository at this point in the history
IB-8176

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Nov 12, 2024
1 parent 82729b4 commit 943981b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,12 @@ jobs:
cd /Library
zip -q -r ${OLDPWD}/libdigidocpp.${{ matrix.target }}.zip libdigidocpp.*
- name: Archive artifacts
if: matrix.target == 'macos'
uses: actions/upload-artifact@v4
with:
name: macOS
path: build/macos/libdigidocpp*.*
- name: Archive artifacts
if: matrix.target != 'macos'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: libdigidocpp*.zip
path: |
build/macos/libdigidocpp*.*
libdigidocpp*.zip
fedora:
name: Build on Fedora ${{ matrix.container }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ foreach($type in @("Debug", "RelWithDebInfo")) {
$buildpath = $platform+$type
& $vcvars $platform "&&" $cmake --fresh -B $buildpath -S $libdigidocpp "-G$generator" `
"-DCMAKE_BUILD_TYPE=$type" `
"-DCMAKE_VERBOSE_MAKEFILE=YES" `
"-DCMAKE_INSTALL_PREFIX=$platform" `
"-DCMAKE_INSTALL_LIBDIR=bin" `
"-DCMAKE_TOOLCHAIN_FILE=$vcpkg_dir/scripts/buildsystems/vcpkg.cmake" `
Expand Down
2 changes: 1 addition & 1 deletion prepare_osx_build_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function openssl {
do
case "${ARGS}" in
*simulator*) CC="" CFLAGS="-arch ${ARCH}" ./Configure iossimulator-xcrun --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;;
*catalyst*) CC="" CFLAGS="-target ${ARCH}-apple-ios-macabi" ./Configure darwin64-${ARCH} --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;;
*catalyst*) CC="" CFLAGS="-target ${ARCH}-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-macabi" ./Configure darwin64-${ARCH} --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;;
*iphone*) CC="" CFLAGS="" ./Configure ios64-xcrun --prefix=${TARGET_PATH} no-shared no-dso no-module no-engine no-tests no-ui-console enable-ec_nistp_64_gcc_128 ;;
*) CC="" CFLAGS="" ./Configure darwin64-${ARCH} --prefix=${TARGET_PATH} shared no-module no-tests enable-ec_nistp_64_gcc_128
esac
Expand Down
4 changes: 2 additions & 2 deletions src/XMLDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ struct XMLElem

struct XMLName
{
std::string_view name;
std::string_view ns;
std::string_view name {};
std::string_view ns {};
};

struct XMLNode: public XMLElem<xmlNode>
Expand Down
9 changes: 9 additions & 0 deletions src/XmlConf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,10 @@ SET1CONST(string, setProxyPass, proxyPass)
* @fn void digidoc::XmlConfV5::setPKCS12Cert(const std::string &cert)
* @copydoc digidoc::XmlConf::setPKCS12Cert(const std::string &cert)
*/
DIGIDOCPP_WARNING_PUSH
DIGIDOCPP_WARNING_DISABLE_GCC("-Wunused-parameter")
SET1CONSTEX(string, setPKCS12Cert, {})
DIGIDOCPP_WARNING_POP

/**
* @fn void digidoc::XmlConf::setPKCS12Pass(const std::string &pass)
Expand All @@ -625,7 +628,10 @@ SET1CONSTEX(string, setPKCS12Cert, {})
* @fn void digidoc::XmlConfV5::setPKCS12Pass(const std::string &pass)
* @copydoc digidoc::XmlConf::setPKCS12Pass(const std::string &pass)
*/
DIGIDOCPP_WARNING_PUSH
DIGIDOCPP_WARNING_DISABLE_GCC("-Wunused-parameter")
SET1CONSTEX(string, setPKCS12Pass, {})
DIGIDOCPP_WARNING_POP

/**
* @fn void digidoc::XmlConf::setTSUrl(const std::string &url)
Expand Down Expand Up @@ -700,7 +706,10 @@ SET1CONST(string, setVerifyServiceUri, verifyServiceUri)
* @fn void digidoc::XmlConfV5::setPKCS12Disable(bool disable)
* @copydoc digidoc::XmlConf::setPKCS12Disable(bool disable)
*/
DIGIDOCPP_WARNING_PUSH
DIGIDOCPP_WARNING_DISABLE_GCC("-Wunused-parameter")
SET1EX(bool, setPKCS12Disable, {})
DIGIDOCPP_WARNING_POP

/**
* @fn void digidoc::XmlConf::setProxyTunnelSSL(bool enable)
Expand Down
2 changes: 0 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ target_link_libraries(TSLTests digidocpp digidocpp_util Boost::unit_test_framewo
if(WIN32)
string(REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
set_target_properties(unittests TSLTests PROPERTIES COMPILE_FLAGS "/bigobj")
else()
set_target_properties(unittests TSLTests PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter -Wno-unused-variable")
endif()
add_test(NAME runtest
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/unittests --build_info=YES --report_level=no --logger=${TEST_FORMAT},all,${CMAKE_CURRENT_BINARY_DIR}/libdigidocpp.xml -- ${CMAKE_CURRENT_SOURCE_DIR}/data
Expand Down

0 comments on commit 943981b

Please sign in to comment.