Skip to content

Commit 5a3b416

Browse files
committed
Suppress SWIG-related warnings
1 parent 9468f96 commit 5a3b416

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

swig/perl/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
include(UseSWIG)
22

33
set(CMAKE_SWIG_FLAGS "-module" "openscap_pm")
4-
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
5-
set_property(SOURCE openscapPERL5_wrap.c PROPERTY COMPILE_OPTIONS "-w")
6-
endif()
74
if (${CMAKE_VERSION} VERSION_LESS "3.8.0")
85
swig_add_module(openscap_pm perl5 ../openscap.i)
96
else()
107
swig_add_library(openscap_pm LANGUAGE perl5 SOURCES ../openscap.i)
118
endif()
129
swig_link_libraries(openscap_pm openscap ${PERL_LIBRARY})
1310
target_include_directories(openscap_pm PUBLIC ${PERL_INCLUDE_PATH})
11+
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
12+
target_compile_options(${SWIG_MODULE_openscap_pm_REAL_NAME} PUBLIC "-w")
13+
endif()
1414

1515
install(TARGETS ${SWIG_MODULE_openscap_pm_REAL_NAME}
1616
DESTINATION ${CMAKE_INSTALL_LIBDIR}/perl5/vendor_perl)

swig/python3/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ include_directories(${PYTHON_INCLUDE_PATH})
66
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
77

88
set(CMAKE_SWIG_FLAGS "-module" "openscap_py" "-py3")
9-
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
10-
set_property(SOURCE openscapPYTHON_wrap.c PROPERTY COMPILE_OPTIONS "-w")
11-
endif()
129
if (${CMAKE_VERSION} VERSION_LESS "3.8.0")
1310
swig_add_module(openscap_py python ../openscap.i)
1411
else()
1512
swig_add_library(openscap_py LANGUAGE python SOURCES ../openscap.i)
1613
endif()
1714
swig_link_libraries(openscap_py openscap ${PYTHON_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${LIBXSLT_EXSLT_LIBRARIES} ${PCRE_LIBRARIES} ${CURL_LIBRARIES} ${BZIP2_LIBRARIES} ${RPM_LIBRARIES})
15+
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
16+
target_compile_options(${SWIG_MODULE_openscap_py_REAL_NAME} PUBLIC "-w")
17+
endif()
1818

1919
add_custom_command(OUTPUT ${PYTHON_COMPILED_FILES}
2020
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/../openscap_api.py ${CMAKE_CURRENT_BINARY_DIR}

0 commit comments

Comments
 (0)