From a28421e1299be51c530f4ac0e9ad968ce127303e Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 12 Aug 2022 00:09:48 +0200 Subject: 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(). --- build/cmake/CMakeLists.txt | 8 ++++---- 1 file 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 -- cgit v0.12