Browse code

moved to singular directory names

Nat! authored on 25-03-2018 18:02:43
Showing 58 changed files
... ...
@@ -1,4 +1,5 @@
1 1
 .DS_Store
2
+._.DS_Store
2 3
 *~.*
3 4
 *[Bb]uild/
4 5
 .idea/
... ...
@@ -9,21 +10,21 @@
9 10
 old/
10 11
 tmp/
11 12
 
12
-/tests/include/
13
-/tests/lib/
14
-/tests/pointerarray/pointerarray
15
-/tests/pointerarray/simple
16
-/tests/hashmap/hashmap
17
-/tests/hashmap/othersimple
18
-tests/array/example
19
-tests/array/pointerarray
20
-tests/array/simple
21
-tests/hashmap/example
22
-tests/array/example.debug
23
-tests/hashmap/example.debug
24
-tests/hashmap/hashmap.debug
25
-tests/array/empty
26
-tests/array/empty.debugbin/tap-info.sh
13
+/test/include/
14
+/test/lib/
15
+/test/pointerarray/pointerarray
16
+/test/pointerarray/simple
17
+/test/hashmap/hashmap
18
+/test/hashmap/othersimple
19
+test/array/example
20
+test/array/pointerarray
21
+test/array/simple
22
+test/hashmap/example
23
+test/array/example.debug
24
+test/hashmap/example.debug
25
+test/hashmap/hashmap.debug
26
+test/array/empty
27
+test/array/empty.debugbin/tap-info.sh
27 28
 
28 29
 # ### > generated by mulle-sde (extensions/mulle-sde/sde/init)
29 30
 
... ...
@@ -47,12 +48,12 @@ tests/array/empty.debugbin/tap-info.sh
47 48
 .mulle-sourcetree-fix
48 49
 
49 50
 # stashes are generally boring
50
-stashes/
51
+stash/
51 52
 
52 53
 # build stuff is boring too
53 54
 build/
54
-dependencies/
55
-addictions/
55
+dependency/
56
+addiction/
56 57
 *.tmp/
57 58
 tmp.*/
58 59
 
... ...
@@ -3,9 +3,9 @@ otool
3 3
 install_name_tool
4 4
 xcrun
5 5
 xcodebuild
6
-cc
7
-gcc
8
-ld
9 6
 inotifywait
10 7
 ssh
11 8
 ninja
9
+cc
10
+gcc
11
+ld
... ...
@@ -5,30 +5,36 @@ export MULLE_SDE_UPDATE_CALLBACKS="source,sourcetree"
5 5
 #
6 6
 #
7 7
 #
8
-export MULLE_SDE_INSTALLED_VERSION="0.14.2"
8
+export MULLE_SDE_INSTALLED_VERSION="0.15.5"
9 9
 
10 10
 
11 11
 #
12 12
 #
13 13
 #
14
-export MULLE_SDE_INSTALLED_EXTENSIONS="--meta 'mulle-c/c-cmake'"
14
+export PROJECT_NAME="mulle-concurrent"
15 15
 
16 16
 
17 17
 #
18 18
 #
19 19
 #
20
-export PROJECT_NAME="mulle-concurrent"
20
+export PROJECT_LANGUAGE="c"
21 21
 
22 22
 
23 23
 #
24 24
 #
25 25
 #
26
-export PROJECT_LANGUAGE="c"
26
+export PROJECT_TYPE="library"
27 27
 
28 28
 
29 29
 #
30 30
 #
31 31
 #
32
-export PROJECT_TYPE="library"
32
+export PROJECT_DIALECT="c"
33
+
34
+
35
+#
36
+#
37
+#
38
+export DIALECT_EXTENSION="c"
33 39
 
34 40
 
... ...
@@ -2,12 +2,12 @@
2 2
 # Git mirror and Zip/TGZ cache to conserve bandwidth
3 3
 # Memo: override in os-specific env file
4 4
 #
5
-export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/.cache/mulle-fetch/git-mirrors"
5
+export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/.cache/mulle-fetch/git-mirror"
6 6
 
7 7
 #
8 8
 # Git mirror and Zip/TGZ cache to conserve bandwidth
9 9
 #
10
-export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archives"
10
+export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archive"
11 11
 
12 12
 #
13 13
 # PATH to search for git repositories locally
... ...
@@ -15,14 +15,14 @@ export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archives"
15 15
 export MULLE_FETCH_SEARCH_PATH="${MULLE_VIRTUAL_ROOT}/.."
16 16
 
17 17
 #
18
-# Prefer symlinks to local git repositories found via MULLE_FETCH_SEARCH_PATH
18
+# Prefer symlinking to local git repositories found via MULLE_FETCH_SEARCH_PATH
19 19
 #
20 20
 export MULLE_SYMLINK="YES"
21 21
 
22 22
 #
23 23
 # Use common folder for sharable projects
24 24
 #
25
-export MULLE_SOURCETREE_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/stashes"
25
+export MULLE_SOURCETREE_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/stash"
26 26
 
27 27
 #
28 28
 # Use common build directory
... ...
@@ -30,11 +30,11 @@ export MULLE_SOURCETREE_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/stashes"
30 30
 export BUILD_DIR="${MULLE_VIRTUAL_ROOT}/build"
31 31
 
32 32
 #
33
-# Share dependencies directory (absolute for ease of use)
33
+# Share dependency directory (absolute for ease of use)
34 34
 #
35
-export DEPENDENCIES_DIR="${MULLE_VIRTUAL_ROOT}/dependencies"
35
+export DEPENDENCY_DIR="${MULLE_VIRTUAL_ROOT}/dependency"
36 36
 
37 37
 #
38
-# Share addictions directory (absolute for ease of use)
38
+# Share addiction directory (absolute for ease of use)
39 39
 #
40
-export ADDICTIONS_DIR="${MULLE_VIRTUAL_ROOT}/addictions"
40
+export ADDICTION_DIR="${MULLE_VIRTUAL_ROOT}/addiction"
... ...
@@ -1,5 +1,5 @@
1 1
 #
2 2
 # Git mirror and Zip/TGZ cache to conserve bandwidth
3 3
 #
4
-export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/git-mirrors"
5
-export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/archives"
4
+export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/git-mirror"
5
+export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/archive"
... ...
@@ -22,34 +22,42 @@ then
22 22
 your convenience" >&2
23 23
 fi
24 24
 
25
+alias mulle-env-reload='. "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/environment-include.sh"'
25 26
 
26
-#
27
-# Set PS1 so that we can see, that we are in a mulle-env
28
-#
29
-envname="`PATH=/bin:/usr/bin basename -- "${MULLE_VIRTUAL_ROOT}"`"
30 27
 
31
-case "${PS1}" in
32
-   *\\h\[*)
33
-   ;;
28
+if [ "${MULLE_SHELL_MODE}" = "INTERACTIVE" ]
29
+then
30
+   #
31
+   # Set PS1 so that we can see, that we are in a mulle-env
32
+   #
33
+   envname="`PATH=/bin:/usr/bin basename -- "${MULLE_VIRTUAL_ROOT}"`"
34 34
 
35
-   *\\h*)
36
-      PS1="$(sed 's/\\h/\\h\['${envname}'\]/' <<< '${PS1}' )"
37
-   ;;
35
+   case "${PS1}" in
36
+      *\\h\[*)
37
+      ;;
38 38
 
39
-   *)
40
-      PS1='\u@\h['${envname}'] \W$ '
41
-   ;;
42
-esac
43
-export PS1
39
+      *\\h*)
40
+         PS1="$(sed 's/\\h/\\h\['${envname}'\]/' <<< '${PS1}' )"
41
+      ;;
44 42
 
45
-unset envname
43
+      *)
44
+         PS1='\u@\h['${envname}'] \W$ '
45
+      ;;
46
+   esac
47
+   export PS1
46 48
 
47
-alias mulle-env-reload='. "${MULLE_VIRTUAL_ROOT}/.mulle-env/share/environment-include.sh"'
49
+   unset envname
48 50
 
49
-mulle-env-reload
51
+   # install cd catcher
52
+   . "${MULLE_ENV_LIBEXEC_DIR}/mulle-env-cd.sh"
53
+   unset MULLE_ENV_LIBEXEC_DIR
50 54
 
51
-# install cd catcher
52
-. "`mulle-env libexec-dir`/mulle-env-cd.sh"
55
+   mulle-env-reload
56
+else
57
+   set -a ; mulle-env-reload     # export all definitions for command
58
+   ${COMMAND}
59
+   exit $?
60
+fi
53 61
 
54 62
 
55 63
 #
56 64
similarity index 98%
57 65
rename from .mulle-env/share/libexec/load-bash-completion.sh
58 66
rename to .mulle-env/share/libexec/mulle-sde-bash-completion.sh
... ...
@@ -1,4 +1,3 @@
1
-\
2 1
 #! /usr/bin/env bash
3 2
 
4 3
 #
... ...
@@ -9,4 +8,3 @@ if [ "`type -t "_mulle_sde_complete"`" != "function" ]
9 8
 then
10 9
    . "$(mulle-sde libexec-dir)/mulle-sde-bash-completion.sh"
11 10
 fi
12
-
... ...
@@ -1 +1 @@
1
-0.11.4
1
+0.11.9
... ...
@@ -37,10 +37,9 @@ usage()
37 37
 {
38 38
    cat <<EOF >&2
39 39
 Usage:
40
-   mulle-c-sourcetree-update <action> <filename> <category>
40
+   c-sourcetree-update <action> <filename> <category>
41 41
 
42
-   Let mulle-monitor run this for you. None of the arguments are actually
43
-   used.
42
+   This produces _dependencies.h
44 43
 
45 44
 EOF
46 45
    exit 1
... ...
@@ -116,13 +115,13 @@ osexclude_to_cpp_if()
116 115
 }
117 116
 
118 117
 
119
-emit_c_include_dependency()
118
+_emit_c_include()
120 119
 {
121
-   log_entry "emit_c_include_dependency" "$@"
120
+   log_entry "_emit_c_include" "$@"
122 121
 
123
-   local name="$1"
122
+   local header="$1"
124 123
    local marks="$2"
125
-   local header="$3"
124
+   local aliases="$3"
126 125
 
127 126
    local indent
128 127
    local ifstatement
... ...
@@ -161,11 +160,6 @@ emit_c_include_dependency()
161 160
       indent=" "
162 161
    fi
163 162
 
164
-   if [ -z "${header}" ]
165
-   then
166
-      header="${name}/${name}.h"
167
-   fi
168
-
169 163
    echo "# ${indent}include <${header}>"
170 164
    if [ ! -z "${ifstatement}" ]
171 165
    then
... ...
@@ -176,21 +170,45 @@ emit_c_include_dependency()
176 170
 }
177 171
 
178 172
 
179
-get_header_include_list()
173
+emit_c_include_library()
180 174
 {
181
-   log_entry "get_header_dependency_list" "$@"
175
+   log_entry "emit_c_include_library" "$@"
182 176
 
183
-   exekutor mulle-sde library list \
184
-                                   --marks header \
185
-                                   --\
186
-                                   --output-raw \
187
-                                   --no-output-header
177
+   local name="$1"
178
+   local marks="$2"
179
+   local aliases="$3"
180
+   local header="$4"
181
+
182
+   #
183
+   # the default for libraries is old style <name.h> not <name/name.h>
184
+   #
185
+   if [ -z "${header}" ]
186
+   then
187
+      header="${name}.h"
188
+   fi
189
+
190
+   _emit_c_include "${header}" "${marks}" "${aliases}"
188 191
 
189
-   exekutor mulle-sde dependency list \
190
-                                   --marks header \
191
-                                   --\
192
-                                   --output-raw \
193
-                                   --no-output-header
192
+}
193
+
194
+emit_c_include_dependency()
195
+{
196
+   log_entry "emit_c_include_dependency" "$@"
197
+
198
+   local name="$1"
199
+   local marks="$2"
200
+   local aliases="$3"
201
+   local header="$4"
202
+
203
+   #
204
+   # the default for dependencies is <name/name.h>
205
+   #
206
+   if [ -z "${header}" ]
207
+   then
208
+      header="${name}/${name}.h"
209
+   fi
210
+
211
+   _emit_c_include "${header}" "${marks}" "${aliases}"
194 212
 }
195 213
 
196 214
 
... ...
@@ -213,27 +231,40 @@ _emit_headers()
213 231
       local marks
214 232
       local include
215 233
 
216
-      IFS=";" read address marks include <<< "${header}"
234
+      IFS=";" read address marks aliases include <<< "${header}"
217 235
 
218 236
       if [ ! -z "${address}" ]
219 237
       then
220 238
          log_verbose "Emit statements for ${C_MAGENTA}${C_BOLD}${address}"
221
-         ${emitter} "${address}" "${marks}" "${include}" "$@"
239
+         ${emitter} "${address}" "${marks}" "${aliases}" "${include}" "$@"
222 240
       fi
223 241
    done
224 242
    IFS="${DEFAULT_IFS}"; set +o noglob
225 243
 }
226 244
 
227 245
 
246
+
228 247
 emit_c_header()
229 248
 {
230 249
    log_entry "emit_c_header" "$@"
231 250
 
232 251
    local headers
233 252
 
234
-   # OBJC is in this
235
-   headers="`get_header_include_list`" || return 1
253
+   headers="`exekutor mulle-sde dependency list \
254
+                                   --marks header \
255
+                                   --\
256
+                                   --output-raw \
257
+                                   --no-output-header`" || return 1
258
+
236 259
    _emit_headers "${headers}" emit_c_include_dependency
260
+
261
+   headers="`exekutor mulle-sde library list \
262
+                                   --marks header \
263
+                                   --\
264
+                                   --output-raw \
265
+                                   --no-output-header`" || return 1
266
+   _emit_headers "${headers}" emit_c_include_library
267
+
237 268
 }
238 269
 
239 270
 
... ...
@@ -242,6 +273,7 @@ main()
242 273
    log_entry "main" "$@"
243 274
 
244 275
    # technical flags
276
+   local MULLE_TRACE
245 277
    local MULLE_FLAG_DONT_DEFER="NO"
246 278
    local MULLE_FLAG_EXEKUTOR_DRY_RUN="NO"
247 279
    local MULLE_FLAG_FOLLOW_SYMLINKS="YES"
... ...
@@ -292,6 +324,26 @@ main()
292 324
 
293 325
    options_setup_trace "${MULLE_TRACE}"
294 326
 
327
+
328
+   local projectname
329
+
330
+   projectname="${MULLE_SDE_PROJECT_NAME}"
331
+   projectname="${projectname:-${PROJECT_NAME}}"
332
+   if [ -z "${projectname}" ]
333
+   then
334
+      projectname="`fast_basename "${PWD}"`" # could be nicer
335
+   fi
336
+
337
+   if [ "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" = "NONE" ]
338
+   then
339
+      return
340
+   fi
341
+
342
+   if [ -z "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" ]
343
+   then
344
+      MULLE_SDE_DEPENDENCIES_HEADER_FILE="src/_${projectname}-dependencies.h"
345
+   fi
346
+
295 347
    local text_h
296 348
    local text_dep
297 349
 
... ...
@@ -302,24 +354,17 @@ main()
302 354
       text_h="/* no headers */"
303 355
    fi
304 356
 
305
-   local projectname
357
+   local projectidentifier
306 358
 
307
-   projectname="${MULLE_SDE_PROJECT_NAME}"
308
-   projectname="${projectname:-${PROJECT_NAME}}"
309
-   if [ -z "${projectname}" ]
310
-   then
311
-      projectname="`fast_basename "${PWD}"`" # could be nicer
312
-   fi
313
-
314
-   projectname="`tr 'A-Z-' 'a-z_' <<< "${projectname}" `"
359
+   projectidentifier="`tr 'A-Z-' 'a-z_' <<< "${projectname}" `"
315 360
 
316 361
    text_h="/*
317 362
    This file will be regenerated by \`mulle-sde update|monitor\`.
318 363
    Edits will be lost.
319 364
 */
320 365
 
321
-#ifndef _${projectname}__dependencies_h__
322
-#define _${projectname}__dependencies_h__
366
+#ifndef _${projectidentifier}__dependencies_h__
367
+#define _${projectidentifier}__dependencies_h__
323 368
 
324 369
 ${text_h}
325 370
 
... ...
@@ -327,8 +372,6 @@ ${text_h}
327 372
 
328 373
    log_fluff "Create header file (${PWD})"
329 374
 
330
-   MULLE_SDE_DEPENDENCIES_HEADER_FILE="${MULLE_SDE_DEPENDENCIES_HEADER_FILE:-src/_dependencies.h}"
331
-
332 375
    log_verbose "Writing ${C_RESET_BOLD}${MULLE_SDE_DEPENDENCIES_HEADER_FILE}"
333 376
    redirect_exekutor "${MULLE_SDE_DEPENDENCIES_HEADER_FILE}" echo "${text_h}"
334 377
 }
... ...
@@ -229,6 +229,7 @@ main()
229 229
    log_entry "main" "$@"
230 230
 
231 231
    # technical flags
232
+   local MULLE_TRACE
232 233
    local MULLE_FLAG_DONT_DEFER="NO"
233 234
    local MULLE_FLAG_EXEKUTOR_DRY_RUN="NO"
234 235
    local MULLE_FLAG_FOLLOW_SYMLINKS="YES"
... ...
@@ -99,7 +99,7 @@ osexclude_to_cmake_if()
99 99
          ;;
100 100
 
101 101
          no-os-*)
102
-            cmakevar="`uname_to_cmake "${osexclude:5}"`"
102
+            cmakevar="`uname_to_cmake "${osexclude:6}"`"
103 103
             excludes="`concat "${excludes}" "${cmakevar}" " AND "`"
104 104
          ;;
105 105
       esac
... ...
@@ -127,48 +127,112 @@ osexclude_to_cmake_if()
127 127
 }
128 128
 
129 129
 
130
-_emit_cmake_dependency()
130
+_emit_cmake_find_library()
131 131
 {
132
-   log_entry "_emit_cmake_dependency" "$@"
132
+   log_entry "_emit_cmake_find_library" "$@"
133
+
134
+   local preference="$1"; shift
133 135
 
134 136
    local aliases="$1"
135 137
    local identifier="$2"
136 138
    local containername="$3"
137
-   local indent="$4"
139
+   local marks="$4"
140
+   local indent="$5"
141
+
142
+   local libraries
143
+   local i
144
+
145
+   for i in ${aliases}
146
+   do
147
+      case "${preference}" in
148
+         "static")
149
+            libraries="`concat "${libraries}" "\\\${CMAKE_STATIC_LIBRARY_PREFIX}${i}\\\${CMAKE_STATIC_LIBRARY_SUFFIX}"`"
150
+         ;;
151
+
152
+         "shared")
153
+            libraries="`concat "${libraries}" "\\\${CMAKE_SHARED_LIBRARY_PREFIX}${i}\\\${CMAKE_SHARED_LIBRARY_SUFFIX}"`"
154
+         ;;
155
+      esac
156
+
157
+      # fallback to whatever linkage
158
+      libraries="`concat "${libraries}" "${i}"`"
159
+   done
160
+
161
+   local failstring
162
+   local failstatus
163
+
164
+   case ",${marks}," in
165
+      *,no-require-link,*)
166
+
167
+         failstatus="STATUS"
168
+         failstring="${identifier}_LIBRARY is missing but it\'s \"no-require-link\""
169
+      ;;
170
+
171
+      *)
172
+         failstatus="FATAL_ERROR"
173
+         failstring="${identifier}_LIBRARY was not found"
174
+      ;;
175
+   esac
138 176
 
139 177
    cat <<EOF
140 178
 ${indent}if( NOT ${identifier}_LIBRARY)
141
-${indent}   find_library( ${identifier}_LIBRARY NAMES ${aliases})
179
+${indent}   find_library( ${identifier}_LIBRARY NAMES ${libraries})
142 180
 ${indent}   message( STATUS "${identifier}_LIBRARY is \${${identifier}_LIBRARY}")
143
-${indent}   set( ${containername}
144
-${indent}      \${${identifier}_LIBRARY}
145
-${indent}      \${${containername}}
146
-${indent}      CACHE INTERNAL "need to cache this"
147
-${indent}   )
181
+${indent}
182
+${indent}   # the order looks ascending, but due to the way this file is read
183
+${indent}   # it ends up being descending, which is what we need
148 184
 ${indent}   if( ${identifier}_LIBRARY)
185
+${indent}      set( ${containername}
186
+${indent}         \${${containername}}
187
+${indent}         \${${identifier}_LIBRARY}
188
+${indent}         CACHE INTERNAL "need to cache this"
189
+${indent}      )
149 190
 ${indent}      # temporarily expand CMAKE_MODULE_PATH
150
-${indent}      get_filename_component( TMP_${identifier}_ROOT "\${${identifier}_LIBRARY}" DIRECTORY)
151
-${indent}      get_filename_component( TMP_${identifier}_ROOT "\${TMP_${identifier}_ROOT}" DIRECTORY)
152
-${indent}      set( MEMO_CMAKE_MODULE_PATH "\${CMAKE_MODULE_PATH}")
153
-${indent}      list( INSERT CMAKE_MODULE_PATH 0 "\${TMP_${identifier}_ROOT}/include/cmake")
154
-${indent}      # use explicit path to avoid "surprises"
155
-${indent}      unset( ${identifier}_DEFINITIONS)
156
-${indent}      include( "\${TMP_${identifier}_ROOT}/include/cmake/DependenciesAndLibraries.cmake" OPTIONAL)
157
-${indent}      set( CMAKE_MODULE_PATH "\${MEMO_CMAKE_MODULE_PATH}")
191
+${indent}      get_filename_component( _TMP_${identifier}_ROOT "\${${identifier}_LIBRARY}" DIRECTORY)
192
+${indent}      get_filename_component( _TMP_${identifier}_ROOT "\${_TMP_${identifier}_ROOT}" DIRECTORY)
158 193
 ${indent}
159
-${indent}      set( INHERITED_DEFINITIONS
160
-${indent}           \${${identifier}_DEFINITIONS}
161
-${indent}           \${INHERITED_DEFINITIONS}
162
-${indent}      )
163
-${indent}  endif()
194
+${indent}      # search for DependenciesAndLibraries.cmake to include
195
+${indent}      foreach( _TMP_${identifier}_NAME in ${aliases})
196
+${indent}         set( _TMP_${identifier}_DIR "\${_TMP_${identifier}_ROOT}/include/\${_TMP_${identifier}_NAME}/cmake")
197
+${indent}         # use explicit path to avoid "surprises"
198
+${indent}         if( EXISTS "\${_TMP_${identifier}_DIR}/DependenciesAndLibraries.cmake")
199
+${indent}            unset( ${identifier}_DEFINITIONS)
200
+${indent}            list( INSERT CMAKE_MODULE_PATH 0 "\${_TMP_${identifier}_DIR}")
201
+${indent}            include( "\${_TMP_${identifier}_DIR}/DependenciesAndLibraries.cmake")
202
+${indent}            list( REMOVE_ITEM CMAKE_MODULE_PATH "\${_TMP_${identifier}_DIR}")
203
+${indent}            set( INHERITED_DEFINITIONS
204
+${indent}               \${INHERITED_DEFINITIONS}
205
+${indent}               \${${identifier}_DEFINITIONS}
206
+${indent}               CACHE INTERNAL "need to cache this"
207
+${indent}            )
208
+${indent}            break()
209
+${indent}         endif()
210
+${indent}      endforeach()
211
+${indent}   else()
212
+${indent}      message( ${failstatus} "${failstring}")
213
+${indent}   endif()
164 214
 ${indent}endif()
165 215
 EOF
166 216
 }
167 217
 
168 218
 
219
+_emit_cmake_library()
220
+{
221
+   log_entry "_emit_cmake_library" "$@"
222
+
223
+   _emit_cmake_find_library "any" "$@"
224
+}
225
+
226
+
227
+_emit_cmake_dependency()
228
+{
229
+   log_entry "_emit_cmake_dependency" "$@"
230
+
231
+   _emit_cmake_find_library "static" "$@"
232
+}
233
+
234
+
169 235
 #
170
-# I suppose header only libraries might want to expose link stuff too ?
171
-# shouldn't hurt
172 236
 #
173 237
 _emit_cmake_header_only()
174 238
 {
... ...
@@ -177,11 +241,36 @@ _emit_cmake_header_only()
177 241
    local aliases="$1"
178 242
    local identifier="$2"
179 243
    local containername="$3"
180
-   local indent="$4"
244
+   local marks="$4"
245
+   local indent="$5"
246
+
247
+   local headers
248
+   local i
181 249
 
250
+   for i in ${aliases}
251
+   do
252
+      headers="`concat "${headers}" "${i}.h"`"
253
+      headers="`concat "${headers}" "${i}/${i}.h"`"
254
+   done
255
+
256
+   case ",${marks}," in
257
+      *,no-require-link,*)
258
+
259
+         failstatus="STATUS"
260
+         failstring="${identifier}_HEADER is missing but it\'s \"no-require-link\""
261
+      ;;
262
+
263
+      *)
264
+         failstatus="FATAL_ERROR"
265
+         failstring="${identifier}_HEADER was not found"
266
+      ;;
267
+   esac
268
+   #
269
+   # the idea here is that cmake should generate the proper -I option
270
+   #
182 271
    cat <<EOF
183 272
 ${indent}if( NOT ${identifier}_HEADER)
184
-${indent}   find_file( ${identifier}_HEADER NAMES ${aliases})
273
+${indent}   find_file( ${identifier}_HEADER NAMES ${headers})
185 274
 ${indent}   message( STATUS "${identifier}_HEADER is \${${identifier}_HEADER}")
186 275
 ${indent}   set( ${containername}
187 276
 ${indent}      \${${identifier}_HEADER}
... ...
@@ -189,20 +278,24 @@ ${indent}      \${${containername}}
189 278
 ${indent}      CACHE INTERNAL "need to cache this"
190 279
 ${indent}   )
191 280
 ${indent}   if( ${identifier}_HEADER)
192
-${indent}      # temporarily expand CMAKE_MODULE_PATH
193
-${indent}      get_filename_component( TMP_${identifier}_ROOT "\${${identifier}_HEADER}" DIRECTORY)
194
-${indent}      set( MEMO_CMAKE_MODULE_PATH "\${CMAKE_MODULE_PATH}")
195
-${indent}      list( INSERT CMAKE_MODULE_PATH 0 "\${TMP_${identifier}_ROOT}/cmake")
281
+${indent}      # search for DependenciesAndLibraries.cmake to include
282
+${indent}      get_filename_component( _TMP_${identifier}_DIR "\${${identifier}_HEADER}" DIRECTORY)
283
+${indent}      set( _TMP_${identifier}_DIR "\${_TMP_${identifier}_DIR}/cmake")
196 284
 ${indent}      # use explicit path to avoid "surprises"
197
-${indent}      unset( ${identifier}_DEFINITIONS)
198
-${indent}      include( "\${TMP_${identifier}_ROOT}/cmake/DependenciesAndLibraries.cmake" OPTIONAL)
199
-${indent}      set( CMAKE_MODULE_PATH "\${MEMO_CMAKE_MODULE_PATH}")
200
-${indent}
201
-${indent}      set( INHERITED_DEFINITIONS
202
-${indent}           \${${identifier}_DEFINITIONS}
203
-${indent}           \${INHERITED_DEFINITIONS}
204
-${indent}      )
205
-${indent}  endif()
285
+${indent}      if( EXISTS "\${_TMP_${identifier}_DIR}/DependenciesAndLibraries.cmake")
286
+${indent}         unset( ${identifier}_DEFINITIONS)
287
+${indent}         list( INSERT CMAKE_MODULE_PATH 0 "\${_TMP_${identifier}_DIR}")
288
+${indent}         include( "\${_TMP_${identifier}_DIR}/DependenciesAndLibraries.cmake")
289
+${indent}         list( REMOVE_ITEM CMAKE_MODULE_PATH "\${_TMP_${identifier}_DIR}")
290
+${indent}         set( INHERITED_DEFINITIONS
291
+${indent}               \${INHERITED_DEFINITIONS}
292
+${indent}               \${${identifier}_DEFINITIONS}
293
+${indent}               CACHE INTERNAL "need to cache this"
294
+${indent}         )
295
+${indent}      endif()
296
+${indent}   else()
297
+${indent}      message( ${failstatus} "${failstring}")
298
+${indent}   endif()
206 299
 ${indent}endif()
207 300
 EOF
208 301
 }
... ...
@@ -248,6 +341,7 @@ emit_cmake_dependency()
248 341
    "${emitter}" "${aliases}" \
249 342
                 "${identifier}" \
250 343
                 "${containername}" \
344
+                "${marks}" \
251 345
                 "${indent}"
252 346
 
253 347
    if [ ! -z "${ifstatement}" ]
... ...
@@ -256,6 +350,7 @@ emit_cmake_dependency()
256 350
    fi
257 351
 
258 352
    echo
353
+   echo
259 354
 }
260 355
 
261 356
 
... ...
@@ -281,7 +376,7 @@ emit_cmake_dependencies()
281 376
 
282 377
       log_debug "read \"${dependency}\""
283 378
 
284
-      IFS=";" read address marks aliases <<< "${dependency}"
379
+      IFS=";" read address marks aliases include <<< "${dependency}"
285 380
 
286 381
       log_debug "address: ${address}"
287 382
       log_debug "marks:   ${marks}"
... ...
@@ -338,7 +433,7 @@ write_libraries_file()
338 433
                                                          --no-output-header`" || return 1
339 434
       log_debug "library: ${library}"
340 435
       text_lib="`emit_cmake_dependencies "${library}" \
341
-                                         "_emit_cmake_dependency" \
436
+                                         "_emit_cmake_library" \
342 437
                                          "OS_SPECIFIC_LIBRARIES"`" || return 1
343 438
 
344 439
       text_lib="`add_line "${text_header}" "${text_lib}"`"
... ...
@@ -353,7 +448,7 @@ write_libraries_file()
353 448
    text_lib="# ${MULLE_SDE_LIBRARIES_FILE} is generated by \`mulle-sde\`. Edits will be lost.
354 449
 #
355 450
 if( MULLE_TRACE_INCLUDE)
356
-   MESSAGE( STATUS \"# Include \\\"\${CMAKE_CURRENT_LIST_FILE}\\\"\" )
451
+   message( STATUS \"# Include \\\"\${CMAKE_CURRENT_LIST_FILE}\\\"\" )
357 452
 endif()
358 453
 
359 454
 ${text_lib}"
... ...
@@ -392,7 +487,7 @@ write_dependencies_file()
392 487
                                             "_emit_cmake_header_only" \
393 488
                                             "HEADER_ONLY_LIBRARIES"`"
394 489
 
395
-      dependency="` exekutor mulle-sde ${MULLE_SDE_FLAGS} dependency list \
490
+      dependency="`exekutor mulle-sde ${MULLE_SDE_FLAGS} dependency list \
396 491
                                                         --marks link \
397 492
                                                         -- \
398 493
                                                         --output-raw \
... ...
@@ -414,7 +509,7 @@ write_dependencies_file()
414 509
    text_dep="# ${MULLE_SDE_DEPENDENCIES_FILE} is generated by \`mulle-sde\`. Edits will be lost.
415 510
 #
416 511
 if( MULLE_TRACE_INCLUDE)
417
-   MESSAGE( STATUS \"# Include \\\"\${CMAKE_CURRENT_LIST_FILE}\\\"\" )
512
+   message( STATUS \"# Include \\\"\${CMAKE_CURRENT_LIST_FILE}\\\"\" )
418 513
 endif()
419 514
 
420 515
 ${text_dep}"
... ...
@@ -433,6 +528,23 @@ main()
433 528
 {
434 529
    log_entry "main" "$@"
435 530
 
531
+   local MULLE_TRACE
532
+   local MULLE_FLAG_DONT_DEFER="NO"
533
+   local MULLE_FLAG_EXEKUTOR_DRY_RUN="NO"
534
+   local MULLE_FLAG_FOLLOW_SYMLINKS="YES"
535
+   local MULLE_FLAG_LOG_CACHE="NO"
536
+   local MULLE_FLAG_LOG_DEBUG="NO"
537
+   local MULLE_FLAG_LOG_EXEKUTOR="NO"
538
+   local MULLE_FLAG_LOG_FLUFF="NO"
539
+   local MULLE_FLAG_LOG_MERGE="NO"
540
+   local MULLE_FLAG_LOG_SCRIPTS="NO"
541
+   local MULLE_FLAG_LOG_SETTINGS="NO"
542
+   local MULLE_FLAG_LOG_VERBOSE="NO"
543
+   local MULLE_TRACE_PATHS_FLIP_X="NO"
544
+   local MULLE_TRACE_POSTPONE="NO"
545
+   local MULLE_TRACE_RESOLVER_FLIP_X="NO"
546
+   local MULLE_TRACE_SETTINGS_FLIP_X="NO"
547
+
436 548
    while [ $# -ne 0 ]
437 549
    do
438 550
       if options_technical_flags "$1"
... ...
@@ -1,7 +1,7 @@
1
-mulle-c/c-cmake;meta
2
-mulle-sde/c-cmake;meta
3
-mulle-sde/c;runtime
1
+mulle-c/c-developer;meta
2
+mulle-c/cmake;buildtool
3
+mulle-sde/c-cmake;buildtool
4 4
 mulle-sde/cmake;buildtool
5 5
 mulle-sde/sde;buildtool
6
-mulle-c/cmake;buildtool
7 6
 mulle-c/c;runtime
7
+mulle-sde/c;runtime
... ...
@@ -1,15 +1,15 @@
1 1
 # Everything is boring
2 2
 */
3 3
 
4
-# Except for src and tests
4
+# Except for src and test
5 5
 !src/
6
-!tests/
6
+!test/
7 7
 
8 8
 # Except for mulle-sourcetree where we like the etc directory...
9 9
 #
10 10
 # If we specifically exclude !.mulle-sourcetree/etc only, that's no good for
11 11
 # mulle-find, which collects top-level directories only. So we specifically
12
-# ignore some known boring subfolders only
12
+# ignore some known-to-be-boring subfolders only
13 13
 #
14 14
 !.mulle-sourcetree/
15 15
 .mulle-sourcetree/var/
... ...
@@ -1 +1 @@
1
-src/_dependencies.h
1
+src/_*dependencies.h
... ...
@@ -1,3 +1,3 @@
1
-tests/**/*.h
2
-tests/**/*.inc
3
-tests/**/*.c
1
+test/**/*.h
2
+test/**/*.inc
3
+test/**/*.c
... ...
@@ -1 +1 @@
1
-0.4.0
1
+0.4.1
2 2
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-0.4.0
... ...
@@ -1 +1 @@
1
-0.4.0
1
+0.4.1
... ...
@@ -1 +1 @@
1
-0.3.4
1
+0.3.6
... ...
@@ -1 +1 @@
1
-0.2.6
1
+0.2.7
... ...
@@ -1 +1 @@
1
-0.4.4
1
+0.4.6
... ...
@@ -1 +1 @@
1
-0.14.2
1
+0.15.2
... ...
@@ -47,7 +47,7 @@ ${CMAKE_EDITABLE_FILES}
47 47
 
48 48
 if( BUILD_SHARED_LIBS)
49 49
    target_link_libraries( mulle-concurrent
50
-${DEPENDENCIES_LIBRARIES}
50
+${DEPENDENCY_LIBRARIES}
51 51
 ${OS_SPECIFIC_LIBRARIES}
52 52
 )
53 53
 endif()
... ...
@@ -64,7 +64,11 @@ mulle-concurrent
64 64
 
65 65
 set( STANDALONE_ALL_LOAD_LIBRARIES
66 66
 $<TARGET_FILE:mulle-concurrent>
67
-${C_DEPENDENCY_LIBRARIES}
67
+${DEPENDENCY_LIBRARIES}
68
+${OPTIONAL_DEPENDENCY_LIBRARIES}
69
+)
70
+
71
+set( STANDALONE_NORMAL_LOAD_LIBRARIES
68 72
 ${OS_SPECIFIC_LIBRARIES}
69 73
 )
70 74
 
... ...
@@ -9,7 +9,7 @@ if( NOT __MULLE_CONCURRENT_DEPENDENCIES_AND_LIBRARIES_CMAKE__)
9 9
    # Put your find_library() statements here to import other libraries
10 10
    #
11 11
    # Add OS specific dependencies to OS_SPECIFIC_LIBRARIES
12
-   # Add all other dependencies (rest) to DEPENDENCIES_LIBRARIES
12
+   # Add all other dependencies (rest) to DEPENDENCY_LIBRARIES
13 13
 
14 14
 
15 15
    #
... ...
@@ -13,7 +13,7 @@ include( _Sources)
13 13
 
14 14
 # add ignored header back in
15 15
 set( PUBLIC_HEADERS
16
-"src/_dependencies.h"
16
+"src/_mulle-concurrent-dependencies.h"
17 17
 ${PUBLIC_HEADERS}
18 18
 )
19 19
 
... ...
@@ -1,31 +1,43 @@
1 1
 # cmake/_Dependencies.cmake is generated by `mulle-sde`. Edits will be lost.
2 2
 #
3 3
 if( MULLE_TRACE_INCLUDE)
4
-   MESSAGE( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
4
+   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
5 5
 endif()
6 6
 
7 7
 if( NOT MULLE_ABA_LIBRARY)
8
-   find_library( MULLE_ABA_LIBRARY NAMES mulle-aba)
8
+   find_library( MULLE_ABA_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}mulle-aba${CMAKE_STATIC_LIBRARY_SUFFIX} mulle-aba)
9 9
    message( STATUS "MULLE_ABA_LIBRARY is ${MULLE_ABA_LIBRARY}")
10
-   set( DEPENDENCY_LIBRARIES
11
-      ${MULLE_ABA_LIBRARY}
12
-      ${DEPENDENCY_LIBRARIES}
13
-      CACHE INTERNAL "need to cache this"
14
-   )
10
+
11
+   # the order looks ascending, but due to the way this file is read
12
+   # it ends up being descending, which is what we need
15 13
    if( MULLE_ABA_LIBRARY)
14
+      set( DEPENDENCY_LIBRARIES
15
+         ${DEPENDENCY_LIBRARIES}
16
+         ${MULLE_ABA_LIBRARY}
17
+         CACHE INTERNAL "need to cache this"
18
+      )
16 19
       # temporarily expand CMAKE_MODULE_PATH
17
-      get_filename_component( TMP_MULLE_ABA_ROOT "${MULLE_ABA_LIBRARY}" DIRECTORY)
18
-      get_filename_component( TMP_MULLE_ABA_ROOT "${TMP_MULLE_ABA_ROOT}" DIRECTORY)
19
-      set( MEMO_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
20
-      list( INSERT CMAKE_MODULE_PATH 0 "${TMP_MULLE_ABA_ROOT}/include/cmake")
21
-      # use explicit path to avoid "surprises"
22
-      unset( MULLE_ABA_DEFINITIONS)
23
-      include( "${TMP_MULLE_ABA_ROOT}/include/cmake/DependenciesAndLibraries.cmake" OPTIONAL)
24
-      set( CMAKE_MODULE_PATH "${MEMO_CMAKE_MODULE_PATH}")
20
+      get_filename_component( _TMP_MULLE_ABA_ROOT "${MULLE_ABA_LIBRARY}" DIRECTORY)
21
+      get_filename_component( _TMP_MULLE_ABA_ROOT "${_TMP_MULLE_ABA_ROOT}" DIRECTORY)
25 22
 
26
-      set( INHERITED_DEFINITIONS
27
-           ${MULLE_ABA_DEFINITIONS}
28
-           ${INHERITED_DEFINITIONS}
29
-      )
30
-  endif()
23
+      # search for DependenciesAndLibraries.cmake to include
24
+      foreach( _TMP_MULLE_ABA_NAME in mulle-aba)
25
+         set( _TMP_MULLE_ABA_DIR "${_TMP_MULLE_ABA_ROOT}/include/${_TMP_MULLE_ABA_NAME}/cmake")
26
+         # use explicit path to avoid "surprises"
27
+         if( EXISTS "${_TMP_MULLE_ABA_DIR}/DependenciesAndLibraries.cmake")
28
+            unset( MULLE_ABA_DEFINITIONS)
29
+            list( INSERT CMAKE_MODULE_PATH 0 "${_TMP_MULLE_ABA_DIR}")
30
+            include( "${_TMP_MULLE_ABA_DIR}/DependenciesAndLibraries.cmake")
31
+            list( REMOVE_ITEM CMAKE_MODULE_PATH "${_TMP_MULLE_ABA_DIR}")
32
+            set( INHERITED_DEFINITIONS
33
+               ${INHERITED_DEFINITIONS}
34
+               ${MULLE_ABA_DEFINITIONS}
35
+               CACHE INTERNAL "need to cache this"
36
+            )
37
+            break()
38
+         endif()
39
+      endforeach()
40
+   else()
41
+      message( FATAL_ERROR "MULLE_ABA_LIBRARY was not found")
42
+   endif()
31 43
 endif()
... ...
@@ -1,7 +1,7 @@
1 1
 # cmake/_Libraries.cmake is generated by `mulle-sde`. Edits will be lost.
2 2
 #
3 3
 if( MULLE_TRACE_INCLUDE)
4
-   MESSAGE( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
4
+   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
5 5
 endif()
6 6
 
7 7
 # there are no libraries in the sourcetree
... ...
@@ -1,46 +1,50 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __CMAKE_TWEAKS__CMAKE__)
2
+   set( __CMAKE_TWEAKS__CMAKE__ ON)
4 3
 
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
5 7
 
6
-cmake_policy( SET CMP0054 NEW)
8
+   cmake_policy( SET CMP0054 NEW)
7 9
 
8
-# makes nicer Xcode projects, I see no detriment
9
-set_property( GLOBAL PROPERTY USE_FOLDERS ON)
10
+   # makes nicer Xcode projects, I see no detriment
11
+   set_property( GLOBAL PROPERTY USE_FOLDERS ON)
10 12
 
11
-if( APPLE)
12
-   cmake_minimum_required (VERSION 3.0)
13
+   if( APPLE)
14
+      cmake_minimum_required (VERSION 3.0)
13 15
 
14
-   # CMAKE_OSX_SYSROOT must be set for CMAKE_OSX_DEPLOYMENT_TARGET (cmake bug)
15
-   if( NOT CMAKE_OSX_SYSROOT)
16
-      set( CMAKE_OSX_SYSROOT "/" CACHE STRING "SDK for OSX" FORCE)   # means current OS X
17
-   endif()
16
+      # CMAKE_OSX_SYSROOT must be set for CMAKE_OSX_DEPLOYMENT_TARGET (cmake bug)
17
+      if( NOT CMAKE_OSX_SYSROOT)
18
+         set( CMAKE_OSX_SYSROOT "/" CACHE STRING "SDK for OSX" FORCE)   # means current OS X
19
+      endif()
18 20
 
19
-   # baseline set to OSX_VERSION for rpath (is this still needed?)
20
-   if( NOT CMAKE_OSX_DEPLOYMENT_TARGET AND NOT $ENV{MACOSX_DEPLOYMENT_TARGET} )
21
-      execute_process( COMMAND sw_vers -productVersion
22
-                       OUTPUT_VARIABLE OSX_VERSION_FULL
23
-                       OUTPUT_STRIP_TRAILING_WHITESPACE)
24
-      string( REGEX REPLACE "\\.[^.]*$" "" OSX_VERSION ${OSX_VERSION_FULL} )
21
+      # baseline set to OSX_VERSION for rpath (is this still needed?)
22
+      if( NOT CMAKE_OSX_DEPLOYMENT_TARGET AND NOT $ENV{MACOSX_DEPLOYMENT_TARGET} )
23
+         execute_process( COMMAND sw_vers -productVersion
24
+                          OUTPUT_VARIABLE OSX_VERSION_FULL
25
+                          OUTPUT_STRIP_TRAILING_WHITESPACE)
26
+         string( REGEX REPLACE "\\.[^.]*$" "" OSX_VERSION ${OSX_VERSION_FULL} )
25 27
 
26
-      set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSX_VERSION}" CACHE STRING "Deployment target for OSX" FORCE)
27
-   endif()
28
+         set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSX_VERSION}" CACHE STRING "Deployment target for OSX" FORCE)
29
+      endif()
28 30
 
29
-   set( CMAKE_POSITION_INDEPENDENT_CODE FALSE)
31
+      set( CMAKE_POSITION_INDEPENDENT_CODE FALSE)
30 32
 
31
-else()
32
-   if( WIN32)
33
-      # may not be enough though...
33
+   else()
34
+      if( WIN32)
35
+         # may not be enough though...
34 36
 
35
-      cmake_minimum_required (VERSION 3.4)
37
+         cmake_minimum_required (VERSION 3.4)
36 38
 
37
-      # set only for libraries ?
38
-      set( CMAKE_POSITION_INDEPENDENT_CODE TRUE)
39
-   else()
40
-      # UNIXy gcc based
41
-      cmake_minimum_required (VERSION 3.0)
39
+         # set only for libraries ?
40
+         set( CMAKE_POSITION_INDEPENDENT_CODE TRUE)
41
+      else()
42
+         # UNIXy gcc based
43
+         cmake_minimum_required (VERSION 3.0)
42 44
 
43
-      # set only for libraries ?
44
-      set( CMAKE_POSITION_INDEPENDENT_CODE TRUE)
45
+         # set only for libraries ?
46
+         set( CMAKE_POSITION_INDEPENDENT_CODE TRUE)
47
+      endif()
45 48
    endif()
49
+
46 50
 endif()
... ...
@@ -1,20 +1,25 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __COMPILER_DETECTION__CMAKE__)
2
+   set( __COMPILER_DETECTION__CMAKE__ ON)
4 3
 
5
-#
6
-if( NOT MULLE_C_COMPILER_ID)
7
-   if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${CMAKE_C_COMPILER_ID}" MATCHES "^(Clang|MulleClang)$") )
8
-      set( MULLE_C_COMPILER_ID "MSVC-${CMAKE_C_COMPILER_ID}")
9
-   else()
10
-      set( MULLE_C_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
11 6
    endif()
12
-endif()
13 7
 
14
-if( NOT MULLE_CXX_COMPILER_ID)
15
-   if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Clang|MulleClang)$") )
16
-      set( MULLE_CXX_COMPILER_ID "MSVC-${CMAKE_CXX_COMPILER_ID}")
17
-   else()
18
-      set( MULLE_CXX_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
8
+   #
9
+   if( NOT MULLE_C_COMPILER_ID)
10
+      if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${CMAKE_C_COMPILER_ID}" MATCHES "^(Clang|MulleClang)$") )
11
+         set( MULLE_C_COMPILER_ID "MSVC-${CMAKE_C_COMPILER_ID}")
12
+      else()
13
+         set( MULLE_C_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
14
+      endif()
19 15
    endif()
16
+
17
+   if( NOT MULLE_CXX_COMPILER_ID)
18
+      if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Clang|MulleClang)$") )
19
+         set( MULLE_CXX_COMPILER_ID "MSVC-${CMAKE_CXX_COMPILER_ID}")
20
+      else()
21
+         set( MULLE_CXX_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
22
+      endif()
23
+   endif()
24
+
20 25
 endif()
... ...
@@ -1,20 +1,25 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __COMPILER_FLAGS__CMAKE__)
2
+   set( __COMPILER_FLAGS__CMAKE__ ON)
4 3
 
5
-if( CMAKE_BUILD_STYLE STREQUAL "Debug")
6
-   if( MULLE_C_COMPILER_ID MATCHES "^(Intel|MSVC|MSVC-Clang|MSVC-MulleClang)$")
7
-      set( OTHER_C_FLAGS "${OTHER_C_FLAGS} /DDEBUG=1")
8
-   else()
9
-      set( OTHER_C_FLAGS "${OTHER_C_FLAGS} -DDEBUG")
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
10 6
    endif()
11
-else()
12
-   if( MULLE_C_COMPILER_ID MATCHES "^(Intel|MSVC|MSVC-Clang|MSVC-MulleClang)$")
13
-      set( OTHER_C_FLAGS "${OTHER_C_FLAGS} /DNDEBUG=1")
7
+
8
+   if( CMAKE_BUILD_STYLE STREQUAL "Debug")
9
+      if( MULLE_C_COMPILER_ID MATCHES "^(Intel|MSVC|MSVC-Clang|MSVC-MulleClang)$")
10
+         set( OTHER_C_FLAGS "${OTHER_C_FLAGS} /DDEBUG=1")
11
+      else()
12
+         set( OTHER_C_FLAGS "${OTHER_C_FLAGS} -DDEBUG")
13
+      endif()
14 14
    else()
15
-      set( OTHER_C_FLAGS "${OTHER_C_FLAGS} -DNDEBUG=1")
15
+      if( MULLE_C_COMPILER_ID MATCHES "^(Intel|MSVC|MSVC-Clang|MSVC-MulleClang)$")
16
+         set( OTHER_C_FLAGS "${OTHER_C_FLAGS} /DNDEBUG=1")
17
+      else()
18
+         set( OTHER_C_FLAGS "${OTHER_C_FLAGS} -DNDEBUG=1")
19
+      endif()
16 20
    endif()
17
-endif()
18 21
 
19
-set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OTHER_C_FLAGS} ${UNWANTED_C_WARNINGS}")
20
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OTHER_C_FLAGS} ${UNWANTED_C_WARNINGS}")
22
+   set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OTHER_C_FLAGS} ${UNWANTED_C_WARNINGS}")
23
+   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OTHER_C_FLAGS} ${UNWANTED_C_WARNINGS}")
24
+
25
+endif()
... ...
@@ -3,22 +3,26 @@ set( MULLE_VIRTUAL_ROOT "$ENV{MULLE_VIRTUAL_ROOT}")
3 3
 if( NOT MULLE_VIRTUAL_ROOT)
4 4
    set( MULLE_VIRTUAL_ROOT "${PROJECT_SOURCE_DIR}")
5 5
 endif()
6
-if( NOT DEPENDENCIES_DIR)
7
-   set( DEPENDENCIES_DIR "${MULLE_VIRTUAL_ROOT}/dependencies")
6
+if( NOT DEPENDENCY_DIR)
7
+   set( DEPENDENCY_DIR "${MULLE_VIRTUAL_ROOT}/dependency")
8 8
 endif()
9
-if( NOT ADDICTIONS_DIR)
10
-   set( ADDICTIONS_DIR "${MULLE_VIRTUAL_ROOT}/addictions")
9
+if( NOT ADDICTION_DIR)
10
+   set( ADDICTION_DIR "${MULLE_VIRTUAL_ROOT}/addiction")
11 11
 endif()
12 12
 include_directories( BEFORE SYSTEM
13
-${DEPENDENCIES_DIR}/include
14
-${ADDICTIONS_DIR}/include
13
+${DEPENDENCY_DIR}/include
14
+${ADDICTION_DIR}/include
15 15
 )
16
-set( CMAKE_LIBRARY_PATH "${DEPENDENCIES_DIR}/lib"
17
-"${ADDICTIONS_DIR}/lib"
16
+set( CMAKE_INCLUDE_PATH "${DEPENDENCY_DIR}/include"
17
+"${ADDICTION_DIR}/include"
18
+${CMAKE_INCLUDE_PATH}
19
+)
20
+set( CMAKE_LIBRARY_PATH "${DEPENDENCY_DIR}/lib"
21
+"${ADDICTION_DIR}/lib"
18 22
 ${CMAKE_LIBRARY_PATH}
19 23
 )
20
-set( CMAKE_FRAMEWORK_PATH "${DEPENDENCIES_DIR}/Frameworks"
21
-"${ADDICTIONS_DIR}/Frameworks"
24
+set( CMAKE_FRAMEWORK_PATH "${DEPENDENCY_DIR}/Frameworks"
25
+"${ADDICTION_DIR}/Frameworks"
22 26
 ${CMAKE_FRAMEWORK_PATH}
23 27
 )
24 28
 
... ...
@@ -1,31 +1,37 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
4
-#
5
-#
6
-#
7
-message( STATUS "CMAKE_MODULE_PATH is ${CMAKE_MODULE_PATH}")
8
-message( STATUS "CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
9
-message( STATUS "CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME}")
10
-
11
-if( APPLE)
12
-   message( STATUS "CMAKE_OSX_SYSROOT is ${CMAKE_OSX_SYSROOT}")
13
-   message( STATUS "CMAKE_OSX_DEPLOYMENT_TARGET is ${CMAKE_OSX_DEPLOYMENT_TARGET}")
14
-   message( STATUS "CMAKE_FRAMEWORK_PATH is ${CMAKE_FRAMEWORK_PATH}")
15
-endif()
1
+if( NOT __FINAL_OUTPUT__CMAKE__)
2
+   set( __FINAL_OUTPUT__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
7
+
8
+   #
9
+   #
10
+   #
11
+   message( STATUS "CMAKE_MODULE_PATH is ${CMAKE_MODULE_PATH}")
12
+   message( STATUS "CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
13
+   message( STATUS "CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME}")
16 14
 
17
-message( STATUS "CMAKE_LIBRARY_PATH is ${CMAKE_LIBRARY_PATH}")
15
+   if( APPLE)
16
+      message( STATUS "CMAKE_OSX_SYSROOT is ${CMAKE_OSX_SYSROOT}")
17
+      message( STATUS "CMAKE_OSX_DEPLOYMENT_TARGET is ${CMAKE_OSX_DEPLOYMENT_TARGET}")
18
+      message( STATUS "CMAKE_FRAMEWORK_PATH is ${CMAKE_FRAMEWORK_PATH}")
19
+   endif()
18 20
 
19
-message( STATUS "MULLE_LANGUAGE is ${MULLE_LANGUAGE}")
20
-message( STATUS "MULLE_C_COMPILER_ID is ${MULLE_C_COMPILER_ID}")
21
-message( STATUS "MULLE_CXX_COMPILER_ID is ${MULLE_C_COMPILER_ID}")
21
+   message( STATUS "CMAKE_LIBRARY_PATH is ${CMAKE_LIBRARY_PATH}")
22 22
 
23
-message( STATUS "CMAKE_C_COMPILER_ID is ${CMAKE_C_COMPILER_ID}")
24
-message( STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}")
23
+   message( STATUS "MULLE_LANGUAGE is ${MULLE_LANGUAGE}")
24
+   message( STATUS "MULLE_C_COMPILER_ID is ${MULLE_C_COMPILER_ID}")
25
+   message( STATUS "MULLE_CXX_COMPILER_ID is ${MULLE_C_COMPILER_ID}")
25 26
 
26
-message( STATUS "CMAKE_CXX_COMPILER_ID is ${CMAKE_C_COMPILER_ID}")
27
-message( STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")
27
+   message( STATUS "CMAKE_C_COMPILER_ID is ${CMAKE_C_COMPILER_ID}")
28
+   message( STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}")
28 29
 
29
-message( STATUS "CMAKE_EXE_LINKER_FLAGS is ${CMAKE_EXE_LINKER_FLAGS}")
30
-message( STATUS "CMAKE_SHARED_LINKER_FLAGS is ${CMAKE_SHARED_LINKER_FLAGS}")
31
-message( STATUS "CMAKE_STATIC_LINKER_FLAGS is ${CMAKE_STATIC_LINKER_FLAGS}")
30
+   message( STATUS "CMAKE_CXX_COMPILER_ID is ${CMAKE_C_COMPILER_ID}")
31
+   message( STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")
32
+
33
+   message( STATUS "CMAKE_EXE_LINKER_FLAGS is ${CMAKE_EXE_LINKER_FLAGS}")
34
+   message( STATUS "CMAKE_SHARED_LINKER_FLAGS is ${CMAKE_SHARED_LINKER_FLAGS}")
35
+   message( STATUS "CMAKE_STATIC_LINKER_FLAGS is ${CMAKE_STATIC_LINKER_FLAGS}")
36
+
37
+endif()
32 38
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+if( NOT __LINK_ALL_SYMBOLS__CMAKE__)
2
+   set( __LINK_ALL_SYMBOLS__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
7
+
8
+   #
9
+   # Get the linker to not strip away "unused" symbols during
10
+   # a link
11
+   #
12
+   # This is either done by prefixing a library or enclosing
13
+   # link statements
14
+   #
15
+   if( APPLE)
16
+      set( FORCE_LOAD_PREFIX "-force_load ")
17
+   else()
18
+      if( WIN32)
19
+         set( FORCE_LOAD_PREFIX "-WHOLEARCHIVE:")
20
+      else()
21
+         set( BEGIN_ALL_LOAD "-Wl,--whole-archive")
22
+         set( END_ALL_LOAD "-Wl,--no-whole-archive")
23
+         set( FORCE_LOAD_PREFIX)
24
+      endif()
25
+   endif()
26
+
27
+endif()
... ...
@@ -1,6 +1,11 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __POST_EXECUTABLE__CMAKE__)
2
+   set( __POST_EXECUTABLE__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
4 7
 
5
-include( FinalOutput)
6
-include( PostExecutableCAux OPTIONAL)
8
+   include( FinalOutput)
9
+   include( PostExecutableCAux OPTIONAL)
10
+
11
+endif()
... ...
@@ -1,5 +1,10 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __POST_FILES__CMAKE__)
2
+   set( __POST_FILES__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
4 7
 
5
-include( PostFilesCAux.cmake OPTIONAL)
8
+   include( PostFilesCAux.cmake OPTIONAL)
9
+
10
+endif()
... ...
@@ -1,7 +1,12 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __POST_LIBRARY__CMAKE__)
2
+   set( __POST_LIBRARY__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
4 7
 
5
-include( FinalOutput)
8
+   include( FinalOutput)
6 9
 
7
-include( PostLibraryCAux OPTIONAL)
10
+   include( PostLibraryCAux OPTIONAL)
11
+
12
+endif()
... ...
@@ -1,8 +1,12 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __PRE_EXECUTABLE__CMAKE__)
2
+   set( __PRE_EXECUTABLE__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
4 7
 
5
-include( CompilerDetection)
6
-include( UnwantedWarnings)
8
+   include( CompilerDetection)
9
+   include( UnwantedWarnings)
7 10
 
8
-include( PreExecutableCAux OPTIONAL)
11
+   include( PreExecutableCAux OPTIONAL)
12
+endif()
... ...
@@ -1,28 +1,38 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __PRE_FILES__CMAKE__)
2
+   set( __PRE_FILES__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
6
+   endif()
7
+
8
+   #
9
+   # Set Search Paths
10
+   #
11
+   include( CMakeTweaks)
4 12
 
5
-#
6
-# Set Search Paths
7
-#
8
-include( CMakeTweaks)
9
-
10
-
11
-### Additional search paths based on build style
12
-
13
-if( CMAKE_BUILD_STYLE STREQUAL "Debug")
14
-   set( CMAKE_LIBRARY_PATH
15
-      "${MULLE_VIRTUAL_ROOT}/dependencies/Debug/lib"
16
-      "${MULLE_VIRTUAL_ROOT}/addictions/Debug/lib"
17
-      ${CMAKE_LIBRARY_PATH}
18
-   )
19
-   set( CMAKE_FRAMEWORK_PATH
20
-      "${MULLE_VIRTUAL_ROOT}/dependencies/Debug/Frameworks"
21
-      "${MULLE_VIRTUAL_ROOT}/addictions/Debug/Frameworks"
22
-      ${CMAKE_FRAMEWORK_PATH}
23
-   )
24
-endif()
25 13
 
14
+   ### Additional search paths based on build style
26 15
 
27
-# a place to add stuff for ObjC or C++
28
-include( PreFilesCAux OPTIONAL)
16
+   if( CMAKE_BUILD_STYLE STREQUAL "Debug")
17
+      set( CMAKE_INCLUDE_PATH
18
+         "${DEPENDENCY_DIR}/Debug/include"
19
+         "${ADDICTION_DIR}/Debug/include"
20
+         ${CMAKE_INCLUDE_PATH}
21
+      )
22
+      set( CMAKE_LIBRARY_PATH
23
+         "${DEPENDENCY_DIR}/Debug/lib"
24
+         "${ADDICTION_DIR}/Debug/lib"
25
+         ${CMAKE_LIBRARY_PATH}
26
+      )
27
+      set( CMAKE_FRAMEWORK_PATH
28
+         "${DEPENDENCY_DIR}/Debug/Frameworks"
29
+         "${ADDICTION_DIR}/Debug/Frameworks"
30
+         ${CMAKE_FRAMEWORK_PATH}
31
+      )
32
+   endif()
33
+
34
+
35
+   # a place to add stuff for ObjC or C++
36
+   include( PreFilesCAux OPTIONAL)
37
+
38
+endif()
... ...
@@ -1,8 +1,13 @@
1
-if( MULLE_TRACE_INCLUDE)
2
-   message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
3
-endif()
1
+if( NOT __PRE_LIBRARY__CMAKE__)
2
+   set( __PRE_LIBRARY__CMAKE__ ON)
3
+
4
+   if( MULLE_TRACE_INCLUDE)
5
+      message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )