diff options
author | Fabian Vogt <fvogt@suse.de> | 2022-03-31 11:26:14 +0200 |
---|---|---|
committer | Fabian Vogt <fvogt@suse.de> | 2022-03-31 11:29:07 +0200 |
commit | 806e1d21a3940672ced9c1cfeb81aeec8bf0b463 (patch) | |
tree | 2db4c744f73d001bf2d8aaf9ed7ccf5ef4f9ab0e | |
parent | 5d5e13ddc47a2a061c595c1356d7d07d78cf597f (diff) | |
download | libproxy-git-806e1d21a3940672ced9c1cfeb81aeec8bf0b463.tar.gz |
Fix perl testing and enable it by default
The module files for testing were installed in the wrong location and blib
wasn't even enabled. Fix the location and use plain PERL5LIB.
Hook it up to ctest by using add_test instead of a custom target, which even
conflicted with ctest's own target.
Fixes #171
-rw-r--r-- | bindings/perl/lib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | bindings/perl/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | bindings/perl/t/CMakeLists.txt | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/bindings/perl/lib/CMakeLists.txt b/bindings/perl/lib/CMakeLists.txt index 9856627..7c36e51 100644 --- a/bindings/perl/lib/CMakeLists.txt +++ b/bindings/perl/lib/CMakeLists.txt @@ -1,2 +1,2 @@ -add_custom_target(PMlibproxy ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Libproxy.pm ${CMAKE_BINARY_DIR}/perl/blib/lib/Libproxy.pm) +add_custom_target(PMlibproxy ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Libproxy.pm ${CMAKE_BINARY_DIR}/perl/Net/Libproxy.pm) install( FILES Libproxy.pm DESTINATION ${PX_PERL_ARCH}/Net ) diff --git a/bindings/perl/src/CMakeLists.txt b/bindings/perl/src/CMakeLists.txt index 05176c4..29e656d 100644 --- a/bindings/perl/src/CMakeLists.txt +++ b/bindings/perl/src/CMakeLists.txt @@ -9,7 +9,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Libproxy.c set(Libproxy_LIB_SRCS Libproxy.c) -set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/perl/blib/arch/auto/Net) +set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/perl/auto/Net/Libproxy) add_library(PLlibproxy SHARED ${Libproxy_LIB_SRCS}) set(PLlibproxy_LIB_DEPENDENCIES libproxy pthread) diff --git a/bindings/perl/t/CMakeLists.txt b/bindings/perl/t/CMakeLists.txt index 8007124..cb18fd3 100644 --- a/bindings/perl/t/CMakeLists.txt +++ b/bindings/perl/t/CMakeLists.txt @@ -1 +1,2 @@ -add_custom_target(test prove -b ${CMAKE_CURRENT_SOURCE_DIR}) +add_test(NAME perl COMMAND prove -b ${CMAKE_CURRENT_SOURCE_DIR}) +set_property(TEST perl APPEND PROPERTY ENVIRONMENT "PERL5LIB=${CMAKE_BINARY_DIR}/perl") |