Legends-of-Azeroth-Pandaria-5.4.8

Форк
0
50 строк · 1.9 Кб
1
# Copyright (C) 2011-2016 Project SkyFire <http://www.projectskyfire.org/
2
# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
3
#
4
# This file is free software; as a special exception the author gives
5
# unlimited permission to copy and/or distribute it, with or without
6
# modifications, as long as this notice is preserved.
7
#
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11

12
# Set build-directive (used in core to tell which buildtype we used)
13
add_compile_options(-D_BUILD_DIRECTIVE="$<CONFIG>")
14
#add_compile_options(-fno-delete-null-pointer-checks)
15

16
if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64")
17
  add_compile_options(-DHAVE_SSE2 -D__SSE2__)
18
  message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
19
endif()
20

21
set(COMPILER_FLAGS "")
22

23
if (WITH_SANITIZER)
24
  set(COMPILER_FLAGS "${COMPILER_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-recover=address -fsanitize-address-use-after-scope")
25
endif()
26

27
if (BUILD_DEPLOY AND NOT WITH_COREDEBUG)
28
  set(COMPILER_FLAGS "${COMPILER_FLAGS} -march=native -fno-strict-aliasing -ffunction-sections -fdata-sections")
29
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections " CACHE INTERNAL "EXE_LINKER_FLAGS" FORCE) #-s -w
30
  if (NOT INSTALL_PREFIX)
31
    set(INSTALL_PREFIX "/server/wow/horizon")
32
  endif()
33
endif()
34

35
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}")
36
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}")
37

38
if( WITH_WARNINGS )
39
  add_compile_options(-Wall -Wfatal-errors -Wextra)
40
  message(STATUS "GCC: All warnings enabled")
41
else()
42
  add_compile_options(--no-warnings)
43
  message(STATUS "GCC: All warnings disabled")
44
endif()
45

46
if( WITH_COREDEBUG )
47
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
48
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
49
  message(STATUS "GCC: Debug-flags set (-g3)")
50
endif()
51

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.