Skip to content
Permalink
Browse files
Fix auto_ptr compilation error
  • Loading branch information
nirvn committed Jul 7, 2021
1 parent 4b52b7b commit 4f384f4e65997363f63c00da873a7348ca3546d5
Showing with 8 additions and 8 deletions.
  1. +0 −8 src/analysis/CMakeLists.txt
  2. +8 −0 src/core/CMakeLists.txt
@@ -455,14 +455,6 @@ add_library(qgis_analysis ${LIBRARY_TYPE} ${QGIS_ANALYSIS_SRCS} ${QGIS_ANALYSIS_
# require c++17
target_compile_features(qgis_analysis PRIVATE cxx_std_17)

# Exiv still uses std::auto_ptr
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_definitions(qgis_analysis PUBLIC _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
endif()
if (MSVC)
target_compile_definitions(qgis_analysis PUBLIC _HAS_AUTO_PTR_ETC=1)
endif()

target_include_directories(qgis_analysis PUBLIC
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/georeferencing
@@ -1863,6 +1863,14 @@ add_library(qgis_core ${LIBRARY_TYPE} ${QGIS_CORE_SRCS} ${QGIS_CORE_HDRS} ${QGIS
# require c++17
target_compile_features(qgis_core PRIVATE cxx_std_17)

# Exiv still uses std::auto_ptr
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_definitions(qgis_core PUBLIC _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
endif()
if (MSVC)
target_compile_definitions(qgis_core PUBLIC _HAS_AUTO_PTR_ETC=1)
endif()

target_include_directories(qgis_core SYSTEM PUBLIC
${${QT_VERSION_BASE}Core_INCLUDE_DIRS}
${${QT_VERSION_BASE}Gui_INCLUDE_DIRS}

0 comments on commit 4f384f4

Please sign in to comment.