mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-24 06:46:37 +00:00
cmake : noramlize case (#1129)
This commit is contained in:
parent
b55b505690
commit
f00c9bba33
@ -330,39 +330,39 @@ add_compile_definitions(_XOPEN_SOURCE=600)
|
|||||||
# Somehow in OpenBSD whenever POSIX conformance is specified
|
# Somehow in OpenBSD whenever POSIX conformance is specified
|
||||||
# some string functions rely on locale_t availability,
|
# some string functions rely on locale_t availability,
|
||||||
# which was introduced in POSIX.1-2008, forcing us to go higher
|
# which was introduced in POSIX.1-2008, forcing us to go higher
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
remove_definitions(-D_XOPEN_SOURCE=600)
|
remove_definitions(-D_XOPEN_SOURCE=600)
|
||||||
add_compile_definitions(_XOPEN_SOURCE=700)
|
add_compile_definitions(_XOPEN_SOURCE=700)
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
# Data types, macros and functions related to controlling CPU affinity
|
# Data types, macros and functions related to controlling CPU affinity
|
||||||
# are available on Linux through GNU extensions in libc
|
# are available on Linux through GNU extensions in libc
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
add_compile_definitions(_GNU_SOURCE)
|
add_compile_definitions(_GNU_SOURCE)
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
# RLIMIT_MEMLOCK came in BSD, is not specified in POSIX.1,
|
# RLIMIT_MEMLOCK came in BSD, is not specified in POSIX.1,
|
||||||
# and on macOS its availability depends on enabling Darwin extensions
|
# and on macOS its availability depends on enabling Darwin extensions
|
||||||
# similarly on DragonFly, enabling BSD extensions is necessary
|
# similarly on DragonFly, enabling BSD extensions is necessary
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
add_compile_definitions(_DARWIN_C_SOURCE)
|
add_compile_definitions(_DARWIN_C_SOURCE)
|
||||||
ENDIF()
|
endif()
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "DragonFly")
|
if (CMAKE_SYSTEM_NAME MATCHES "DragonFly")
|
||||||
add_compile_definitions(_DARWIN_C_SOURCE)
|
add_compile_definitions(_DARWIN_C_SOURCE)
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
# alloca is a non-standard interface that is not visible on BSDs when
|
# alloca is a non-standard interface that is not visible on BSDs when
|
||||||
# POSIX conformance is specified, but not all of them provide a clean way
|
# POSIX conformance is specified, but not all of them provide a clean way
|
||||||
# to enable it in such cases
|
# to enable it in such cases
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||||
add_compile_definitions(__BSD_VISIBLE)
|
add_compile_definitions(__BSD_VISIBLE)
|
||||||
ENDIF()
|
endif()
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||||
add_compile_definitions(_NETBSD_SOURCE)
|
add_compile_definitions(_NETBSD_SOURCE)
|
||||||
ENDIF()
|
endif()
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
add_compile_definitions(_BSD_SOURCE)
|
add_compile_definitions(_BSD_SOURCE)
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
if (WHISPER_PERF)
|
if (WHISPER_PERF)
|
||||||
set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_PERF)
|
set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_PERF)
|
||||||
|
Loading…
Reference in New Issue
Block a user