SHA256
3
0
forked from pool/cmake

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
This commit is contained in:
Dirk Mueller 2020-01-30 10:28:01 +00:00 committed by Git OBS Bridge
parent 1bd6d76661
commit dd41aea1b6
2 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 14 23:14:08 UTC 2020 - Christoph Junghans <junghans@votca.org>
- use cmake generics in marcos.cmake
-------------------------------------------------------------------
Fri Dec 20 10:09:57 UTC 2019 - Christoph G <foss@grueninger.de>

View File

@ -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 \