Skip to content

Commit

Permalink
Remove DISABLE_GEOS_INLINE) (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey authored Jun 9, 2022
1 parent e0bf736 commit 1516e42
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 43 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ jobs:
cmake: 3.13.*,
os: ubuntu-18.04
}
- {
compiler: clang++,
build_type: Release,
cxxstd: 11,
arch: 64,
packages: 'g++',
cmake: 3.15.*,
cmake_extra: '-DDISABLE_GEOS_INLINE=ON',
os: ubuntu-20.04
}
- {
compiler: clang++,
build_type: Debug,
Expand Down
24 changes: 0 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,6 @@ target_compile_options(geos_cxx_flags INTERFACE
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<EQUAL:4,${CMAKE_SIZEOF_VOID_P}>>:-ffloat-store>
)

#-----------------------------------------------------------------------------
# Target geos_cxx_flags: common compilation flags
#-----------------------------------------------------------------------------
option(DISABLE_GEOS_INLINE "Disable inlining" OFF)
if(DISABLE_GEOS_INLINE)
target_compile_options(geos_cxx_flags INTERFACE
"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-fno-inline-functions>"
"$<$<CXX_COMPILER_ID:GNU>:-fno-inline>"
"$<$<CXX_COMPILER_ID:MSVC>:/Ob0>"
)
message(STATUS
"GEOS: Function inlining DISABLED")
else()
message(STATUS
"GEOS: Function inlining ENABLED")
endif()

# Make sure NDEBUG is defined so that assert() is disabled for
# any non-debug build. Use a generator expression so that this
# works with multi-configuration generators.
Expand Down Expand Up @@ -411,13 +394,6 @@ install(DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/include/geos"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.hpp")
if(NOT DISABLE_GEOS_INLINE)
install(DIRECTORY
"${CMAKE_CURRENT_LIST_DIR}/include/geos"
"${CMAKE_CURRENT_BINARY_DIR}/include/geos"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.inl")
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/capi/geos_c.h"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES "${CMAKE_CURRENT_LIST_DIR}/include/geos.h"
Expand Down
12 changes: 4 additions & 8 deletions tools/ci/winnie.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ rm -rf build${OS_BUILD}${MAKE_TYPE}${GEOS_VER}
mkdir -p build${OS_BUILD}${MAKE_TYPE}${GEOS_VER}
cd build${OS_BUILD}${MAKE_TYPE}${GEOS_VER}
export GEOS_ENABLE_INLINE=ON #for older geos
if [[ "${DISABLE_GEOS_INLINE}" == "" ]] ; then
export DISABLE_GEOS_INLINE=ON
fi
echo "Disable geos inline ${DISABLE_GEOS_INLINE}"

if [[ "${OS_BUILD}" == "64" ]] ; then
#cmake -G "MSYS Makefiles" DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 -DHAVE_LONG_LONG_INT_64=1 -DGEOS_ENABLE_INLINE=NO -DDISABLE_GEOS_INLINE=ON - ../${CMAKE_GEOS_VER}
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 -DHAVE_LONG_LONG_INT_64=1 -DGEOS_ENABLE_INLINE=${GEOS_ENABLE_INLINE} -DDISABLE_GEOS_INLINE=${DISABLE_GEOS_INLINE} ${SRC_DIR}
#cmake -G "MSYS Makefiles" DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 -DHAVE_LONG_LONG_INT_64=1 - ../${CMAKE_GEOS_VER}
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 -DHAVE_LONG_LONG_INT_64=1 ${SRC_DIR}
else
#cmake -G "MSYS Makefiles" DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 -DGEOS_ENABLE_INLINE=NO -DDISABLE_GEOS_INLINE=ON - ../${CMAKE_GEOS_VER}
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 -DGEOS_ENABLE_INLINE=${GEOS_ENABLE_INLINE} -DDISABLE_GEOS_INLINE=${DISABLE_GEOS_INLINE} ${SRC_DIR}
#cmake -G "MSYS Makefiles" DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 - ../${CMAKE_GEOS_VER}
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE} -DHAVE_STD_ISNAN=1 ${SRC_DIR}
fi
make && make install
#make check
Expand Down
3 changes: 2 additions & 1 deletion web/content/usage/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ctest
make install
```


### Build Options

The GEOS build can be customized using build options.
Expand All @@ -64,7 +65,7 @@ They are specified on the `cmake` cmdline as `-DVAR=VALUE`.
| CMAKE_INSTALL_PREFIX | /usr/local | Set to install root. Librarys end up in `./libs` headers in `./include` |
| BUILD_DOCUMENTATION | ON | Attempt to find `doxygen` executable and build API docs |
| BUILD_SHARED_LIBS | ON | Build dynamically linkable libraries. |
| DISABLE_GEOS_INLINE | OFF | Turn off inlining. This is bad for performance, only do this if you cannot build to pass tests on your platform with inlining on. |


## Testing

Expand Down

0 comments on commit 1516e42

Please sign in to comment.