|
01096907
|
2021-04-29T09:44:52
|
|
Merge pull request #99 from xantares/wine
cmake: use CROSSCOMPILING_EMULATOR
|
|
cf64370e
|
2021-02-27T11:00:21
|
|
CMake: Bumpr version
Silents warnings, cmake 3.2 is available in distros since many years
|
|
a1308877
|
2021-03-15T11:26:44
|
|
cmake: use CROSSCOMPILING_EMULATOR
|
|
ebd7badd
|
2021-01-17T12:51:08
|
|
cmake: add support to build test-dladdr on unix like os
This is used to obtain test result references.
|
|
49c3a337
|
2020-11-03T14:43:41
|
|
cmake: Keep warning in sync with Makefile based build system
|
|
90302fc5
|
2020-11-03T10:05:33
|
|
Add cmake building support to Travis CI
To make it easier to extend the CI support and to be able to execute
the contained tests locally, a dedicated shell script tools/ci_build.sh
was added to execute the tests.
|
|
2821345e
|
2020-11-02T13:06:55
|
|
cmake: add option ENABLE_WINE to enable support for running cross compiled tests with wine
For details about the ENABLE_WINE option, which support three modes
AUTO|ON|OFF see the documentation of cmake macro check_auto_option().
A custom path for the wine executable can be specified by adding
-DWINE_EXECUTABLE=<path> to the cmake command line.
The cmake related macros were copied from
https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/cmake/modules/Macros.cmake
|
|
3292a137
|
2020-11-02T12:50:41
|
|
cmake: Let make target 'test' be accessable from topmost build directory
The cmake command enable_testing() must be placed in the topmost
CMakeLists.txt so that the make target 'test' is available in the
topmost build directory.
|
|
11c80b8e
|
2020-11-02T12:37:36
|
|
cmake: place all generated binaries into one place
This is required for running test applications, because by default cmake
places binaries into the associated subdir.
|
|
f0ac8495
|
2020-08-25T23:34:19
|
|
Move cmake targets into sub directories
|
|
5ead6f2d
|
2020-08-25T23:31:13
|
|
Update minimum required cmake version to 2.8.11 to simplify code
According to https://cmake.org/pipermail/cmake/2013-May/054792.html
cmake 2.8.11 was released in 2013, so we can assume that no older version
will be used anymore.
|
|
f3da31d7
|
2019-05-06T21:47:33
|
|
Load Psapi.dll at runtime, this avoids linking caveat
|
|
63d7bda4
|
2019-01-29T22:57:04
|
|
Implement support for dlsym() with RTLD_DEFAULT and RTLD_NEXT
dlsym() with RTLD_DEFAULT handle behaves in same way like with global handle
returned by dlopen() with NULL file name.
dlsym() with RTLD_NEXT handle search for next loaded module which provides
specified symbol. "Next" means module which in EnumProcessModules() result
after the module which called dlsym().
To get caller function of dlsym() use _ReturnAddress() intrinsic. To get
module where is caller function use the fact that HMODULE is the same value
as the module's base address.
When compiling under gcc, defines _ReturnAddress() macro via gcc's builtin
as it does not provide MSC's specific _ReturnAddress() intrinsic.
Added tests demonstrate that both RTLD_DEFAULT and RTLD_NEXT are working as
expected.
|
|
29c46a54
|
2019-01-29T22:38:42
|
|
Fix resolving global symbols when LoadLibrary() is called after dlopen()
Usage of first_automatic_object cache is wrong. This cache is filled by all
loaded DLL files (either implicitly or explicitly with LoadLibrary() call)
by EnumProcessModules() call at first usage of dlopen(). So dlsym() can
resolve global symbols only if they were loaded prior to dlopen() call. Any
future usage of LoadLibrary() does not include newly loaded DLLs into
first_automatic_object cache.
To fix this problem, first_automatic_object cache is fully removed and
EnumProcessModules() call is issued directly in dlsym() call.
As EnumProcessModules() returns all DLLs, included those which were loaded
by dlopen() with RTLD_LOCAL, it may break RTLD_LOCAL support. To address
this problem switch linked-list of all loaded DLLs with RTLD_GLOBAL to
linked-list of all loaded DLLs with RTLD_LOCAL flag. And then skip modules
from EnumProcessModules() which are in linked-list.
Also in WinAPI all DLLs loaded by LoadLibrary() behaves like RTLD_GLOBAL.
So above change is compatible with this behavior.
There may be another problem. Before retrieving HMODULE for DLL filename
(which is done by LoadLibrary()), it is not possible to detect if DLL was
already loaded by RTLD_LOCAL or not. And after calling LoadLibrary() it is
not possible to know if DLL was loaded either by dlsym() with RTLD_LOCAL or
by LoadLibrary() (which is equivalent to RTLD_GLOBAL). To address this
problem, compare number of loaded modules (counted by EnumProcessModules())
before and after LoadLibrary() called from dlsym(). If number does not
change it means that DLL was already loaded. So based on this result either
add or remove HMODULE from linked-list of RTLD_LOCAL modules.
Added test demonstrate usage of:
global = dlopen(NULL, RTLD_GLOBAL); /* global handle */
LoadLibrary("library.dll"); /* this provides function */
function = dlsym(global, "function"); /* resolve function from library.dll */
|
|
bd4eebdb
|
2016-12-27T12:13:39
|
|
Add CMake code to export a CMake config file
|
|
604fd008
|
2016-03-23T09:43:39
|
|
Removed wine detection
It can be set canonically by using CMAKE_CROSSCOMPILIING_EMULATOR variable
|
|
dd4254a3
|
2014-10-08T15:50:21
|
|
Add linked modules to a separate global list
Fixes #2.
|
|
5ea707ad
|
2015-03-15T16:35:22
|
|
Define SHARED when building shared library
|
|
473386e3
|
2015-03-12T06:37:29
|
|
set CMAKE_BUILD_TYPE default
it's used to set release flags
|
|
484b7dc8
|
2014-09-23T13:44:10
|
|
Initial cmake port
|