From eadd377734a785aea55c2fe9c20881e68419af5a Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 23 Feb 2021 10:51:53 +0100 Subject: [PATCH] [CMake] Flag -fext-numeric-literals is valid only for C++. --- scripts/cmake/CompilerSetup.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake index f3fe1e20f5f..4a207fdc4a4 100644 --- a/scripts/cmake/CompilerSetup.cmake +++ b/scripts/cmake/CompilerSetup.cmake @@ -83,7 +83,7 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL) required! Found version ${CMAKE_CXX_COMPILER_VERSION}.") endif() endif() - add_compile_options(-fext-numeric-literals) + add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fext-numeric-literals>) include(GCCSanitizer) endif() -- GitLab