From dd41aea1b67a4884e4cb789a0f3023f7061e83f4363803c5462db24c56003189 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 30 Jan 2020 10:28:01 +0000 Subject: [PATCH] Accepting request 764792 from home:cjunghans:branches:devel:tools:building - use cmake generics in marcos.cmake OBS-URL: https://build.opensuse.org/request/show/764792 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=393 --- cmake.changes | 5 +++++ cmake.macros | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/cmake.changes b/cmake.changes index c71f4be..71425d9 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 14 23:14:08 UTC 2020 - Christoph Junghans + +- use cmake generics in marcos.cmake + ------------------------------------------------------------------- Fri Dec 20 10:09:57 UTC 2019 - Christoph G diff --git a/cmake.macros b/cmake.macros index 98aca97..562c110 100644 --- a/cmake.macros +++ b/cmake.macros @@ -7,6 +7,14 @@ %__builder %__make %__sourcedir . +%cmake_builder_deps() %{expand:\ +%if "%__builder" == "%__make" \ +BuildRequires: make \ +%else \ +BuildRequires: ninja \ +%endif \ +} + %cmake \ find %__sourcedir -name CMakeLists.txt \\\ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \ @@ -42,22 +50,14 @@ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules -%__builder_verbose \ -%if "%__builder" == "%__make" \ - %{?_make_output_sync} VERBOSE=1 \\\ -%else \ - -v \\\ -%endif \ -%{nil} - -%cmake_build %__builder \\%__builder_verbose %{?_smp_mflags} +%cmake_build %__cmake --build . --verbose %{?_smp_mflags} %make_jobs \ echo "Deprecated %%make_jobs macro used, please use %%cmake_build" \ %cmake_build %cmake_install \ - DESTDIR=%{buildroot} %__builder install -C %__builddir + DESTDIR=%{buildroot} %__cmake --install %__builddir --verbose %ctest(:-:) \ cd %__builddir \