aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2022-08-11 17:08:29 -0700
committerGitHub <noreply@github.com>2022-08-11 17:08:29 -0700
commit92839247b984e0d54a61295a1866cdab0c659991 (patch)
treec776dfef95e21e775b45883cb4b5d0519b90ab54
parent86e1ad67528af715ff44ba9954ab250a9898b141 (diff)
parenta28421e1299be51c530f4ac0e9ad968ce127303e (diff)
downloadlz4-92839247b984e0d54a61295a1866cdab0c659991.tar.gz
Merge pull request #1133 from SpaceIm/fix/cmake-minimum-required-position
cmake: move `cmake_minimum_required()` before `project()`
-rw-r--r--build/cmake/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
index e92115bf..eb7007b4 100644
--- a/build/cmake/CMakeLists.txt
+++ b/build/cmake/CMakeLists.txt
@@ -10,10 +10,9 @@
# LZ4's CMake support is maintained by Evan Nemerson; when filing
# bugs please mention @nemequ to make sure I see it.
-set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
+cmake_minimum_required(VERSION 2.8.12)
-option(LZ4_BUILD_CLI "Build lz4 program" ON)
-option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c program with legacy argument support" ON)
+set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
# Parse version information
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MAJOR REGEX "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$")
@@ -34,7 +33,8 @@ else()
LANGUAGES C)
endif()
-cmake_minimum_required (VERSION 2.8.12)
+option(LZ4_BUILD_CLI "Build lz4 program" ON)
+option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c program with legacy argument support" ON)
# If LZ4 is being bundled in another project, we don't want to
# install anything. However, we want to let people override this, so