scripts: Enable C++11 in CMakeLists

We now make sure that in CMake builds we have long long support. This requires
CMake 3.1 for target_compile_features.

Fixes #53 (as long as packages use this CMake script... most of them do)
This commit is contained in:
Arseny Kapoulkine 2015-09-23 08:40:25 -07:00
parent 3229e67712
commit 2cda053345

View file

@ -25,6 +25,11 @@ else()
add_library(pugixml STATIC ${SOURCES})
endif()
# Enable C++11 long long for compilers that are capable of it
if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1)
target_compile_features(pugixml PUBLIC cxx_long_long_type)
endif()
set_target_properties(pugixml PROPERTIES VERSION 1.6 SOVERSION 1)
install(TARGETS pugixml EXPORT pugixml-config