-
-
Notifications
You must be signed in to change notification settings - Fork 414
build: Add CMake build #3021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
build: Add CMake build #3021
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
43daba2
parent 464ffca1e1fbb98107593ee60c43a8449e567eed
rkanavath f9c5cf0
revert C related INFINITY/NAN changes (this is taken care of in #2681)
neteler f9b1ba7
Sync to PR Cmake build2 #348 (replaces #348)
neteler 4889de7
CI fix for pylint in gui/wxpython called with wildcard
neteler 9eed8bc
cmake/find_scripts/FindPROJ.cmake: update to PROJ > 4
neteler 67cdeee
cmake/find_scripts/FindPostgreSQL.cmake: update to https://github.com…
neteler faea30b
various path updates (sync to main)
neteler 7f39bb3
grass7 -> grass8; msg cosmetics
neteler 96862bd
CI: cmake compile script
neteler d9f674e
fix syntax
neteler 49c5d5b
fix Build step
neteler b2669e5
Build step debugging
neteler 18bf7f0
Simplify cmake command call
neteler f76f68f
Remove debugging leftover.
neteler ba6c07d
make -> cmake
neteler 76576db
update year
neteler 2be2b75
python_bandref -> python_semantic_label
neteler e8126e7
remove outdated bandref
neteler 52123fe
bandref -> semantic_label
neteler 91461d5
added python/CMakeLists.txt (from https://github.com/OSGeo/grass/pull…
neteler 87ef0aa
add_subdirectory(python)
neteler aecd006
fix path to grass/script/setup.py
neteler 4b23a6c
remove files deleted in PR #1400
neteler 0a43a1c
Fix missing EOL
neteler e5becb7
just peek in the folder (by @echoix)
neteler fd5500d
sync clang-format changes from main
neteler 9565839
apply clang-format
nilason 0afe71f
cmake_minimum_required version 3.11
neteler 617f58d
update to CMake 3.11.4
neteler a9c23d7
add VERBATIM
neteler 3f1f5a1
pylint: ignore cmakelists.txt
nilason 6301f3e
homogenize ubuntu image name
neteler d88134e
use of INFINITY and NAN
lbartoletti 8c06b79
Simplify and use PROJ_H_
lbartoletti 6b54a06
CMakeLists.txt: add include_irectories to grass
lbartoletti 1852e08
raster/CMakeLists.txt: fix GDAL_VERSION
lbartoletti dccaac0
add aprintf.c
lbartoletti c02053f
v.neighbors requires grass_stats
lbartoletti b222913
ctypesgen.py: main module is not ctypesgen.py but run.py. fix it.
lbartoletti 062b852
lib/rst: fix build. Remove DEFS POINT2D_C
lbartoletti 075e42e
python: copy grassdb
lbartoletti 555cdb2
propose ccache to speedup build
lbartoletti 754872d
mkhtml.py depends on a sibling python script
aaronsms 9ef6a2b
make libraster libvector link with lapack when it is available
aaronsms 161f1f9
add the 3 missing raster modules
aaronsms ce13ea1
display: add d.rgb, d.rhumbline, d.text, d.title, d.vect.*
lbartoletti 1541875
raster: enable r3.mapcalc
lbartoletti 2af6d2e
raster: enable r.object.geometry
lbartoletti 1c2b3dd
ps: enable ps.map
lbartoletti 028a323
python/grass: add utils (will be used by g.download.location scripts)
lbartoletti 1edfee8
scripts: add d.background, g.download.location, i.band.library, r.sem…
lbartoletti 6a12d3a
temporal: add t.copy and t.upgrade
lbartoletti 0f90e77
add an optional cmake to use alternate linker
lbartoletti ce74248
gui/wxpython: copy main_window dir
lbartoletti 31b53b5
init: copy lock, echo, run, clean_temp and winlocale
lbartoletti 3d61178
Fix finding Python3 package
HuidaeCho 0b0cebf
Fix a SQLite warning
HuidaeCho 8f24221
Define global PYTHON_EXECUTABLE
HuidaeCho 8aec114
Shared library versioning and symlinks following a common practice (v…
HuidaeCho f689903
Rename grass.sh to grass and set 755 permissions
HuidaeCho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| # inspired by "build GDAL library and to run test with CMake" | ||
| # from https://github.com/OSGeo/gdal/blob/master/.github/workflows/cmake_builds.yml | ||
|
|
||
| name: Build and test with CMake | ||
|
|
||
| on: | ||
| push: | ||
| paths-ignore: | ||
| - 'doc/**' | ||
| branches-ignore: | ||
| - 'backport**' | ||
| pull_request: | ||
| paths-ignore: | ||
| - 'doc/**' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CMAKE_UNITY_BUILD: OFF | ||
|
|
||
| permissions: | ||
| contents: read # to fetch code (actions/checkout) | ||
|
|
||
| jobs: | ||
|
|
||
| build-linux-ubuntu-20.04: | ||
| runs-on: ubuntu-20.04 | ||
| env: | ||
| CMAKE_OPTIONS: -DPython_LOOKUP_VERSION=3.8 -DUSE_CCACHE=ON | ||
| cache-name: cmake-ubuntu-20.04 | ||
| steps: | ||
| - name: Checkout GRASS | ||
| uses: actions/checkout@v3 | ||
| - name: Setup cache | ||
| uses: actions/cache@v3 | ||
| id: cache | ||
| with: | ||
| path: ${{ github.workspace }}/.ccache | ||
| key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.base_ref }}${{ github.ref_name }}-${{ github.run_id }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-${{ env.cache-name }}-${{ github.base_ref }} | ||
| ${{ runner.os }}-${{ env.cache-name }} | ||
| - name: Install CMake 3.11.4 | ||
| run: | | ||
| cd ${GITHUB_WORKSPACE} | ||
| wget https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4-Linux-x86_64.tar.gz | ||
| tar xzf cmake-3.11.4-Linux-x86_64.tar.gz | ||
| echo "CMAKE_DIR=$GITHUB_WORKSPACE/cmake-3.11.4-Linux-x86_64/bin" >> $GITHUB_ENV | ||
| echo "$GITHUB_WORKSPACE/cmake-3.11.4-Linux-x86_64/bin" >> $GITHUB_PATH | ||
| - run: | | ||
| cmake --version | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable | ||
| sudo apt-get update | ||
| sudo apt-get install -y -q build-essential \ | ||
| flex make bison gcc libgcc1 g++ ccache \ | ||
| python3 python3-dev \ | ||
| python3-opengl python3-wxgtk4.0 \ | ||
| python3-dateutil libgsl-dev python3-numpy \ | ||
| wx3.0-headers wx-common libwxgtk3.0-gtk3-dev \ | ||
| libwxbase3.0-dev libbz2-dev zlib1g-dev gettext \ | ||
| libtiff5-dev libpnglite-dev libcairo2 libcairo2-dev \ | ||
| sqlite3 libsqlite3-dev \ | ||
| libpq-dev libreadline6-dev libfreetype6-dev \ | ||
| libfftw3-3 libfftw3-dev \ | ||
| libboost-thread-dev libboost-program-options-dev libpdal-dev\ | ||
| subversion libzstd-dev checkinstall \ | ||
| libglu1-mesa-dev libxmu-dev \ | ||
| ghostscript wget -y make ccache g++ | ||
| sudo apt-get update -y | ||
| - name: Configure ccache | ||
| run: | | ||
| echo CCACHE_BASEDIR=$PWD >> ${GITHUB_ENV} | ||
| echo CCACHE_DIR=$PWD/.ccache >> ${GITHUB_ENV} | ||
| echo CCACHE_MAXSIZE=250M >> ${GITHUB_ENV} | ||
| ccache -z | ||
| working-directory: ${{ github.workspace }} | ||
| - name: Configure | ||
| run: | | ||
| mkdir build | ||
| cmake ${CMAKE_OPTIONS} -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build | ||
| - name: Build | ||
| run: | | ||
| cd $GITHUB_WORKSPACE/build | ||
| cmake --build . -j$(nproc) | ||
| - name: ccache statistics | ||
| run: ccache -s | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,245 @@ | ||
| # AUTHOR(S): Rashad Kanavath <rashad km gmail> | ||
| # PURPOSE: GRASS GIS root that adds options to activate/deactivate 3rd party libraries | ||
| # COPYRIGHT: (C) 2020-2022 by the GRASS Development Team | ||
| # This program is free software under the GPL (>=v2) | ||
| # Read the file COPYING that comes with GRASS for details. | ||
|
|
||
| cmake_minimum_required(VERSION 3.11) | ||
| set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) | ||
|
|
||
| #if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) | ||
| # set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "") | ||
| #endif() | ||
|
|
||
| project(GRASSGIS) | ||
|
|
||
| set(BUILD_SHARED_LIBS ON) | ||
| #message(FATAL_ERROR "VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}") | ||
| if(MSVC) | ||
| if(BUILD_SHARED_LIBS) | ||
| set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) | ||
| endif() | ||
|
|
||
| set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
| endif() | ||
|
|
||
| set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find_scripts;${CMAKE_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}") | ||
|
|
||
| set(default_option_enabled ON) | ||
| if(WIN32) | ||
| set(default_option_enabled OFF) | ||
| endif() | ||
|
|
||
| # Configure CCache if available | ||
| if(NOT MSVC) | ||
| option(USE_CCACHE "Use ccache" ON) | ||
| if (USE_CCACHE) | ||
| find_program(CCACHE_FOUND ccache) | ||
| if(CCACHE_FOUND) | ||
| set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) | ||
| set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) | ||
| message(STATUS "ccache found") | ||
| endif(CCACHE_FOUND) | ||
| endif(USE_CCACHE) | ||
| endif(NOT MSVC) | ||
|
|
||
| if(USE_ALTERNATE_LINKER) | ||
| include("cmake/modules/linker.cmake") | ||
| endif() | ||
|
|
||
| if(CMAKE_BUILD_TYPE) | ||
| set( grass_build_type "${CMAKE_BUILD_TYPE}" ) | ||
| string( TOLOWER "${grass_build_type}" grass_build_type_lc ) | ||
| set(find_library_suffix "_RELEASE") | ||
| if( grass_build_type_lc STREQUAL "debug" ) | ||
| set(find_library_suffix "_DEBUG") | ||
| endif() | ||
| else() | ||
| set(find_library_suffix "") | ||
| endif() | ||
|
|
||
| option(WITH_CAIRO "Build with cairo support ." ON) | ||
| option(WITH_X11 "Build with X11 support ." ${default_option_enabled}) | ||
| option(WITH_OPENGL "Build with opengl support ." ON) | ||
| option(WITH_SQLITE "enable sqlite support" ON) | ||
| option(WITH_POSTGRES "enable postgres support" ON) | ||
| option(WITH_NLS "enable nls support" ${default_option_enabled}) | ||
| option(WITH_BZLIB "enable bzlib support" ON) | ||
| option(WITH_BLAS "enable blas support" ON) | ||
| option(WITH_LAPACK "enable lapack support" ON) | ||
| option(WITH_LIBLAS "enable libLAS support" OFF) | ||
| option(WITH_OPENDWG "enable v.in.dwg" OFF) | ||
|
|
||
| option(WITH_PYTHON "Build python bindings" ON) | ||
| option(WITH_LARGEFILES "enable largefile support" ${default_option_enabled}) | ||
| option(WITH_DOCS "Build documentation" ON) | ||
| if(APPLE) | ||
| if(POLICY CMP0042) | ||
| cmake_policy(SET CMP0042 NEW) | ||
| endif() | ||
| set(CMAKE_MACOSX_RPATH TRUE) | ||
| endif() | ||
|
|
||
| set(CMAKE_SKIP_BUILD_RPATH FALSE) | ||
| set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) | ||
| set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") | ||
| set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | ||
| list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) | ||
| if("${isSystemDir}" STREQUAL "-1") | ||
| set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") | ||
| endif("${isSystemDir}" STREQUAL "-1") | ||
|
|
||
| include(get_host_arch) | ||
| get_host_arch(BUILD_ARCH) | ||
|
|
||
| include(get_versions) | ||
| get_versions("include/VERSION" | ||
| GRASS_VERSION_MAJOR | ||
| GRASS_VERSION_MINOR | ||
| GRASS_VERSION_RELEASE | ||
| GRASS_VERSION_DATE) | ||
|
|
||
| set(GRASS_VERSION_NUMBER ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}) | ||
| message(STATUS "GRASS_VERSION_NUMBER = '${GRASS_VERSION_NUMBER}'") | ||
| set(GRASS_VERSION_UPDATE_PKG "0.2") | ||
|
|
||
| include(set_compiler_flags) | ||
| set_compiler_flags() | ||
|
|
||
| include(repo_status) | ||
| repo_status("${CMAKE_CURRENT_LIST_DIR}" GRASS_VERSION_GIT) | ||
|
|
||
| enable_testing() | ||
|
|
||
| # Setup build locations. | ||
| if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) | ||
| set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
| endif() | ||
| if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) | ||
| set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
| endif() | ||
| if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) | ||
| set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
| endif() | ||
|
|
||
| include(build_module) | ||
| include(build_program) | ||
| include(build_program_in_subdir) | ||
| include(build_library_in_subdir) | ||
| include(copy_python_files_in_subdir) | ||
| include(build_script_in_subdir) | ||
| include(build_gui_in_subdir) | ||
| include(check_target) | ||
|
|
||
| add_subdirectory(thirdparty) | ||
| set(MKHTML_PY ${CMAKE_BINARY_DIR}/utils/mkhtml.py) | ||
|
|
||
| set(GISBASE ${CMAKE_BINARY_DIR}/gisbase) | ||
| file(TO_NATIVE_PATH "${GISBASE}" GISBASE_NATIVE) | ||
| file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/bin" BINARY_DIR) | ||
| file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/lib" LIB_DIR) | ||
| file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}" MODULE_TOPDIR) | ||
| file(TO_NATIVE_PATH "${GISBASE}/scripts" SCRIPTS_DIR) | ||
| file(TO_NATIVE_PATH "${GISBASE}/etc/config/rc" GISRC) | ||
| file(TO_NATIVE_PATH "${GISBASE}/etc/python" ETC_PYTHON_DIR) | ||
| file(TO_NATIVE_PATH "${GISBASE}/gui/wxpython" GUI_WXPYTHON_DIR) | ||
| if(WIN32) | ||
| set(sep "\;") | ||
| set(env_path "") | ||
| else() | ||
| set(sep ":") | ||
| set(env_path ":$ENV{PATH}") | ||
| endif() | ||
|
|
||
|
|
||
| set(grass_env_command ${CMAKE_COMMAND} -E env | ||
| "PATH=${BINARY_DIR}${sep}${SCRIPTS_DIR}${env_path}" | ||
| "PYTHONPATH=${ETC_PYTHON_DIR}${sep}${GUI_WXPYTHON_DIR}${sep}$ENV{PYTHONPATH}" | ||
| "LD_LIBRARY_PATH=${LIB_DIR}${sep}$ENV{LD_LIBRARY_PATH}" | ||
| "GISBASE=${GISBASE_NATIVE}" | ||
| "GISRC=${GISRC}" | ||
| "LC_ALL=C" | ||
| "LANG=C" | ||
| "LANGUAGE=C" | ||
| "MODULE_TOPDIR=${MODULE_TOPDIR}" | ||
| "VERSION_NUMBER=\"${GRASS_VERSION_NUMBER}\"" | ||
| "VERSION_DATE=\"${GRASS_VERSION_DATE}\"") | ||
|
|
||
|
|
||
|
|
||
| set(NO_HTML_DESCR_TARGETS "g.parser;ximgview;test.raster3d.lib") | ||
| add_subdirectory(include) | ||
|
|
||
| include_directories("${CMAKE_BINARY_DIR}/include") | ||
| include_directories(${CMAKE_BINARY_DIR}/include/grass) | ||
| if(MSVC) | ||
| include_directories("${CMAKE_SOURCE_DIR}/msvc") | ||
| endif() | ||
|
|
||
| execute_process( | ||
| COMMAND ${CMAKE_COMMAND} -E echo "Creating directories in ${GISBASE}" | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/bin/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/scripts/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/demolocation/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/config/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/driver/db/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/utils/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/lib/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/python/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/lister/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/etc/python/grass/lib | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/wxpython/xml/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/icons/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/gui/images/ | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory ${GISBASE}/docs/html/ | ||
| ) | ||
|
|
||
| add_subdirectory(lib) | ||
| add_subdirectory(utils) | ||
| set(modules_list) | ||
|
|
||
|
|
||
| set(ALL_SUBDIRS | ||
| general | ||
| db | ||
| display | ||
| imagery | ||
| misc | ||
| raster | ||
| raster3d | ||
| scripts | ||
| vector | ||
| temporal | ||
| ps | ||
| ) | ||
|
|
||
| foreach(d ${ALL_SUBDIRS}) | ||
| add_subdirectory(${d}) | ||
| endforeach() | ||
| add_custom_target(ALL_MODULES | ||
| COMMAND ${CMAKE_COMMAND} -E echo "Building all modules" | ||
| DEPENDS ${modules_list}) | ||
|
|
||
| ###message(FATAL_ERROR "modules_list=${modules_list}") | ||
|
|
||
| if(WITH_PYTHON) | ||
| add_subdirectory(gui) | ||
| endif() | ||
|
|
||
| add_subdirectory(python) | ||
|
|
||
| if(WITH_DOCS) | ||
| add_subdirectory(doc) | ||
| add_subdirectory(man) | ||
| endif() # WITH_DOCS | ||
|
|
||
|
|
||
| ####add_subdirectory(locale) | ||
|
|
||
| # TODO: To be discussed | ||
| # add_subdirectory(testsuite) | ||
| # add_subdirectory(macosx) | ||
|
|
||
| if(WITH_X11) | ||
| build_program_in_subdir(visualization/ximgview DEPENDS grass_gis X11) | ||
| endif() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # AUTHOR(S): Rashad Kanavath <rashad km gmail> | ||
| # PURPOSE: Copy g.gui script plus .bat file if on windows | ||
| # COPYRIGHT: (C) 2020 by the GRASS Development Team | ||
| # This program is free software under the GPL (>=v2) | ||
| # Read the file COPYING that comes with GRASS for details. | ||
| # -DSOURCE_DIR | ||
| # -DGISBASE | ||
| # -DG_NAME | ||
| # -DSRC_SCRIPT_FILE | ||
| # -DBINARY_DIR | ||
|
|
||
| set(SCRIPT_EXT "") | ||
| if(WIN32) | ||
| set(SCRIPT_EXT ".py") | ||
| endif() | ||
|
|
||
| if(WIN32) | ||
| set(PGM_NAME ${G_NAME}) | ||
| configure_file( | ||
| ${SOURCE_DIR}/cmake/windows_launch.bat.in | ||
| ${GISBASE}/scripts/${G_NAME}.bat @ONLY) | ||
| endif(WIN32) | ||
|
|
||
| set(TMP_SCRIPT_FILE ${BINARY_DIR}/CMakeFiles/${G_NAME}${SCRIPT_EXT}) | ||
| configure_file(${SRC_SCRIPT_FILE} ${TMP_SCRIPT_FILE} COPYONLY) | ||
| file( | ||
| COPY ${TMP_SCRIPT_FILE} | ||
| DESTINATION ${GISBASE}/scripts/ | ||
| FILE_PERMISSIONS | ||
| OWNER_READ OWNER_WRITE OWNER_EXECUTE | ||
| GROUP_READ GROUP_EXECUTE | ||
| WORLD_READ WORLD_EXECUTE) | ||
|
|
||
|
|
||
| file(REMOVE ${TMP_SCRIPT_FILE}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a strong reason for this option? It might be better to leave it for the user to configure custom linker, if they wish (they can always do it themselves).
One main reason is that we want the cmake to be minimal and robust, that can still against compiler API changes, because maintainability is one of important concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's optional, but we've added it in GDAL and QGIS.
It can speed up the build.