remove unnecessary and inappropriate flags

Cmake already has reasonable defaults for these. In any case they represent
system or user level policy and should not be hard coded in the build script.
This commit is contained in:
Steven Siloti 2017-07-08 13:04:41 -07:00 committed by Arvid Norberg
parent 71e1924372
commit 023ff527b7
1 changed files with 0 additions and 12 deletions

View File

@ -179,18 +179,8 @@ option(libiconv "enable linking against system libiconv" OFF)
option(logging "build with logging" ON) option(logging "build with logging" ON)
option(build_tests "build tests" OFF) option(build_tests "build tests" OFF)
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release FORCE)
endif()
# add_definitions() doesn't seem to let you say wich build type to apply it to # add_definitions() doesn't seem to let you say wich build type to apply it to
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTORRENT_DEBUG") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTORRENT_DEBUG")
if(UNIX)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os -g")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
endif()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
@ -347,8 +337,6 @@ if (MSVC)
#$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:ICF=5 #$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:ICF=5
#$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:REF #$(SolutionDir)<toolset>msvc,<variant>release:<linkflags>/OPT:REF
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-fcolor-diagnostics)
endif() endif()
target_compile_definitions(torrent-rasterbar PUBLIC _FILE_OFFSET_BITS=64) target_compile_definitions(torrent-rasterbar PUBLIC _FILE_OFFSET_BITS=64)