From 187b03725a90e0485fc2b8114a6e79eeee0066c9 Mon Sep 17 00:00:00 2001 From: Yusuke Oda Date: Thu, 6 Apr 2017 16:03:33 +0900 Subject: [PATCH] fix compiler option --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22f1d58..cc04a8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,14 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) project(mteval) +set(BUILD_SHARED_LIBS ON) + +# Compiler options set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set(BUILD_SHARED_LIBS ON) +if(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "-O2 -Wall -Werror") +endif() # Boost configurations if(DEFINED BOOST_ROOT OR DEFINED BOOSTROOT OR DEFINED ENV{BOOST_ROOT} OR DEFINED ENV{BOOSTROOT})