Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDamjan Jelas2022-07-26 14:39:27 +0200
committerMartin Hořeňovský2022-08-04 00:09:02 +0200
commit47d56f28a9801911c048d011b375e5631dbb658f (patch)
tree72da6a3f1faec889397266395e75609553ad0f11
parenta1187996310e11497dd82faa2c7c8722e07571a6 (diff)
downloadcatch3-47d56f28a9801911c048d011b375e5631dbb658f.tar.gz
Fix compatibility with cmake 3.8
-rw-r--r--CMakeLists.txt26
1 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7233477f..ae8e86b9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,22 +30,24 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
endif()
-if(CMAKE_VERSION VERSION_GREATER 3.8)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.9)
# Enable IPO for CMake versions that support it
cmake_policy(SET CMP0069 NEW)
+ project(Catch2
+ VERSION 3.1.0 # CML version placeholder, don't delete
+ LANGUAGES CXX
+ # HOMEPAGE_URL is not supported until CMake version 3.12, which
+ # we do not target yet.
+ # HOMEPAGE_URL "https://github.com/catchorg/Catch2"
+ DESCRIPTION "A modern, C++-native, unit test framework."
+ )
+else()
+ project(Catch2
+ VERSION 3.1.0 # CML version placeholder, don't delete
+ LANGUAGES CXX
+ )
endif()
-
-project(Catch2
- VERSION 3.1.0 # CML version placeholder, don't delete
- LANGUAGES CXX
- # HOMEPAGE_URL is not supported until CMake version 3.12, which
- # we do not target yet.
- # HOMEPAGE_URL "https://github.com/catchorg/Catch2"
- DESCRIPTION "A modern, C++-native, unit test framework."
-)
-
-
# Provide path for scripts. We first add path to the scripts we don't use,
# but projects including us might, and set the path up to parent scope.
# Then we also add path that we use to configure the project, but is of