Commit Graph

41 Commits

Author SHA1 Message Date
silverqx 92775f444c divided Orm::Utils
While ORM can be disabled, Orm::Utils has been split into Orm::Utils
and Orm::Tiny::Utils (Orm::Tiny::TinyUtils alias).
So when ORM is disabled then utils used only in the ORM will be
excluded from a final build.

 - bugfix cmake undefined ORM option in TinySources
2022-01-01 14:28:42 +01:00
silverqx 869362bc7a added DISABLE_THREAD_LOCAL macro
Overrides default detection logic for thread_local and disable it
forcefully.
In qmake can be configured by "CONFIG+=disable_thread_local".
For Cmake DISABLE_THREAD_LOCAL option was added.
2021-12-30 17:12:29 +01:00
silverqx eec136d9ce cmake reverted commented .rc file
It is needed, it was mistake.
2021-12-08 12:27:37 +01:00
silverqx 9aee6d4bed fixed clang-tidy diagnostics 2021-12-08 12:27:35 +01:00
silverqx 09592a7732 added GitHub Actions Linux, MSYS2 UCRT64, MSVC
- initial g++/clang build, ctest on MSYS2 UCRT64 on Windows Server 2022
 - initial cmake build/ctest on Ubuntu 20.40
 - initial cmake build/ctest on MSVC on Windows Server 2019

changed driver to QPSQL in tst_databasemanager

This avoids crash when QMYSQL driver's dll is unavailable.
QMYSQL driver is not shipped by default by Qt Windows MSVC installer.
2021-12-08 12:27:25 +01:00
silverqx 3c3609a5b5 bugfix cmake removed LINKER: prefix 2021-11-12 18:11:40 +01:00
silverqx a894bb2ed2 added Wuninitialized 2021-10-21 17:46:35 +02:00
silverqx 491cdb0dc7 cmake added LINKER: prefix 2021-10-21 14:15:16 +02:00
silverqx ebaee23818 removed QT_NO_DEBUG_OUTPUT from common library
- also rename TinyQtCommon to TinyCommon
2021-10-21 14:04:26 +02:00
silverqx cc245f5468 sync cmake 2021-10-19 10:08:37 +02:00
silverqx 477934fa53 cmake TINY_UNPARSED_ARGUMENTS checks
- added TINY_UNPARSED_ARGUMENTS checks for all cmake_parse_arguments()
 - bugfix bad PARSE_ARGV index for cmake_parse_arguments()
 - added unset() to macros
2021-10-19 09:39:24 +02:00
silverqx 03bbe98d67 cmake package config enhancements 2021-10-18 08:26:24 +02:00
silverqx b71aaaa0be cmake added gcc/clang toolchain requirements
Show recommendation message for gcc/clang versions.
2021-10-13 16:31:21 +02:00
silverqx f50190bfb1 cmake added Windows RC and manifest file for tests 2021-10-10 10:34:29 +02:00
silverqx ca8e9f2e27 qmake/cmake Werror/Wfatal-errors
I'm going to try these compile options, how it feels 😀.
2021-10-09 19:50:27 +02:00
silverqx 6c3c0bf940 added todo task 2021-10-09 13:46:50 +02:00
silverqx 8b78deb46e qmake/cmake inline/extern constants edge cases
Enhanced qmake/cmake builds during testing of all Win32 build types.

 - throw fatal error for unsupported build types
 - cmake do not show INLINE_CONSTANTS option for MinGW clang shared
   build because it causes crashes
2021-10-08 21:03:33 +02:00
silverqx 32d17c3e08 cmake static build support
For the static build is always used inline constants.
For the shared build is used extern constants by default and this
default can be overridden by a new cmake option INLINE_CONSTANTS.

 - renamed project folder tests/utils to tests/TinyUtils
 - bugfix missed INTERFACE TINYUTILS_LINKING_SHARED in TinyUtils target
 - renamed export macro defines for TinyUtils from UTILS_ to TINYUTILS_
 - renamed utils_global.hpp to export.hpp in TinyUtils
 - added WINVER macro
 - updated NTDDI_WINNT and similar macros
 - removed TINYORM_LINKING_SHARED from TinyTestCommon.cmake, it is in
   the INTERFACE from TinyOrm target
2021-10-08 15:09:01 +02:00
silverqx fd53d31870 cmake sync Windows RC and manifest files
Synchronize changes made to the Windows RC and manifest files related
code for qmake.

Also removed TinyOrm_mingw.rc file, RC file for MinGW is injected
through the main TinyOrm.rc.in file, I had to do it this way because is
not possible to pass more RC files by qmake's RC_FILE variable, cmake
can do this without problems.
2021-10-02 16:37:57 +02:00
silverqx fd38c383ee cmake obtain version info from version.hpp file
Discarded configuration of the version header file by version.hpp.in,
instead the project version is obtained from version.hpp file.

 - bugfix removed unused parameters in tiny_resource_and_manifest()
 - cmake appended version to TinyUtils
 - bugfix debug file flag in Windows RC files
 - added Windows RC and manifest files for TinyUtils library
 - build checkFileVersion_*() tests only on MSVC and when shared library
   build is on
2021-09-29 20:13:26 +02:00
silverqx 0e7b87bde8 cmake obtain version info from version.hpp file
Discarded configuration of the version header file by version.hpp.in,
instead the project version is obtained from version.hpp file.

 - unified function return values, used out_ variables
 - unified cmake_parse_arguments() calls, used PARSE_ARGV everywhere
2021-09-28 17:07:23 +02:00
silverqx ed50815c6f cmake enhanced generation of Windows RC file
Removed TINY_ORIGINAL_FILENAME from version.hpp.in, instead used
configure_file() by help with file(GENERATE ...) and $<TARGET_FILE_NAME>
to obtain original filename and process TinyOrm.rc.in file.

 - changed prefix for all macros to TINYORM_ in the version.hpp header
   file to minimize conflicts
 - removed tiny_init_target_version_ext(), so version number will be
   appended on WIN32 for shared libraries and also for static archives
 - used CMAKE_SYSTEM_NAME instead of WIN32
2021-09-25 18:15:54 +02:00
silverqx 6d5e6c6a9d bugfix OriginalFilename multi-config generators
Added support for OriginalFilename in Windows RC file for multi-config
generators.

 - changed InternalName in Windows RC file to TinyOrm (from tinyorm)
 - added TINY_VERSION_NUM to the version.hpp file
2021-09-24 15:07:59 +02:00
silverqx 49947a3ad6 cmake simplified genexps 2021-09-23 17:31:11 +02:00
silverqx d053195310 added support for MinGW Clang for cmake
- also some enhancements for MinGW GCC
2021-09-22 10:25:24 +02:00
silverqx ed40e8cfe4 enabled Weffc++ 🚀🔥🙌 2021-09-21 08:00:44 +02:00
silverqx 894a1d7c3a added manifest file for cmake mingw 2021-09-18 08:59:06 +02:00
silverqx cbee1e122f removed todo task 2021-09-17 14:26:40 +02:00
silverqx 32f5cf0ec3 added/removed todo tasks 2021-09-14 21:25:31 +02:00
silverqx 6949c67aa2 cmake resolved permissive todo task 2021-09-14 17:18:22 +02:00
silverqx a52e922a81 enhanced cmake build, many changes
Primary change is to correctly match build types for the build tree
and to correctly map build types when package registry contains more
builds.
Also for install tree, link only debug builds against for MSVC, to
avoid MSVC crashes.
These changes was made up in the package version config files.
Build types are requirements like a package version is.
Code responsible for this is in the TinyPackageConfigHelpers.cmake
module that is also installed with package for a install tree, or copied
to the build tree for a build tree.

 - provided meaningful defaults for CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>
 - set up meaningful defaults also for TinyOrm:TinyOrm target in the
   package config file for MAP_IMPORTED_CONFIG_<CONFIG>
 - added many new debug message in package config and config version
   files
 - added nice status message in the package config file about found
   TinyOrm package, example of the output:
   Found package TinyOrm 0.1.0.0 Release (requested 0.1.0) at
   /xyz/XyzConfig.cmake
 - all generated content in the build tree is written to the
   TINY_BUILD_GENDIR (generated version header and cmake config/version
   files)
 - added new MATCH_EQUAL_EXPORTED_BUILDTREE option - Exported package
   configuration from the build tree is considered to match only when
   the build type is equal
 - added CMake Guidelines to the NOTES.txt
 - updated tiny_file_version_and_manifest() function, it takes 2 paths
   now, _in and _out
 - added new global variable TINY_IS_MULTI_CONFIG
 - added p, pn, ps functions to CsDebug module
2021-09-12 20:11:00 +02:00
silverqx 0d7bbf51e7 enhanced cmake build
- made TINYORM_MYSQL_PING private
 - added CMAKE_MODULE_PATH to the package config if MYSQL_PING enabled
 - changed paths to build folders, separate folders for cmake/qmake
 - refactored target_optional_compile_definitions()
 - bugfix tiny_init_cmake_variables()
 - moved TinyOrmTargets.cmake for build tree to the parent folder
 - disabled 4702 warning for msvc
 - whitespaces in cmake files if ( vs if(
2021-09-07 09:50:25 +02:00
silverqx b875d7ff23 enhanced cmake build
- added new package properties for summary
 - move uncommon files from CommonModules to project modules, they are
   FinMySQL and GeneratePkgConfig
2021-09-06 08:26:32 +02:00
silverqx 6837d37095 todo task and comment 2021-09-05 18:48:38 +02:00
silverqx 8abc955261 enabled W4 warning level on msvc
Used /external:anglebrackets for external/system header files
2021-09-04 14:55:05 +02:00
silverqx 11192a4514 treat all compiler warnings as errors for msvc
Enabled /WX for compiler and also for linker
2021-09-03 17:16:42 +02:00
silverqx bad2ebe8e8 removed todo task and updated comment 2021-09-03 15:26:18 +02:00
silverqx 9c6fbce800 added new gcc warnings for cmake build
Following new warnings was added:
 -Wshadow
 -Wundef
 -Wfloat-equal
 -Wformat-security
 -Wdouble-promotion
 -Wconversion
 -Wzero-as-null-pointer-constant

Fixed warnings from:
 -Wshadow
 -Wconversion
2021-09-03 15:22:52 +02:00
silverqx 87341bc716 enhanced cmake build
- enabled -Wnon-virtual-dtor warning
 - bugfix missing virtual dtor
 - enabled /EHsc compiler flag for msvc
2021-09-02 18:53:48 +02:00
silverqx 1b8e2d92c7 bugfix export symbols on linux 😅
I had set visibility to default and that is visible by default on gcc.
2021-09-01 20:53:23 +02:00
silverqx 52a9e56bbf added cmake build 😅💪 2021-08-31 09:02:14 +02:00