forked from QuasarApp/QtBigInt
Compare commits
No commits in common. "main" and "task_12" have entirely different histories.
2
CMake
2
CMake
@ -1 +1 @@
|
||||
Subproject commit 5e0fc2b92801eff4fb490f8db1cc2bd28e8d94e8
|
||||
Subproject commit c59a0c81555a281273b38095613472abc0fe73b7
|
@ -12,40 +12,20 @@ if(TARGET ${PROJECT_NAME})
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(CMake/QuasarApp.cmake)
|
||||
include(CMake/Version.cmake)
|
||||
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core QUIET)
|
||||
|
||||
if (NOT DEFINED BIGINT_TESTS)
|
||||
set(BIGINT_TESTS ON)
|
||||
|
||||
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
||||
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
||||
set(BIGINT_TESTS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
set(BIGINT_TESTS OFF)
|
||||
endif()
|
||||
|
||||
if (NOT QT_VERSION_MAJOR)
|
||||
set(BIGINT_TESTS OFF)
|
||||
endif()
|
||||
endif()
|
||||
include(CMake/ccache.cmake)
|
||||
include(CMake/QuasarAppCITargets.cmake)
|
||||
|
||||
|
||||
# Add sub directories
|
||||
add_subdirectory(src)
|
||||
|
||||
if (BIGINT_TESTS)
|
||||
add_subdirectory(tests)
|
||||
else()
|
||||
message("The ${PROJECT_NAME} tests is disabled.")
|
||||
endif()
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
if(${QT_VERSION_MAJOR})
|
||||
add_subdirectory(tests)
|
||||
endif(${QT_VERSION_MAJOR})
|
||||
|
||||
initAll()
|
||||
|
||||
|
14
GMP.pro
14
GMP.pro
@ -11,7 +11,17 @@ CONFIG += ordered
|
||||
SUBDIRS += \
|
||||
src
|
||||
|
||||
gcc {
|
||||
lessThan (QT_MINOR_VERSION, 12) {
|
||||
message(disable tests!)
|
||||
} else {
|
||||
include($$PWD/tests/test.pri)
|
||||
message(enabled tests!)
|
||||
SUBDIRS += tests
|
||||
SUBDIRS += tests
|
||||
tests.file = tests/tests.pro
|
||||
}
|
||||
}
|
||||
|
||||
src.file = src/GMP.pro
|
||||
|
||||
QMAKE_EXTRA_TARGETS += \
|
||||
test
|
||||
|
@ -27,7 +27,7 @@
|
||||
* git submodule update --init --recursive
|
||||
* Include in your pro file the pri file of QtBigInt library
|
||||
>>include($$PWD/QtBigInt/GMP.pri)
|
||||
* Rebuild your project
|
||||
* Rebuild yuor project
|
||||
|
||||
## For cmake projects
|
||||
#### The cmake build do not required Qt libraries.
|
||||
@ -39,7 +39,7 @@
|
||||
>> set(WITHOUT_TESTS 1)
|
||||
* Include in your CMakeLists.txt file the main CMakeLists.txt file of QtBigInt library
|
||||
>> add_subdirectory(QtBigInt)
|
||||
* Rebuild your project
|
||||
* Rebuild yuor project
|
||||
|
||||
``` cmake
|
||||
set(WITHOUT_TESTS 1)
|
||||
@ -66,7 +66,7 @@ target_link_libraries(MyBinary PUBLIC QtBigInt)
|
||||
* git submodule update --init --recursive
|
||||
* Add the rule for build QtBigInt
|
||||
* Add INCLUDEPATH and LIBS for your build system
|
||||
* Rebuild your project
|
||||
* Rebuild yuor project
|
||||
|
||||
|
||||
# Usage
|
||||
|
@ -176,7 +176,7 @@ ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = .
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
@ -212,7 +212,7 @@ QHG_LOCATION =
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
ECLIPSE_DOC_ID = QuasarApp.QtBigInt
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = YES
|
||||
GENERATE_TREEVIEW = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
TREEVIEW_WIDTH = 250
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
@ -10,8 +10,8 @@ set(CURRENT_PROJECT ${PROJECT_NAME})
|
||||
|
||||
project(QtBigint LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
include(../CMake/ProjectOut.cmake)
|
||||
include(../CMake/Version.cmake)
|
||||
|
||||
file(GLOB SOURCE_CPP
|
||||
"*.cpp"
|
||||
|
@ -10,10 +10,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
# define MINIGMPSHARED_EXPORT __declspec(dllexport)
|
||||
#elif (linux) || defined (__linux__) || defined (__APPLE__)
|
||||
#endif
|
||||
|
||||
#if defined (linux) || defined (__linux__) || defined (__APPLE__)
|
||||
# define MINIGMPSHARED_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
# define MINIGMPSHARED_EXPORT
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(CURRENT_PROJECT ${PROJECT_NAME}Test)
|
||||
|
||||
include(../CMake/ProjectOut.cmake)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
@ -24,7 +25,7 @@ file(GLOB SOURCE_CPP
|
||||
)
|
||||
|
||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Test QtBigint)
|
||||
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt::Core Qt::Test QtBigint)
|
||||
target_include_directories(${CURRENT_PROJECT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
initTests()
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <QtTest>
|
||||
#include <bigint.h>
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
// add necessary includes here
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user