Skip to content

Commit 4cc2a41

Browse files
update spec macros for CMake builds
1 parent 03f9155 commit 4cc2a41

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

bloom/generators/rpm/templates/ament_cmake/template.spec.em

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Source0: %{name}-%{version}.tar.gz
3939
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
4040
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
4141
mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
42-
%cmake3 \
42+
%cmake \
4343
-UINCLUDE_INSTALL_DIR \
4444
-ULIB_INSTALL_DIR \
4545
-USYSCONF_INSTALL_DIR \
@@ -54,14 +54,14 @@ mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
5454
%endif
5555
..
5656

57-
%make_build
57+
%cmake_build
5858

5959
%install
6060
# In case we're installing to a non-standard location, look for a setup.sh
6161
# in the install tree and source it. It will set things like
6262
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
6363
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
64-
%make_install -C .obj-%{_target_platform}
64+
%cmake_install
6565

6666
%if 0%{?with_tests}
6767
%check
@@ -73,7 +73,7 @@ if [ -n "$TEST_TARGET" ]; then
7373
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
7474
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
7575
CTEST_OUTPUT_ON_FAILURE=1 \
76-
%make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED"
76+
%cmake_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED"
7777
else echo "RPM TESTS SKIPPED"; fi
7878
%endif
7979

bloom/generators/rpm/templates/cmake/template.spec.em

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Source0: %{name}-%{version}.tar.gz
3939
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
4040
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
4141
mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
42-
%cmake3 \
42+
%cmake \
4343
-UINCLUDE_INSTALL_DIR \
4444
-ULIB_INSTALL_DIR \
4545
-USYSCONF_INSTALL_DIR \
@@ -53,14 +53,14 @@ mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
5353
%endif
5454
..
5555

56-
%make_build
56+
%cmake_build
5757

5858
%install
5959
# In case we're installing to a non-standard location, look for a setup.sh
6060
# in the install tree and source it. It will set things like
6161
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
6262
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
63-
%make_install -C .obj-%{_target_platform}
63+
%cmake_install
6464

6565
%if 0%{?with_tests}
6666
%check
@@ -72,7 +72,7 @@ if [ -n "$TEST_TARGET" ]; then
7272
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
7373
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
7474
CTEST_OUTPUT_ON_FAILURE=1 \
75-
%make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED"
75+
%cmake_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED"
7676
else echo "RPM TESTS SKIPPED"; fi
7777
%endif
7878

0 commit comments

Comments
 (0)