Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
fd1493be
Unverified
Commit
fd1493be
authored
Oct 17, 2025
by
Lei Wang
Committed by
GitHub
Oct 17, 2025
Browse files
Automatically initialize submodule if missing (#1052)
parent
cc00fb65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
CMakeLists.txt
CMakeLists.txt
+24
-0
No files found.
CMakeLists.txt
View file @
fd1493be
...
@@ -10,6 +10,30 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
...
@@ -10,6 +10,30 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
if
(
EXISTS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/.gitmodules"
AND EXISTS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/.git"
)
find_package
(
Git QUIET
)
if
(
Git_FOUND
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
submodule update --init --recursive
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
RESULT_VARIABLE TILELANG_GIT_SUBMODULE_RESULT
)
if
(
NOT TILELANG_GIT_SUBMODULE_RESULT EQUAL 0
)
message
(
FATAL_ERROR
"Failed to initialize git submodules. Please run "
"`git submodule update --init --recursive` and re-run CMake."
)
endif
()
else
()
message
(
FATAL_ERROR
"Git is required to initialize TileLang submodules. "
"Please install git or fetch the submodules manually."
)
endif
()
endif
()
find_program
(
CCACHE_PROGRAM ccache
)
find_program
(
CCACHE_PROGRAM ccache
)
if
(
CCACHE_PROGRAM
)
if
(
CCACHE_PROGRAM
)
set
(
CMAKE_C_COMPILER_LAUNCHER
"
${
CCACHE_PROGRAM
}
"
CACHE STRING
"C compiler launcher"
)
set
(
CMAKE_C_COMPILER_LAUNCHER
"
${
CCACHE_PROGRAM
}
"
CACHE STRING
"C compiler launcher"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment