ggerganov commited on
Commit
c34de91
·
unverified ·
1 Parent(s): beefa34

cmake : noramlize case (#1129)

Browse files
Files changed (1) hide show
  1. CMakeLists.txt +14 -14
CMakeLists.txt CHANGED
@@ -330,39 +330,39 @@ add_compile_definitions(_XOPEN_SOURCE=600)
330
  # Somehow in OpenBSD whenever POSIX conformance is specified
331
  # some string functions rely on locale_t availability,
332
  # which was introduced in POSIX.1-2008, forcing us to go higher
333
- IF (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
334
  remove_definitions(-D_XOPEN_SOURCE=600)
335
  add_compile_definitions(_XOPEN_SOURCE=700)
336
- ENDIF()
337
 
338
  # Data types, macros and functions related to controlling CPU affinity
339
  # are available on Linux through GNU extensions in libc
340
- IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
341
  add_compile_definitions(_GNU_SOURCE)
342
- ENDIF()
343
 
344
  # RLIMIT_MEMLOCK came in BSD, is not specified in POSIX.1,
345
  # and on macOS its availability depends on enabling Darwin extensions
346
  # similarly on DragonFly, enabling BSD extensions is necessary
347
- IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
348
  add_compile_definitions(_DARWIN_C_SOURCE)
349
- ENDIF()
350
- IF (CMAKE_SYSTEM_NAME MATCHES "DragonFly")
351
  add_compile_definitions(_DARWIN_C_SOURCE)
352
- ENDIF()
353
 
354
  # alloca is a non-standard interface that is not visible on BSDs when
355
  # POSIX conformance is specified, but not all of them provide a clean way
356
  # to enable it in such cases
357
- IF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
358
  add_compile_definitions(__BSD_VISIBLE)
359
- ENDIF()
360
- IF (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
361
  add_compile_definitions(_NETBSD_SOURCE)
362
- ENDIF()
363
- IF (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
364
  add_compile_definitions(_BSD_SOURCE)
365
- ENDIF()
366
 
367
  if (WHISPER_PERF)
368
  set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_PERF)
 
330
  # Somehow in OpenBSD whenever POSIX conformance is specified
331
  # some string functions rely on locale_t availability,
332
  # which was introduced in POSIX.1-2008, forcing us to go higher
333
+ if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
334
  remove_definitions(-D_XOPEN_SOURCE=600)
335
  add_compile_definitions(_XOPEN_SOURCE=700)
336
+ endif()
337
 
338
  # Data types, macros and functions related to controlling CPU affinity
339
  # are available on Linux through GNU extensions in libc
340
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
341
  add_compile_definitions(_GNU_SOURCE)
342
+ endif()
343
 
344
  # RLIMIT_MEMLOCK came in BSD, is not specified in POSIX.1,
345
  # and on macOS its availability depends on enabling Darwin extensions
346
  # similarly on DragonFly, enabling BSD extensions is necessary
347
+ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
348
  add_compile_definitions(_DARWIN_C_SOURCE)
349
+ endif()
350
+ if (CMAKE_SYSTEM_NAME MATCHES "DragonFly")
351
  add_compile_definitions(_DARWIN_C_SOURCE)
352
+ endif()
353
 
354
  # alloca is a non-standard interface that is not visible on BSDs when
355
  # POSIX conformance is specified, but not all of them provide a clean way
356
  # to enable it in such cases
357
+ if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
358
  add_compile_definitions(__BSD_VISIBLE)
359
+ endif()
360
+ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
361
  add_compile_definitions(_NETBSD_SOURCE)
362
+ endif()
363
+ if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
364
  add_compile_definitions(_BSD_SOURCE)
365
+ endif()
366
 
367
  if (WHISPER_PERF)
368
  set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_PERF)