Skip to content

Commit

Permalink
[cmake] Fix warning that project() should be called prior to enable_l…
Browse files Browse the repository at this point in the history
…anguage()
  • Loading branch information
vgvassilev committed Mar 1, 2025
1 parent 57a47e7 commit 377c2cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.7.0)

if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
project(clad)
endif()

enable_language(CXX)
set(CMAKE_CXX_EXTENSIONS NO)

Expand Down Expand Up @@ -45,8 +49,6 @@ set(LLVM_VERSION_UPPER_BOUND 19.2.0)
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
set(CLAD_BUILT_STANDALONE 1)

project(clad)

if (NOT DEFINED Clang_DIR)
set(Clang_DIR ${LLVM_DIR})
endif()
Expand Down

0 comments on commit 377c2cd

Please sign in to comment.