Skip to content

Commit b8ae287

Browse files
authored
Enable IPO for CMake versions that support it
1 parent 735f46e commit b8ae287

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2525
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
2626
endif()
2727

28+
if(CMAKE_VERSION VERSION_GREATER 3.8)
29+
# Enable IPO for CMake versions that support it
30+
cmake_policy(SET CMP0069 NEW)
31+
endif()
32+
2833

2934
project(Catch2 LANGUAGES CXX VERSION 3.0.0)
3035

0 commit comments

Comments
 (0)