Skip to content

build: ignore deprecation warnings on Windows #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/TSCBasic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ add_library(TSCBasic
Thread.swift
Tuple.swift
misc.swift)
target_compile_options(TSCBasic PUBLIC
# Don't use GNU strerror_r on Android.
"$<$<PLATFORM_ID:Android>:SHELL:-Xcc -U_GNU_SOURCE>"
# Ignore secure function warnings on Windows.
"$<$<PLATFORM_ID:Windows>:SHELL:-Xcc -D_CRT_SECURE_NO_WARNINGS>")
target_link_libraries(TSCBasic PUBLIC
TSCLibc)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
Expand All @@ -67,9 +72,4 @@ install(TARGETS TSCBasic
RUNTIME DESTINATION bin)
endif()

# Don't use GNU strerror_r on Android.
if(CMAKE_SYSTEM_NAME STREQUAL Android)
target_compile_options(TSCBasic PUBLIC "SHELL:-Xcc -U_GNU_SOURCE")
endif()

set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCBasic)