Skip to content

Commit

Permalink
Apply compiler flags from Harfbuzz CMake config
Browse files Browse the repository at this point in the history
  • Loading branch information
matteblair committed Oct 5, 2020
1 parent c2bf048 commit c38801e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,17 @@ set(HARFBUZZ_LIBRARIES
CACHE INTERNAL "Harfbuzz libraries" FORCE)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(harfbuzz PRIVATE -utf-8 -wd4996 -wd4267 -wd4244)
target_compile_options(harfbuzz PRIVATE -utf-8 -wd4996 -wd4267 -wd4244)
endif()

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(harfbuzz
PRIVATE
-Wno-vla-extension
-Wno-extended-offsetof)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Apply compiler flags from Harfbuzz CMake config.
target_compile_options(harfbuzz
PRIVATE
-fno-rtti
-fno-exceptions
-fno-threadsafe-statics
)
endif()

target_compile_definitions(harfbuzz PUBLIC
Expand Down

0 comments on commit c38801e

Please sign in to comment.