From 2ac2da41cfa673b0ec001b700e310d63332fcc39 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 28 Feb 2020 23:28:41 +0300 Subject: [PATCH] cmake: fix else statement --- build/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 3a723c45..f5c1280e 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -188,13 +188,13 @@ endif () include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++17" CXX17_SUPPORTED) CHECK_CXX_COMPILER_FLAG("-std=c++11" CXX11_SUPPORTED) -if (CXX17_SUPPORTED) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" ) -elseif (CXX11_SUPPORTED) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) -else +if(CXX17_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") +elseif(CXX11_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +else() message(SEND_ERROR "C++17 nor C++11 standard not seems to be supported by compiler. Too old version?") -endif () +endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe")