Files
Viano-Core/dep/cppformat/CMakeLists.txt
T
Carbenium b82a072b25 Merge commit 'bba8555a29ea5cde018a73f92f1e6aa1a61351de' into 4.3.4
Conflicts:
	dep/cppformat/CMakeLists.txt
	dep/cppformat/ChangeLog.rst
	dep/cppformat/format.cc
	dep/cppformat/format.h
	dep/cppformat/posix.cc
	dep/cppformat/posix.h
	sql/updates/world/2015_03_16_02_world.sql
	sql/updates/world/2015_03_16_03_world.sql
	sql/updates/world/2015_03_16_04_world.sql
	sql/updates/world/2015_03_16_05_world.sql
	sql/updates/world/2015_03_16_06_world.sql
	sql/updates/world/2015_03_17_00_world.sql
	src/server/game/Conditions/ConditionMgr.cpp
	src/server/game/Conditions/ConditionMgr.h
	src/server/worldserver/CMakeLists.txt
2015-07-21 23:46:56 +02:00

37 lines
851 B
CMake

include(CheckCXXCompilerFlag)
include(CheckSymbolExists)
set(FMT_SOURCES format.cc format.h)
# Use variadic templates
add_definitions(-DFMT_VARIADIC_TEMPLATES=1)
# Check if initializer lists are supported.
check_cxx_source_compiles("
#include <initilizer_list>
int main() {}" FMT_INITIALIZER_LIST)
# Use delete
add_definitions(-DFMT_USE_DELETED_FUNCTIONS=1)
# Use static assert
add_definitions(-DFMT_USE_STATIC_ASSERT=1)
if (WIN32)
check_symbol_exists(open io.h HAVE_OPEN)
else ()
check_symbol_exists(open fcntl.h HAVE_OPEN)
endif ()
if (HAVE_OPEN)
add_definitions(-DFMT_USE_FILE_DESCRIPTORS=1)
set(FMT_SOURCES ${FMT_SOURCES} posix.cc posix.h)
endif ()
add_library(format STATIC ${FMT_SOURCES})
if (CMAKE_COMPILER_IS_GNUCXX)
set_target_properties(format PROPERTIES COMPILE_FLAGS
"-Wall -Wextra -Wshadow -pedantic")
endif ()