From 4dbb5646196a4a3cc94097f1473ef11d1d44df11 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 18 Jun 2016 01:51:28 -0700 Subject: [PATCH] Only enable cxx_long_long_type if it is in the list of features Fixes #99. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d33750aa..018e728e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ else() endif() # Enable C++11 long long for compilers that are capable of it -if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1) +if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;") target_compile_features(pugixml PUBLIC cxx_long_long_type) endif()