Skip to content

Commit

Permalink
Merge pull request #112 from ClickHouse/remove-o2
Browse files Browse the repository at this point in the history
Remove unnecessary -O2 flag
  • Loading branch information
Enmk authored Nov 18, 2021
2 parents 5fdb9f4 + 1a85f33 commit 408ce18
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
CMAKE_MINIMUM_REQUIRED (VERSION 3.0.2)

INCLUDE (cmake/cpp17.cmake)
INCLUDE (cmake/subdirs.cmake)
Expand All @@ -10,20 +10,19 @@ OPTION (WITH_OPENSSL "Use OpenSSL for TLS connections" OFF)

PROJECT (CLICKHOUSE-CLIENT)

USE_CXX17()
USE_OPENSSL()
USE_CXX17 ()
USE_OPENSSL ()

IF ("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET (CMAKE_BUILD_TYPE "Debug")
ENDIF()
ENDIF ()

IF (UNIX)
IF (APPLE)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -Wextra -Werror")
ELSE ()
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -Wextra -Werror")
IF (NOT APPLE)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
ENDIF ()
SET (CMAKE_EXE_LINKER_FLAGS, "${CMAKE_EXE_LINKER_FLAGS} -lpthread")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
ENDIF ()

INCLUDE_DIRECTORIES (.)
Expand All @@ -37,11 +36,11 @@ PROJECT (CLICKHOUSE-CLIENT)
)

IF (BUILD_BENCHMARK)
SUBDIRS(bench)
SUBDIRS (bench)
ENDIF (BUILD_BENCHMARK)

IF (BUILD_TESTS)
SUBDIRS(
SUBDIRS (
contrib/gtest
tests/simple
ut
Expand Down

0 comments on commit 408ce18

Please sign in to comment.