Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Core/Build: Enable Clang PCH support and OS X specific features
Browse files Browse the repository at this point in the history
Core: Fix warnings here and there
  • Loading branch information
xurxogr committed Nov 9, 2012
1 parent 330ecbe commit 213d266
Show file tree
Hide file tree
Showing 53 changed files with 517 additions and 952 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ build*/
*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.LOCAL.*
15 changes: 15 additions & 0 deletions cmake/compiler/clang/settings.cmake
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()
20 changes: 10 additions & 10 deletions cmake/compiler/gcc/settings.cmake
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()
2 changes: 0 additions & 2 deletions cmake/compiler/xcode/settings.cmake

This file was deleted.

180 changes: 0 additions & 180 deletions cmake/macros/FindOpenSSL.cmake

This file was deleted.

Loading

0 comments on commit 213d266

Please sign in to comment.