From 2cda053345f75ca961b4d35def88ad6c06945f01 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 23 Sep 2015 08:40:25 -0700 Subject: 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) --- scripts/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 0f72001..cf9577e 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -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 -- cgit v1.2.3