summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpaceIm <30052553+SpaceIm@users.noreply.github.com>2022-08-11 22:09:48 (GMT)
committerSpaceIm <30052553+SpaceIm@users.noreply.github.com>2022-08-11 22:09:48 (GMT)
commita28421e1299be51c530f4ac0e9ad968ce127303e (patch)
tree38b7ae581582d3343188cdcdba1df7f63ba19b1e
parente691e827280453e67fdf57421bb58d6e1faf734d (diff)
downloadlz4-a28421e1299be51c530f4ac0e9ad968ce127303e.zip
lz4-a28421e1299be51c530f4ac0e9ad968ce127303e.tar.gz
lz4-a28421e1299be51c530f4ac0e9ad968ce127303e.tar.bz2
cmake: move cmake_minimum_required() before project()
cmake_minimum_required() must always be the first instruction of a CMakeLists. project() should come after cmake_minimum_required() as soon as possible. Therefore option() are moved after 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 e92115b..eb7007b 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