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 \