This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core/Build: Enable Clang PCH support and OS X specific features
Core: Fix warnings here and there
- Loading branch information
Showing
53 changed files
with
517 additions
and
952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Set build-directive (used in core to tell which buildtype we used) | ||
add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"') | ||
|
||
if(WITH_WARNINGS) | ||
set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Wfatal-errors") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}") | ||
message(STATUS "Clang: All warnings enabled") | ||
endif() | ||
|
||
if(WITH_COREDEBUG) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") | ||
message(STATUS "Clang: Debug-flags set (-g3)") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
# Set build-directive (used in core to tell which buildtype we used) | ||
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"') | ||
|
||
add_definitions(-fno-delete-null-pointer-checks) | ||
|
||
if(PLATFORM EQUAL 32) | ||
# Required on 32-bit systems to enable SSE2 (standard on x64) | ||
add_definitions(-msse2 -mfpmath=sse) | ||
set(SSE_FLAGS "-msse2 -mfpmath=sse") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SSE_FLAGS}") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}") | ||
endif() | ||
add_definitions(-DHAVE_SSE2 -D__SSE2__) | ||
message(STATUS "GCC: SSE2 flags forced") | ||
message(STATUS "GCC: SFMT enabled, SSE2 flags forced") | ||
|
||
if( WITH_WARNINGS ) | ||
add_definitions(-Wall -Wfatal-errors -Wextra) | ||
set(WARNING_FLAGS "-W -Wall -Wextra -Wwrite-strings -Winit-self -Woverloaded-virtual -Winvalid-pch -Wfatal-errors") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}") | ||
message(STATUS "GCC: All warnings enabled") | ||
else() | ||
add_definitions(--no-warnings) | ||
message(STATUS "GCC: All warnings disabled") | ||
endif() | ||
|
||
if( WITH_COREDEBUG ) | ||
add_definitions(-ggdb3) | ||
message(STATUS "GCC: Debug-flags set (-ggdb3)") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") | ||
message(STATUS "GCC: Debug-flags set (-g3)") | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.