From a3b7bf46e7ec83c6fdc66291fb4c57ecdd2dfdb7 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 11:53:47 +0200 Subject: [PATCH] Ignore long long warning with C++98 tests --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1041c95..712c463f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,9 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++98") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") set(CMAKE_CXX_FLAGS "-std=c++98") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + add_definitions(-Wno-long-long) + endif() endif() endif() @@ -89,7 +92,6 @@ else() add_definitions(/Za) elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")) add_definitions(-pedantic) - add_definitions(-pedantic) endif() endif()