🔧 Replaced makefile with cmake

This commit is contained in:
Edgar 2020-10-19 15:51:06 +02:00
parent 76a08be0ef
commit f79af11e76
No known key found for this signature in database
GPG Key ID: DCEF55BA0742A54B
4 changed files with 17 additions and 13 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
build
tmp tmp

15
CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
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
)
endforeach ()

View File

@ -1,11 +0,0 @@
CMD := cmake
SCRIPT := -P update.cmake
cmake:
$(CMD) -DTOOL=cmake -DREPO="Kitware/CMake" $(SCRIPT)
conan:
$(CMD) -DTOOL=conan -DREPO="conan-io/conan" $(SCRIPT)
sccache:
$(CMD) -DTOOL=sccache -DREPO="mozilla/sccache" $(SCRIPT)

View File

@ -7,5 +7,4 @@ string(REGEX REPLACE /[^0-9\\.]/ "" VERSION ${VERSION_DIRTY})
string(REPLACE "." "_" VERSION_UNDERSCORE ${VERSION}) string(REPLACE "." "_" VERSION_UNDERSCORE ${VERSION})
message("Latest VERSION ${VERSION}") message("Latest VERSION ${VERSION}")
configure_file("${CMAKE_CURRENT_LIST_DIR}/templates/install-${TOOL}.sh.in" "${CMAKE_CURRENT_LIST_DIR}/install-${TOOL}.sh" @ONLY)
configure_file("templates/install-${TOOL}.sh.in" install-${TOOL}.sh @ONLY)