From 37d636f25853828832fef641ca711d356163fff7 Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Mon, 27 Mar 2017 01:03:43 +0300 Subject: [PATCH] qca: improve tests --- src/qca-test.pro | 4 ++-- src/qca.mk | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qca-test.pro b/src/qca-test.pro index 0d4fb256..fb2cf815 100644 --- a/src/qca-test.pro +++ b/src/qca-test.pro @@ -1,8 +1,8 @@ # This file is part of MXE. See LICENSE.md for licensing information. TEMPLATE = app -greaterThan(QT_MAJOR_VERSION, 4): TARGET = test-qca5 -else: TARGET = test-qca +greaterThan(QT_MAJOR_VERSION, 4): TARGET = test-qca5-qmake +else: TARGET = test-qca-qmake SOURCES += qca-test.cpp CONFIG += crypto console QMAKE_CXXFLAGS += -Wall -Werror diff --git a/src/qca.mk b/src/qca.mk index 0b7b5500..cdde014a 100644 --- a/src/qca.mk +++ b/src/qca.mk @@ -20,17 +20,18 @@ define $(PKG)_BUILD $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) $(MAKE) -C '$(BUILD_DIR)' -j 1 install + # build test as qmake project $(if $(BUILD_SHARED), \ mkdir '$(BUILD_DIR)/test-qca' cd '$(BUILD_DIR)/test-qca' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PWD)/src/qca-test.pro' $(MAKE) -C '$(BUILD_DIR)/test-qca' -j $(JOBS) $(BUILD_TYPE) - $(INSTALL) -m755 '$(BUILD_DIR)/test-qca/$(BUILD_TYPE)/test-qca5.exe' '$(PREFIX)/$(TARGET)/bin/') + $(INSTALL) -m755 '$(BUILD_DIR)/test-qca/$(BUILD_TYPE)/test-qca5-qmake.exe' '$(PREFIX)/$(TARGET)/bin/') - # compile test + # build test manually '$(TARGET)-g++' \ - -W -Wall -Werror \ - '$(SOURCE_DIR)/examples/base64test/base64test.cpp' \ - -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + -W -Wall -Werror -std=gnu++11 \ + '$(PWD)/src/qca-test.cpp' \ + -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG)-pkgconfig.exe' \ `'$(TARGET)-pkg-config' qca2-qt5 --cflags --libs` endef