Skip to content

Commit

Permalink
Address review comments for #1817
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 16, 2020
1 parent 2afa147 commit 66fd99a
Show file tree
Hide file tree
Showing 15 changed files with 2,699 additions and 2,570 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
endif()
endif()

add_definitions(-DNOMINMAX)

set(PROJ_C_WARN_FLAGS "${PROJ_C_WARN_FLAGS}"
CACHE STRING "C flags used to compile PROJ targets")
set(PROJ_CXX_WARN_FLAGS "${PROJ_CXX_WARN_FLAGS}"
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = src/iso19111 include/proj src/proj.h src/proj_experimental.h src/general_doc.dox src/filemanager.cpp
INPUT = src/iso19111 include/proj src/proj.h src/proj_experimental.h src/general_doc.dox src/filemanager.cpp src/networkfilemanager.cpp

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
27 changes: 12 additions & 15 deletions cmake/ProjTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
# add test with sh script
#

function(proj_test_set_properties TESTNAME)
if(MSVC)
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data\\;${PROJECT_SOURCE_DIR}/data")
else()
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data:${PROJECT_SOURCE_DIR}/data")
endif()
endfunction()

function(proj_add_test_script_sh SH_NAME BIN_USE)
if(UNIX)
get_filename_component(testname ${SH_NAME} NAME_WE)
Expand All @@ -26,13 +36,7 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
COMMAND ${PROJECT_SOURCE_DIR}/test/cli/${SH_NAME}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}}
)
if(MSVC)
set_tests_properties( ${testname}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data\\;${PROJECT_SOURCE_DIR}/data")
else()
set_tests_properties( ${testname}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data:${PROJECT_SOURCE_DIR}/data")
endif()
proj_test_set_properties(${testname})
endif()

endif()
Expand All @@ -49,13 +53,6 @@ function(proj_add_gie_test TESTNAME TESTCASE)
${TESTFILE}
)

if(MSVC)
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data\\;${PROJECT_SOURCE_DIR}/data")
else()
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data:${PROJECT_SOURCE_DIR}/data")
endif()

proj_test_set_properties(${TESTNAME})

endfunction()
13 changes: 11 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,17 @@ AC_SUBST(C_WFLAGS,$C_WFLAGS)
AC_SUBST(CXX_WFLAGS,$CXX_WFLAGS)
AC_SUBST(NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG,$NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG)

CFLAGS="${CFLAGS} -fvisibility=hidden -DNOMINMAX"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden -DNOMINMAX"
CFLAGS="${CFLAGS} -fvisibility=hidden"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"

case "${host_os}" in
cygwin* | mingw32* | pw32* | beos* | darwin*)
CFLAGS="${CFLAGS} -DNOMINMAX"
CXXFLAGS="${CXXFLAGS} -DNOMINMAX"
;;
*)
;;
esac

dnl Checks for libraries.
save_CFLAGS="$CFLAGS"
Expand Down
2 changes: 1 addition & 1 deletion data/proj.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ cdn_endpoint = https://cdn.proj.org

cache_enabled = on

cache_size_MB = 100
cache_size_MB = 300

cache_ttl_sec = 86400
4 changes: 3 additions & 1 deletion docs/source/resource_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ A proj installation includes a SQLite database of transformation information
that must be accessible for the library to work properly. The library will
print an error if the database can't be found.

.. _proj-ini:

proj.ini
-------------------------------------------------------------------------------

Expand All @@ -92,7 +94,7 @@ Its default content is:

cache_enabled = on

cache_size_MB = 100
cache_size_MB = 300

cache_ttl_sec = 86400

Expand Down
2 changes: 1 addition & 1 deletion scripts/doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rm -rf docs/build/xml/
# Ugly hack to workaround a bug of Doxygen 1.8.17 that erroneously detect proj_network_get_header_value_cbk_type/ as a variable
sed "s/const char\* (\*proj_network_get_header_value_cbk_type/CONST_CHAR\* (\*proj_network_get_header_value_cbk_type/" < src/proj.h > docs/build/tmp_breathe/proj.h

(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 include/proj docs/build/tmp_breathe/proj.h src/filemanager.cpp docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > docs/build/tmp_breathe/docs_log.txt 2>&1
(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 include/proj docs/build/tmp_breathe/proj.h src/filemanager.cpp src/networkfilemanager.cpp docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > docs/build/tmp_breathe/docs_log.txt 2>&1
if grep -i warning docs/build/tmp_breathe/docs_log.txt; then
echo "Doxygen warnings found" && cat docs/build/tmp_breathe/docs_log.txt && /bin/false;
else
Expand Down
5 changes: 3 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ libproj_la_SOURCES = \
grids.cpp \
filemanager.hpp \
filemanager.cpp \
sqlite3.hpp \
sqlite3.cpp
networkfilemanager.cpp \
sqlite3_utils.hpp \
sqlite3_utils.cpp


# The sed hack is to please MSVC
Expand Down
Loading

0 comments on commit 66fd99a

Please sign in to comment.