Commit 09f59ba5 authored by Matthieu Kermagoret's avatar Matthieu Kermagoret
Browse files

Perl: use Embedded Perl compilation flags on all sources to prevent

incompatibilities between the Perl library and our process.

This fixes #4040.
parent bfc46a62
......@@ -92,7 +92,6 @@ include(FindPerlLibs)
if (NOT PERLLIBS_FOUND)
message(FATAL_ERROR "Could not find Perl libraries.")
endif ()
include_directories("${PERL_INCLUDE_PATH}")
execute_process(COMMAND "${PERL_EXECUTABLE}" "-MExtUtils::Embed" "-e" "ldopts"
RESULT_VARIABLE PERL_LDFLAGS_ERROR
OUTPUT_VARIABLE PERL_LIBRARIES)
......@@ -100,6 +99,12 @@ string(STRIP "${PERL_LIBRARIES}" PERL_LIBRARIES)
if (PERL_LDFLAGS_ERROR)
set(PERL_LIBRARIES ${PERL_LIBRARY})
endif ()
execute_process(COMMAND "${PERL_EXECUTABLE}" "-MExtUtils::Embed" "-e" "ccopts"
RESULT_VARIABLE PERL_CFLAGS_ERROR
OUTPUT_VARIABLE PERL_CFLAGS)
if (NOT PERL_CFLAGS_ERROR)
set(CMAKE_CXX_FLAGS "${PERL_CFLAGS}")
endif ()
# Generate code to dynamically load modules.
add_custom_command(OUTPUT "${SRC_DIR}/xs_init.cc"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment