aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/lib_proj.cmake2
-rw-r--r--src/projections/tmerc.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e5f41546..fe816af0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,7 +7,7 @@ check_PROGRAMS = geodtest
AM_CPPFLAGS = -DPROJ_LIB=\"$(pkgdatadir)\" \
-DMUTEX_@MUTEX_SETTING@ -I$(top_srcdir)/include @SQLITE3_CFLAGS@ @TIFF_CFLAGS@ @TIFF_ENABLED_FLAGS@ @CURL_CFLAGS@ @CURL_ENABLED_FLAGS@
-AM_CXXFLAGS = @CXX_WFLAGS@ @FLTO_FLAG@
+AM_CXXFLAGS = @CXX_WFLAGS@ @FLTO_FLAG@ @TARGET_CLONES_FMA_FLAGS@
include_HEADERS = proj.h proj_experimental.h proj_constants.h proj_api.h geodesic.h \
proj_symbol_rename.h
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index 8978e20f..7c93b205 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -301,6 +301,8 @@ 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)
+
#################################################
## targets: libproj and proj_config.h
#################################################
diff --git a/src/projections/tmerc.cpp b/src/projections/tmerc.cpp
index 754fe53f..91dad135 100644
--- a/src/projections/tmerc.cpp
+++ b/src/projections/tmerc.cpp
@@ -61,7 +61,7 @@ struct pj_opaque_exact {
// mechanism for that, where the compiler builds a default version, and one that
// uses FMA. And at runtimes it figures out automatically which version can be used
// by the current CPU. This allows to create general purpose binaries.
-#if defined(__GNUC__) && __GNUC__ >= 6 && defined(__x86_64__) && !defined(__FMA__)
+#if defined(TARGET_CLONES_FMA_ALLOWED) && defined(__GNUC__) && __GNUC__ >= 6 && defined(__x86_64__) && !defined(__FMA__)
#define BUILD_FMA_OPTIMIZED_VERSION
#endif