From 07fa9f4758bc49150effb278ec847015e73c9d9d Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Fri, 16 Feb 2018 15:25:57 -0500 Subject: [PATCH] Adding flag to compile for c++11 --- CMakeLists.txt | 4 ---- tests/CMakeLists.txt | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56c4f4b..be07e6b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,10 +57,6 @@ IF (MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE) ENDIF (MSVC) -if(UNIX) - set(CMAKE_CXX_FLAGS "-std=c++11") -endif(UNIX) - include_directories(include src tools/epanet-output/src) # configure file groups diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 52feb09..4f976bd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,6 +12,10 @@ #Setup CMake to run tests enable_testing() +if(UNIX) + set(CMAKE_CXX_FLAGS "-std=c++11") +endif(UNIX) + #Prep ourselves for compiling boost find_package(Boost COMPONENTS unit_test_framework REQUIRED) include_directories (${Boost_INCLUDE_DIRS} ../include ../tools/epanet-output/src)