Skip to content

Commit

Permalink
Merge pull request MapServer#7057 from rouault/remove_exec_program
Browse files Browse the repository at this point in the history
CMake and CI adjustments
  • Loading branch information
rouault authored Mar 27, 2024
2 parents f4b464f + cc492aa commit 5a943d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0...3.23)
cmake_minimum_required(VERSION 3.0...3.29)

project (MapServer)

Expand Down
5 changes: 4 additions & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ if [ "${MAPSCRIPT_PYTHON_ONLY:-}" = "true" ]; then
exit
fi

# Turn CMake warnings as errors
EXTRA_CMAKEFLAGS="-Werror=dev"

if [ "${WITH_ASAN:-}" = "true" ]; then
# -DNDEBUG to avoid issues with cairo cleanup
make cmakebuild MFLAGS="-j$(nproc)" CMAKE_C_FLAGS="-g -fsanitize=address -DNDEBUG" CMAKE_CXX_FLAGS="-g -fsanitize=address -DNDEBUG" \
EXTRA_CMAKEFLAGS="-DCMAKE_BUILD_TYPE=None -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address"
EXTRA_CMAKEFLAGS="${EXTRA_CMAKEFLAGS} -DCMAKE_BUILD_TYPE=None -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address"
else
make cmakebuild MFLAGS="-j$(nproc)" CMAKE_C_FLAGS="-O2" CMAKE_CXX_FLAGS="-O2" LIBMAPSERVER_EXTRA_FLAGS="-Wall -Werror -Wextra"
make mspython-wheel
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindGDAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if(UNIX)
)

if(GDAL_CONFIG)
exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
execute_process(COMMAND ${GDAL_CONFIG} --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
if(GDAL_CONFIG_LIBS)
string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
string(REGEX REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
Expand Down
10 changes: 5 additions & 5 deletions src/mapscript/csharp/run_test.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh -ex
cd ${CSHARP_MAPSCRIPT_SO}
echo .: Testing shpdump.exe :.
mono shpdump.exe ../../../../tests/point.shp
LC_ALL=C mono shpdump.exe ../../../../tests/point.shp
echo .: Testing drawmap.exe :.
mono drawmap.exe ../../../../tests/test.map ./map.png
LC_ALL=C mono drawmap.exe ../../../../tests/test.map ./map.png
echo .: Testing shapeinfo.exe :.
mono shapeinfo.exe ../../../../tests/point.shp
LC_ALL=C mono shapeinfo.exe ../../../../tests/point.shp
echo .: Testing getbytes.exe :.
mono getbytes.exe ../../../../tests/test.map test_csharp2.png
LC_ALL=C mono getbytes.exe ../../../../tests/test.map test_csharp2.png
echo .: Testing RFC24.exe :.
mono RFC24.exe ../../../../tests/test.map
LC_ALL=C mono RFC24.exe ../../../../tests/test.map

0 comments on commit 5a943d5

Please sign in to comment.