increase minimal version requirement to 3.5, call before project

Future cmake will no longer support features before version 3.5
Also `cmake_minimum_required` must be called before `project`
This commit is contained in:
Sergey Linev 2023-08-17 14:24:09 +02:00 committed by jenkins
parent 76e87e6686
commit 0a23c00a1a

View File

@ -1,17 +1,18 @@
cmake_minimum_required(VERSION 3.4.3)
if(WIN32)
# We need cmake to support exporting of symbols not only from libraries but
# from executables too. This way cling can find symbols from its own
# executable during runtime.
cmake_minimum_required(VERSION 3.6.2)
else(WIN32)
# support of earlier cmake versions will be removed soon
cmake_minimum_required(VERSION 3.5)
endif(WIN32)
# If we are not building as a part of LLVM, build Cling as an
# standalone project, using LLVM as an external library:
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
project(Cling)
if(WIN32)
# We need cmake to support exporting of symbols not only from libraries but
# from executables too. This way cling can find symbols from its own
# executable during runtime.
cmake_minimum_required(VERSION 3.6.2)
endif(WIN32)
# Rely on llvm-config.
set(CONFIG_OUTPUT)
find_program(LLVM_CONFIG "llvm-config")