Fixed compiler flags.

This commit is contained in:
Kirill Kirilenko 2016-11-08 14:53:19 +03:00
parent a4654b8b23
commit fd98bb70fe
2 changed files with 5 additions and 10 deletions

View file

@ -2,13 +2,8 @@ cmake_minimum_required(VERSION 2.8)
message(STATUS "Configuring telebotxx") message(STATUS "Configuring telebotxx")
# Add required gcc flags # Add required compiler flags
# For Windows we suppress all warnings because of Boost garbage :( set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
else(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
endif(NOT WIN32)
# Put compiled library to 'lib' directory # Put compiled library to 'lib' directory
set(LIBRARY_OUTPUT_PATH "../lib") set(LIBRARY_OUTPUT_PATH "../lib")

View file

@ -9,12 +9,12 @@ add_definitions(-DBOOST_TEST_DYN_LINK)
find_package(Boost REQUIRED COMPONENTS unit_test_framework system) find_package(Boost REQUIRED COMPONENTS unit_test_framework system)
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
# Add required gcc flags # Add required compiler flags
# For Windows we suppress all warnings because of Boost garbage :( # For Windows we suppress all warnings because of Boost garbage :(
if(NOT WIN32) if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
else(NOT WIN32) else(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -w") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
endif(NOT WIN32) endif(NOT WIN32)
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/tests") set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/tests")