diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-07-08 16:01:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-08 16:01:15 +0200 |
| commit | a8f58871c23d79f95fb6b8e4936f0eb5344764ce (patch) | |
| tree | dba0e474de62dcb9fd2e28318f17502c8c098293 | |
| parent | aff43892f43dce14751e4f3be7e85d233793428b (diff) | |
| parent | edf2d9e4f3e295f396a6cd907d7a7e8a4931df29 (diff) | |
| download | PROJ-a8f58871c23d79f95fb6b8e4936f0eb5344764ce.tar.gz PROJ-a8f58871c23d79f95fb6b8e4936f0eb5344764ce.zip | |
Merge pull request #2297 from rouault/backport_2294
[Backport 7.1] CMake build: Check "target_clones" before use
| -rw-r--r-- | src/lib_proj.cmake | 13 | ||||
| -rwxr-xr-x | travis/osx/before_install.sh | 14 |
2 files changed, 19 insertions, 8 deletions
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index abc9cc4b..59cb9572 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -303,7 +303,18 @@ source_group("CMake Files" FILES CMakeLists.txt) # Embed PROJ_LIB data files location add_definitions(-DPROJ_LIB="${CMAKE_INSTALL_PREFIX}/${DATADIR}") -add_definitions(-DTARGET_CLONES_FMA_ALLOWED) +# The gcc "target_clones" function attribute relies on an extension +# to the ELF standard. It must not be used on MinGW. +include(CheckCXXSourceCompiles) +set(CMAKE_REQUIRED_QUIET TRUE) +check_cxx_source_compiles([[ + __attribute__((target_clones("fma","default"))) + int clonable() { return 0; } + int main() { return clonable(); } +]] TARGET_CLONES_FMA_ALLOWED) +if(TARGET_CLONES_FMA_ALLOWED) + add_definitions(-DTARGET_CLONES_FMA_ALLOWED) +endif() ################################################# ## targets: libproj and proj_config.h diff --git a/travis/osx/before_install.sh b/travis/osx/before_install.sh index 4c3dbdb2..5af2fd7a 100755 --- a/travis/osx/before_install.sh +++ b/travis/osx/before_install.sh @@ -4,19 +4,19 @@ set -e export PATH=$HOME/Library/Python/3.7/bin:$PATH -brew unlink python@2 -brew update +#brew unlink python@2 +#brew update brew install ccache #brew upgrade sqlite3 #brew upgrade libtiff -brew install doxygen graphviz +#brew install doxygen graphviz #brew install md5sha1sum #brew reinstall python -brew reinstall wget +#brew reinstall wget ./travis/before_install_pip.sh -pip3 install --user sphinx sphinx-rtd-theme sphinxcontrib-bibtex breathe -which sphinx-build +# pip3 install --user sphinx sphinx-rtd-theme sphinxcontrib-bibtex breathe +# which sphinx-build -(cd docs; make html) +# (cd docs; make html) |
