From 3c0efcf24ae48fa698410749cf57e88c95b932fd Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 29 Apr 2021 22:53:58 +0300 Subject: [PATCH 1/4] update cmake --- CMake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake b/CMake index c59a0c8..5e0fc2b 160000 --- a/CMake +++ b/CMake @@ -1 +1 @@ -Subproject commit c59a0c81555a281273b38095613472abc0fe73b7 +Subproject commit 5e0fc2b92801eff4fb490f8db1cc2bd28e8d94e8 From f04313ce556e43f9aff08cb5e8643d1a63150f08 Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 29 Apr 2021 23:08:09 +0300 Subject: [PATCH 2/4] cmake fixes --- CMakeLists.txt | 9 ++++----- src/CMakeLists.txt | 3 --- tests/CMakeLists.txt | 1 - tests/tst_arithmetictests.cpp | 1 + 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08edf38..e46a271 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,13 +12,10 @@ if(TARGET ${PROJECT_NAME}) return() endif() -include(CMake/ccache.cmake) -include(CMake/QuasarAppCITargets.cmake) +include(CMake/QuasarApp.cmake) +include(CMake/Version.cmake) -# Add sub directories -add_subdirectory(src) - find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core QUIET) @@ -41,6 +38,8 @@ if (NOT DEFINED BIGINT_TESTS) endif() +add_subdirectory(src) + if (BIGINT_TESTS) add_subdirectory(tests) else() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0453e92..4413850 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,9 +10,6 @@ set(CURRENT_PROJECT ${PROJECT_NAME}) project(QtBigint LANGUAGES CXX) -include(../CMake/ProjectOut.cmake) -include(../CMake/Version.cmake) - file(GLOB SOURCE_CPP "*.cpp" "mini-gmp.c" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 113b1be..04fd7ba 100755 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,7 +9,6 @@ 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) diff --git a/tests/tst_arithmetictests.cpp b/tests/tst_arithmetictests.cpp index 5d9bc42..aee01e2 100644 --- a/tests/tst_arithmetictests.cpp +++ b/tests/tst_arithmetictests.cpp @@ -1,6 +1,7 @@ #include #include #include +#include // add necessary includes here From e2fcdf82813be03a9d43e2412b12916241f8bd9a Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 29 Apr 2021 23:31:53 +0300 Subject: [PATCH 3/4] fix wasm 32 --- src/minigmp_global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/minigmp_global.h b/src/minigmp_global.h index 7131e60..99f2e1a 100644 --- a/src/minigmp_global.h +++ b/src/minigmp_global.h @@ -10,10 +10,10 @@ #ifdef _WIN32 # define MINIGMPSHARED_EXPORT __declspec(dllexport) -#endif - -#if defined (linux) || defined (__linux__) || defined (__APPLE__) +#elif (linux) || defined (__linux__) || defined (__APPLE__) # define MINIGMPSHARED_EXPORT __attribute__((visibility("default"))) +#else +# define MINIGMPSHARED_EXPORT #endif From aedb54dfb5cf588c19e0448f10743852722a5045 Mon Sep 17 00:00:00 2001 From: EndrII Date: Thu, 29 Apr 2021 23:35:10 +0300 Subject: [PATCH 4/4] change cpp standart level --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4413850..d272622 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,9 @@ set(CURRENT_PROJECT ${PROJECT_NAME}) project(QtBigint LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + file(GLOB SOURCE_CPP "*.cpp" "mini-gmp.c"