Skip to content
Permalink
Browse files
Hide some SWIG Java warnings (#6112)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
MapServer-backport-bot and github-actions[bot] committed Jul 9, 2020
1 parent cc315c0 commit 676691a9bdc0866aeecfb1e39852049947f9f437
Showing 1 changed file with 7 additions and 1 deletion.
@@ -4,7 +4,7 @@ include(${SWIG_USE_FILE})
find_package(JNI)
find_package(Java)
if(NOT JNI_INCLUDE_DIRS OR NOT Java_JAVAC_EXECUTABLE OR NOT Java_JAR_EXECUTABLE)
message(SEND_ERROR "Could not find required Java componenents. Try setting the JAVA_HOME environment variable (required on e.g. Ubuntu)")
message(SEND_ERROR "Could not find required Java components. Try setting the JAVA_HOME environment variable (required on e.g. Ubuntu)")
endif(NOT JNI_INCLUDE_DIRS OR NOT Java_JAVAC_EXECUTABLE OR NOT Java_JAR_EXECUTABLE)

include_directories(${JNI_INCLUDE_DIRS})
@@ -14,6 +14,12 @@ include_directories(${PROJECT_SOURCE_DIR}/mapscript/java)
set (CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/edu/umn/gis/mapscript")
set(CMAKE_SWIG_FLAGS -package edu.umn.gis.mapscript)

# hide warnings
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing")
endif ()


if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7)
swig_add_library(javamapscript TYPE MODULE LANGUAGE java SOURCES ../mapscript.i)
else ()

0 comments on commit 676691a

Please sign in to comment.