Skip to content

Commit

Permalink
increase minimal version requirement to 3.5, call before project
Browse files Browse the repository at this point in the history
Future cmake will no longer support features before version 3.5
Also `cmake_minimum_required` must be called before `project`
  • Loading branch information
linev authored and jenkins committed Aug 17, 2023
1 parent 76e87e6 commit 0a23c00
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit 0a23c00

Please sign in to comment.