Set CMake project language to C

This commit is contained in:
Ernestas Kulik 2020-02-07 10:05:34 +01:00
commit 14c1eea77c
2 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,38 @@
From 18454b71170605b1a55ae13eca73fb8170b036a2 Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
Date: Fri, 7 Feb 2020 10:00:49 +0100
Subject: [PATCH] CMakeLists.txt: Complete project() call
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This means setting the version there (requiring CMP0048 to be set to
NEW) and setting LANGUAGES to C, since we dont need a C++ compiler.
---
CMakeLists.txt | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1a6bf0..679cae9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,12 @@
cmake_minimum_required(VERSION 2.8)
-
-project(abrt-java-connector)
-enable_testing()
+cmake_policy(SET CMP0048 NEW)
# Beware, PROJECT_VERSION will be overridden by information from git
-set(PROJECT_VERSION "1.1.3")
+project(
+ abrt-java-connector
+ VERSION 1.1.3
+ LANGUAGES C)
+enable_testing()
message("Configuring ${PROJECT_NAME}-${PROJECT_VERSION} on ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
--
2.24.1

View file

@ -16,6 +16,7 @@ BuildRequires: check-devel
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: git-core
BuildRequires: java-devel
BuildRequires: libreport-devel
BuildRequires: rpm-devel
@ -24,6 +25,8 @@ BuildRequires: systemd-devel
Requires: abrt
Patch0001: 0001-CMakeLists.txt-Complete-project-call.patch
%description
JNI library providing an agent capable to process both caught and uncaught
exceptions and transform them to ABRT problems.
@ -41,7 +44,7 @@ This package contains only minimal set of files needed for container exception
logging.
%prep
%setup -qn %{name}-%{commit}
%autosetup -n %{name}-%{commit}
%build
@ -94,6 +97,7 @@ make test || {
%changelog
* Fri Feb 07 2020 Ernestas Kulik <ekulik@redhat.com> - 1.1.3-1
- Fix stack traces not being logged in journald
- Set project language to C to avoid looking for a C++ compiler
* Fri Feb 07 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.1.2-4
- Rebuild for satyr 0.30