cmake: set 3.5 as minimum version

This commit is contained in:
selsta 2021-04-26 01:27:02 +02:00
parent 0a1ddc2eff
commit cbd54ea524
No known key found for this signature in database
GPG Key ID: 2EA0A99A8B07AE5E
10 changed files with 13 additions and 13 deletions

View File

@ -43,7 +43,7 @@ if (IOS)
INCLUDE(CmakeLists_IOS.txt) INCLUDE(CmakeLists_IOS.txt)
endif() endif()
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.5)
message(STATUS "CMake version ${CMAKE_VERSION}") message(STATUS "CMake version ${CMAKE_VERSION}")
project(monero) project(monero)
@ -655,7 +655,7 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}")
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized") set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang") if(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(ARM) if(ARM)
set(WARNINGS "${WARNINGS} -Wno-error=inline-asm") set(WARNINGS "${WARNINGS} -Wno-error=inline-asm")
endif() endif()
@ -886,7 +886,7 @@ else()
endif() endif()
set(USE_LTO ${USE_LTO_DEFAULT} CACHE BOOL "Use Link-Time Optimization (Release mode only)") set(USE_LTO ${USE_LTO_DEFAULT} CACHE BOOL "Use Link-Time Optimization (Release mode only)")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable # There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable
set(USE_LTO false) set(USE_LTO false)
endif() endif()
@ -1033,7 +1033,7 @@ if(ANDROID)
set(ATOMIC libatomic.a) set(ATOMIC libatomic.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=user-defined-warnings") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=user-defined-warnings")
endif() endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND NOT FREEBSD) if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND NOT FREEBSD)
find_library(ATOMIC atomic) find_library(ATOMIC atomic)
if (ATOMIC_FOUND) if (ATOMIC_FOUND)
list(APPEND EXTRA_LIBRARIES ${ATOMIC}) list(APPEND EXTRA_LIBRARIES ${ATOMIC})

View File

@ -44,7 +44,7 @@ if (CCACHE_FOUND)
# Try to compile a test program with ccache, in order to verify if it really works. (needed on exotic setups) # Try to compile a test program with ccache, in order to verify if it really works. (needed on exotic setups)
set(TEST_PROJECT "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp") set(TEST_PROJECT "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp")
file(WRITE "${TEST_PROJECT}/CMakeLists.txt" [=[ file(WRITE "${TEST_PROJECT}/CMakeLists.txt" [=[
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.5)
project(test) project(test)
option (CCACHE "") option (CCACHE "")
file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }") file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 3.5)
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
#set(Boost_DEBUG 1) #set(Boost_DEBUG 1)
find_package(Boost COMPONENTS system filesystem thread date_time chrono regex ) find_package(Boost COMPONENTS system filesystem thread date_time chrono regex )

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 3.5)
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)

View File

@ -26,7 +26,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.5)
project(easylogging CXX) project(easylogging CXX)

View File

@ -26,7 +26,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required (VERSION 2.6) cmake_minimum_required (VERSION 3.5)
project (monero CXX) project (monero CXX)
file(GLOB CRYPTONOTE_PROTOCOL *) file(GLOB CRYPTONOTE_PROTOCOL *)

View File

@ -26,7 +26,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required (VERSION 2.6) cmake_minimum_required (VERSION 3.5)
project (monero CXX) project (monero CXX)
file(GLOB P2P *) file(GLOB P2P *)

View File

@ -45,7 +45,7 @@ endif()
# ${gtest_BINARY_DIR}. # ${gtest_BINARY_DIR}.
# Language "C" is required for find_package(Threads). # Language "C" is required for find_package(Threads).
project(gtest CXX C) project(gtest CXX C)
cmake_minimum_required(VERSION 2.6.2) cmake_minimum_required(VERSION 3.5)
if (COMMAND set_up_hermetic_build) if (COMMAND set_up_hermetic_build)
set_up_hermetic_build() set_up_hermetic_build()

View File

@ -96,7 +96,7 @@ macro(config_compiler_and_linker)
set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0") set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
set(cxx_strict_flags set(cxx_strict_flags
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers") "-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(cxx_base_flags "-Wall -Wshadow -fPIC") set(cxx_base_flags "-Wall -Wshadow -fPIC")
set(cxx_exception_flags "-fexceptions") set(cxx_exception_flags "-fexceptions")
set(cxx_no_exception_flags "-fno-exceptions") set(cxx_no_exception_flags "-fno-exceptions")

View File

@ -26,7 +26,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.5)
project(translations) project(translations)