🔧 Replaced cmakelist with a makefile
This commit is contained in:
parent
52aeae3c6c
commit
ca948a78a2
18
.gitignore
vendored
18
.gitignore
vendored
@ -2,21 +2,3 @@ build
|
|||||||
tmp
|
tmp
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
### CMake ###
|
|
||||||
CMakeLists.txt.user
|
|
||||||
CMakeCache.txt
|
|
||||||
CMakeFiles
|
|
||||||
CMakeScripts
|
|
||||||
Testing
|
|
||||||
Makefile
|
|
||||||
cmake_install.cmake
|
|
||||||
install_manifest.txt
|
|
||||||
compile_commands.json
|
|
||||||
CTestTestfile.cmake
|
|
||||||
_deps
|
|
||||||
CMakeUserPresets.json
|
|
||||||
|
|
||||||
### CMake Patch ###
|
|
||||||
# External projects
|
|
||||||
*-prefix/
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
|
||||||
|
|
||||||
project(ci-scripts LANGUAGES NONE)
|
|
||||||
|
|
||||||
set(TOOLS "kitware/cmake" "conan-io/conan" "mozilla/sccache")
|
|
||||||
|
|
||||||
foreach (item IN ITEMS ${TOOLS})
|
|
||||||
string(REPLACE "/" ";" RLIST ${item})
|
|
||||||
list(GET RLIST 1 TOOL)
|
|
||||||
add_custom_target(
|
|
||||||
${TOOL}
|
|
||||||
COMMAND ${CMAKE_COMMAND} -DTOOL=${TOOL} -DREPO=${item} -P ${CMAKE_SOURCE_DIR}/update.cmake
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
list(APPEND all_tools ${TOOL})
|
|
||||||
endforeach ()
|
|
||||||
|
|
||||||
add_custom_target(
|
|
||||||
update_all ALL
|
|
||||||
COMMENT "Update all tools"
|
|
||||||
DEPENDS ${all_tools}
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
10
Makefile
Normal file
10
Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
all : cmake conan sccache
|
||||||
|
|
||||||
|
cmake:
|
||||||
|
cmake -DTOOL=cmake -DREPO=kitware -P update.cmake
|
||||||
|
|
||||||
|
conan:
|
||||||
|
cmake -DTOOL=conan -DREPO=conan-io -P update.cmake
|
||||||
|
|
||||||
|
sccache:
|
||||||
|
cmake -DTOOL=sccache -DREPO=mozilla -P update.cmake
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
wget "https://github.com/Kitware/CMake/releases/download/v3.20.03/cmake-3.20.03-Linux-x86_64.sh" -nv -O /tmp/cmake.sh
|
wget "https://github.com/Kitware/CMake/releases/download/v3.20.04/cmake-3.20.04-Linux-x86_64.sh" -nv -O /tmp/cmake.sh
|
||||||
sh /tmp/cmake.sh --exclude-subdir --prefix=/usr/local
|
sh /tmp/cmake.sh --exclude-subdir --prefix=/usr/local
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
message("TOOL \"${TOOL}\" REPO \"${REPO}\"")
|
message("TOOL \"${TOOL}\" REPO \"${REPO}\"")
|
||||||
|
|
||||||
SET(URL "https://api.github.com/repos/${REPO}/releases/latest")
|
SET(URL "https://api.github.com/repos/${REPO}/${TOOL}/releases/latest")
|
||||||
|
|
||||||
execute_process(COMMAND curl -s -L ${URL} OUTPUT_VARIABLE VERSION_JSON)
|
execute_process(COMMAND curl -s -L ${URL} OUTPUT_VARIABLE VERSION_JSON)
|
||||||
string(JSON VERSION_DIRTY GET ${VERSION_JSON} tag_name)
|
string(JSON VERSION_DIRTY GET ${VERSION_JSON} tag_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user