From bb5c78038b7a2ae4bdedb44958f54ef3bbbc11d7 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Jul 20 2020 15:53:53 +0000 Subject: Improve compatibility with new CMake macro Signed-off-by: Igor Raits --- diff --git a/cxxopts.spec b/cxxopts.spec index 0727ea8..c492fd2 100644 --- a/cxxopts.spec +++ b/cxxopts.spec @@ -1,3 +1,4 @@ +%undefine __cmake_in_source_build %global debug_package %{nil} Name: cxxopts @@ -31,26 +32,21 @@ Requires: libstdc++-devel%{?_isa} %prep %autosetup -p1 -mkdir -p %{_target_platform} %build -pushd %{_target_platform} - %cmake -G Ninja \ +%cmake -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCXXOPTS_ENABLE_INSTALL=ON \ -DCXXOPTS_BUILD_EXAMPLES=OFF \ -DCXXOPTS_BUILD_TESTS=ON \ - .. -popd -%ninja_build -C %{_target_platform} + %{nil} +%cmake_build %check -pushd %{_target_platform} - ctest --output-on-failure -popd +%ctest %install -%ninja_install -C %{_target_platform} +%cmake_install %files devel %doc README.md