Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/iceberg/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,16 @@ if(ICEBERG_BUILD_HIVE)
endif()

if(ICEBERG_CXX20_COMPAT)
# De-duplicate libraries only when the linker supports it, without changing
# policies for other targets or requiring a newer CMake version.
cmake_policy(PUSH)
if(POLICY CMP0156)
cmake_policy(SET CMP0156 NEW)
endif()
if(POLICY CMP0179)
cmake_policy(SET CMP0179 NEW)
endif()

# Compile the public headers as a C++20 consumer. The list lives in
# iceberg/cpp20_compatibility_internal.h, generated by
# ci/scripts/generate_public_headers.py; headers of optional components are enabled
Expand Down Expand Up @@ -422,4 +432,5 @@ if(ICEBERG_CXX20_COMPAT)
target_compile_options(cpp20_compatibility_test PRIVATE /bigobj /Zc:preprocessor)
endif()
add_test(NAME cpp20_compatibility_test COMMAND cpp20_compatibility_test)
cmake_policy(POP)
endif()
Loading