Skip to content

Commit a3d87ef

Browse files
author
Nat!
committed
tweaked README, upgraded sde, fixed a workflow (?)
1 parent 07c5e83 commit a3d87ef

File tree

8 files changed

+78
-51
lines changed

8 files changed

+78
-51
lines changed

.github/workflows/cmake-errors.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ jobs:
8686
- name: Configure, build and install mulle-core with CMake
8787
working-directory: /tmp/mulle-core
8888
run: |
89+
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
8990
cmake -B build \
90-
-DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }}; \
91+
-DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \
9192
-DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \
9293
-DCMAKE_BUILD_TYPE=Release
9394
cmake --build build --config Release
@@ -101,8 +102,8 @@ jobs:
101102
- name: Configure, build and install mulle-atinit with CMake
102103
working-directory: /tmp/mulle-atinit
103104
run: |
105+
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
104106
cmake -B build \
105-
-DMULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}; \
106107
-DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \
107108
-DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \
108109
-DCMAKE_BUILD_TYPE=Release
@@ -117,8 +118,8 @@ jobs:
117118
- name: Configure, build and install mulle-atexit with CMake
118119
working-directory: /tmp/mulle-atexit
119120
run: |
121+
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
120122
cmake -B build \
121-
-DMULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}; \
122123
-DCMAKE_INSTALL_PREFIX=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \
123124
-DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }} \
124125
-DCMAKE_BUILD_TYPE=Release
@@ -136,8 +137,8 @@ jobs:
136137
137138
- name: Generate project files
138139
run: |
140+
export MULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
139141
cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} \
140-
-DMULLE_SDK_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}; \
141142
-DCMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} \
142143
-DCMAKE_PREFIX_PATH=${{ steps.set-install-dir.outputs.INSTALL_DIR }}
143144
env:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required( VERSION 3.14)
1+
cmake_minimum_required( VERSION 3.13...99.99)
22

33
project( mulle-objc-runtime VERSION 0.26.0 LANGUAGES C)
44

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,30 +190,45 @@ target_link_libraries( ${PROJECT_NAME} PUBLIC mulle-core)
190190

191191
## Install
192192

193-
### Install with mulle-sde
194-
195193
Use [mulle-sde](//github.com/mulle-sde) to build and install mulle-objc-runtime and all dependencies:
196194

197195
``` sh
198196
mulle-sde install --prefix /usr/local \
199197
https://github.com/mulle-objc/mulle-objc-runtime/archive/latest.tar.gz
200198
```
201199

202-
### Manual Installation
200+
### Legacy Installation
201+
202+
203+
#### Requirements
204+
205+
Install all requirements
206+
207+
| Requirements | Description
208+
|----------------------------------------------|-----------------------
209+
| [mulle-core](https://github.com/mulle-core/mulle-core) | 🌋 Almagamated library of mulle-core and mulle-c
210+
| [mulle-atinit](https://github.com/mulle-core/mulle-atinit) | 🤱🏼 Compatibility library for deterministic initializers
211+
| [mulle-atexit](https://github.com/mulle-core/mulle-atexit) | 👼 Compatibility library to fix atexit
203212

204-
Install the [Requirements](#Requirements) and then
205-
install **mulle-objc-runtime** with [cmake](https://cmake.org):
213+
#### Download & Install
214+
215+
216+
Download the latest [tar](https://github.com/mulle-objc/mulle-objc-runtime/archive/refs/tags/latest.tar.gz) or [zip](https://github.com/mulle-objc/mulle-objc-runtime/archive/refs/tags/latest.zip) archive and unpack it.
217+
218+
Install **mulle-objc-runtime** into `/usr/local` with [cmake](https://cmake.org):
206219

207220
``` sh
221+
export MULLE_SDK_PATH="/usr/local" # important!
208222
cmake -B build \
209-
-DCMAKE_INSTALL_PREFIX=/usr/local \
210-
-DCMAKE_PREFIX_PATH=/usr/local \
223+
-DCMAKE_INSTALL_PREFIX="${MULLE_SDK_PATH}" \
224+
-DCMAKE_PREFIX_PATH="${MULLE_SDK_PATH}" \
211225
-DCMAKE_BUILD_TYPE=Release &&
212226
cmake --build build --config Release &&
213227
cmake --install build --config Release
214228
```
215229

216230

231+
217232
## Author
218233

219234
[Nat!](https://mulle-kybernetik.com/weblog) for Mulle kybernetiK

cmake/share/CMakeTweaksC.cmake

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmake/share/Environment.cmake

Lines changed: 37 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mulle-objc-cache.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include <string.h>
4141

4242

43+
// no good for the various leak checkers
44+
#ifdef MULLE_TEST
45+
//# define MULLE_TEST_STATIC_CACHE_DISCARDS
46+
#endif
4347
#pragma mark - cache
4448

4549

@@ -73,7 +77,8 @@ struct _mulle_objc_cache *mulle_objc_cache_new( mulle_objc_cache_uint_t size,
7377
}
7478

7579

76-
#ifdef MULLE_TEST
80+
#ifdef MULLE_TEST_STATIC_CACHE_DISCARDS
81+
7782
struct _mulle_objc_cache *mulle_objc_discarded_caches[ 0x8000];
7883
mulle_atomic_pointer_t n_mulle_objc_discarded_caches;
7984

@@ -82,7 +87,7 @@ static void discard_cache( struct _mulle_objc_cache *cache)
8287
intptr_t n;
8388

8489
n = (intptr_t) _mulle_atomic_pointer_increment( &n_mulle_objc_discarded_caches);
85-
if( n >= sizeof( mulle_objc_discarded_caches) / sizeof( void *))
90+
if( ! n || n >= sizeof( mulle_objc_discarded_caches) / sizeof( void *))
8691
abort();
8792
mulle_objc_discarded_caches[ n - 1] = cache;
8893
}
@@ -97,7 +102,7 @@ void _mulle_objc_cache_free( struct _mulle_objc_cache *cache,
97102
assert( allocator);
98103

99104
preserve = errno;
100-
#ifdef MULLE_TEST
105+
#ifdef MULLE_TEST_STATIC_CACHE_DISCARDS
101106
discard_cache( cache);
102107
#else
103108
_mulle_allocator_free( allocator, cache);
@@ -114,7 +119,7 @@ void _mulle_objc_cache_abafree( struct _mulle_objc_cache *cache,
114119
assert( allocator);
115120

116121
preserve = errno;
117-
#ifdef MULLE_TEST
122+
#ifdef MULLE_TEST_STATIC_CACHE_DISCARDS
118123
discard_cache( cache);
119124
#else
120125
_mulle_allocator_abafree( allocator, cache);

test-compiler/metaabi/unwanted-promotion/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required( VERSION 3.14)
1+
cmake_minimum_required( VERSION 3.13...99.99)
22

33
set(CMAKE_C_COMPILER_WORKS 1)
44

test-startup/methods/inheritance/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required( VERSION 3.14)
1+
cmake_minimum_required( VERSION 3.13...99.99)
22

33
project( inheritance C)
44

0 commit comments

Comments
 (0)