Skip to content

Commit 3679c51

Browse files
committed
Fix CMAKE code formats
1 parent 92abd9e commit 3679c51

15 files changed

Lines changed: 1090 additions & 1013 deletions

File tree

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/performance/CMakeLists.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,15 @@ add_subdirectory(${PERFORMANCE_HELPER})
2525
add_subdirectory(${RESULTS_PTESTS})
2626
add_subdirectory(${EXECUTION_PTESTS})
2727

28-
if (NOT "$ENV{BOOST_ROOT}" STREQUAL "")
29-
set(BOOST_ROOT "$ENV{BOOST_ROOT}")
28+
if(NOT "$ENV{BOOST_ROOT}" STREQUAL "")
29+
set(BOOST_ROOT "$ENV{BOOST_ROOT}")
3030
endif()
3131

3232
# gtest
3333
include(gtest/googletest.cmake)
3434
if(APPLE)
35-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -fPIC")
35+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -fPIC")
3636
else()
37-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -fPIC -Wno-error=maybe-uninitialized")
37+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -fPIC -Wno-error=maybe-uninitialized")
3838
endif()
39-
fetch_googletest(
40-
${PROJECT_SOURCE_DIR}/gtest
41-
${PROJECT_BINARY_DIR}/googletest
42-
)
43-
39+
fetch_googletest(${PROJECT_SOURCE_DIR}/gtest ${PROJECT_BINARY_DIR}/googletest)

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/performance/PTODBCExecution/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright <2022> Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License").
44
# You may not use this file except in compliance with the License.
55
# A copy of the License is located at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# or in the "license" file accompanying this file. This file is distributed
1010
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
1111
# express or implied. See the License for the specific language governing

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/performance/PTODBCResults/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ find_package(Boost 1.71 REQUIRED COMPONENTS thread)
1717
find_package(ODBC REQUIRED)
1818
# Source, headers, and include dirs
1919
set(SOURCE_FILES performance_odbc_results.cpp)
20-
include_directories(${PERFORMANCE_HELPER} SYSTEM ${ODBC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
20+
include_directories(${PERFORMANCE_HELPER} SYSTEM ${ODBC_INCLUDE_DIRS}
21+
${Boost_INCLUDE_DIRS})
2122

2223
# Generate executable
2324
add_executable(performance_results ${SOURCE_FILES})
2425

2526
# Library dependencies
26-
target_link_libraries(performance_results performance_helper gtest_main ${ODBC_LIBRARIES} ${Boost_LIBRARIES})
27+
target_link_libraries(performance_results
28+
performance_helper
29+
gtest_main
30+
${ODBC_LIBRARIES}
31+
${Boost_LIBRARIES})
2732
target_compile_definitions(performance_results PUBLIC _UNICODE UNICODE)

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/performance/PerformanceHelper/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ find_package(ODBC REQUIRED)
1717

1818
# Source, headers, and include dirs
1919
set(SOURCE_FILES performance_helper.cpp)
20-
set(HEADER_FILES performance_helper.h)
20+
set(HEADER_FILES performance_helper.h)
2121

2222
# Generate dll (SHARED)
23-
add_library(performance_helper ${SOURCE_FILES} ${HEADER_FILES})
23+
add_library(performance_helper ${SOURCE_FILES} ${HEADER_FILES})
2424
include_directories(${ODBC_INCLUDE_DIRS})
2525

2626
# Library dependencies
2727
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -fPIC")
2828
target_link_libraries(performance_helper gtest_main ${ODBC_LIBRARIES})
29-
target_compile_definitions(performance_helper PUBLIC _UNICODE UNICODE)
30-
29+
target_compile_definitions(performance_helper PUBLIC _UNICODE UNICODE)

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/performance/gtest/googletest-download.cmake

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
# Modifications Copyright Amazon.com, Inc. or its affiliates.
23+
# Modifications Copyright Amazon.com, Inc. or its affiliates.
2424
# SPDX-License-Identifier: MIT.
2525

2626
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
@@ -29,16 +29,12 @@ project(googletest-download NONE)
2929

3030
include(ExternalProject)
3131

32-
ExternalProject_Add(
33-
googletest
34-
SOURCE_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-src"
35-
BINARY_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-build"
36-
GIT_REPOSITORY
37-
https://github.com/google/googletest.git
38-
GIT_TAG
39-
release-1.10.0
40-
CONFIGURE_COMMAND ""
41-
BUILD_COMMAND ""
42-
INSTALL_COMMAND ""
43-
TEST_COMMAND ""
44-
)
32+
externalproject_add(googletest
33+
SOURCE_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-src"
34+
BINARY_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-build"
35+
GIT_REPOSITORY https://github.com/google/googletest.git
36+
GIT_TAG release-1.10.0
37+
CONFIGURE_COMMAND ""
38+
BUILD_COMMAND ""
39+
INSTALL_COMMAND ""
40+
TEST_COMMAND "")

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/performance/gtest/googletest.cmake

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,21 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
# Modifications Copyright Amazon.com, Inc. or its affiliates.
23+
# Modifications Copyright Amazon.com, Inc. or its affiliates.
2424
# SPDX-License-Identifier: MIT.
2525

2626
macro(fetch_googletest _download_module_path _download_root)
27-
set(GOOGLETEST_DOWNLOAD_ROOT ${_download_root})
28-
configure_file(
29-
${_download_module_path}/googletest-download.cmake
30-
${_download_root}/CMakeLists.txt
31-
@ONLY
32-
)
33-
unset(GOOGLETEST_DOWNLOAD_ROOT)
27+
set(GOOGLETEST_DOWNLOAD_ROOT ${_download_root})
28+
configure_file(${_download_module_path}/googletest-download.cmake
29+
${_download_root}/CMakeLists.txt @ONLY)
30+
unset(GOOGLETEST_DOWNLOAD_ROOT)
3431

35-
execute_process(
36-
COMMAND
37-
"${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
38-
WORKING_DIRECTORY
39-
${_download_root}
40-
)
41-
execute_process(
42-
COMMAND
43-
"${CMAKE_COMMAND}" --build .
44-
WORKING_DIRECTORY
45-
${_download_root}
46-
)
32+
execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
33+
WORKING_DIRECTORY ${_download_root})
34+
execute_process(COMMAND "${CMAKE_COMMAND}" --build .
35+
WORKING_DIRECTORY ${_download_root})
4736

48-
# adds the targers: gtest, gtest_main, gmock, gmock_main
49-
add_subdirectory(
50-
${_download_root}/googletest-src EXCLUDE_FROM_ALL
51-
${_download_root}/googletest-build EXCLUDE_FROM_ALL
52-
)
53-
endmacro()
37+
# adds the targers: gtest, gtest_main, gmock, gmock_main
38+
add_subdirectory(${_download_root}/googletest-src EXCLUDE_FROM_ALL
39+
${_download_root}/googletest-build EXCLUDE_FROM_ALL)
40+
endmacro()

cpp/src/arrow/flight/sql/amazon-timestream-odbc-driver/src/CMakeLists.txt

Lines changed: 87 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright <2022> Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License").
44
# You may not use this file except in compliance with the License.
55
# A copy of the License is located at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# or in the "license" file accompanying this file. This file is distributed
1010
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
1111
# express or implied. See the License for the specific language governing
@@ -19,52 +19,64 @@ string(STRIP ${ODBC_DRIVER_VERSION} ODBC_DRIVER_VERSION)
1919
project(Timestream-ODBC VERSION ${ODBC_DRIVER_VERSION})
2020

2121
# Mac
22-
if (UNIX AND APPLE)
23-
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/aws-sdk-cpp/install/lib)
22+
if(UNIX AND APPLE)
23+
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/aws-sdk-cpp/install/lib)
2424
endif()
2525

26-
# Linux
27-
if (UNIX AND NOT APPLE)
28-
if (${INSTALLER_TYPE} STREQUAL "RPM" AND ${BITNESS} EQUAL 64)
29-
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/aws-sdk-cpp/install/lib64)
30-
else()
31-
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/aws-sdk-cpp/install/lib)
32-
endif()
26+
# Linux
27+
if(UNIX AND NOT APPLE)
28+
if(${INSTALLER_TYPE} STREQUAL "RPM" AND ${BITNESS} EQUAL 64)
29+
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/aws-sdk-cpp/install/lib64)
30+
else()
31+
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/aws-sdk-cpp/install/lib)
32+
endif()
3333
endif()
3434

3535
# Windows
36-
if (WIN32)
37-
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/../build/aws-sdk/install/lib)
38-
39-
set(CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
40-
set(AWS_DLL_DIR ${CMAKE_SOURCE_DIR}/../build/aws-sdk/install/bin)
41-
set(AWS_LIB_DIR ${CMAKE_SOURCE_DIR}/../build/aws-sdk/install/lib)
42-
43-
# copy AWS DLL to ${CMAKE_BUILD_DIR} as they are needed for Windows building and test running
44-
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-core.dll ${CMAKE_BUILD_DIR}/aws-cpp-sdk-core.dll COPYONLY)
45-
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-timestream-query.dll ${CMAKE_BUILD_DIR}/aws-cpp-sdk-timestream-query.dll COPYONLY)
46-
# Timestream-write dll is needed for data writer tool
47-
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-timestream-write.dll ${CMAKE_BUILD_DIR}/aws-cpp-sdk-timestream-write.dll COPYONLY)
48-
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-sts.dll ${CMAKE_BUILD_DIR}/aws-cpp-sdk-sts.dll COPYONLY)
49-
configure_file(${AWS_DLL_DIR}/aws-c-auth.dll ${CMAKE_BUILD_DIR}/aws-c-auth.dll COPYONLY)
50-
configure_file(${AWS_DLL_DIR}/aws-c-cal.dll ${CMAKE_BUILD_DIR}/aws-c-cal.dll COPYONLY)
51-
configure_file(${AWS_DLL_DIR}/aws-c-common.dll ${CMAKE_BUILD_DIR}/aws-c-common.dll COPYONLY)
52-
configure_file(${AWS_DLL_DIR}/aws-c-compression.dll ${CMAKE_BUILD_DIR}/aws-c-compression.dll COPYONLY)
53-
configure_file(${AWS_DLL_DIR}/aws-c-event-stream.dll ${CMAKE_BUILD_DIR}/aws-c-event-stream.dll COPYONLY)
54-
configure_file(${AWS_DLL_DIR}/aws-checksums.dll ${CMAKE_BUILD_DIR}/aws-checksums.dll COPYONLY)
55-
configure_file(${AWS_DLL_DIR}/aws-c-http.dll ${CMAKE_BUILD_DIR}/aws-c-http.dll COPYONLY)
56-
configure_file(${AWS_DLL_DIR}/aws-c-io.dll ${CMAKE_BUILD_DIR}/aws-c-io.dll COPYONLY)
57-
configure_file(${AWS_DLL_DIR}/aws-c-mqtt.dll ${CMAKE_BUILD_DIR}/aws-c-mqtt.dll COPYONLY)
58-
configure_file(${AWS_DLL_DIR}/aws-crt-cpp.dll ${CMAKE_BUILD_DIR}/aws-crt-cpp.dll COPYONLY)
59-
configure_file(${AWS_DLL_DIR}/aws-c-s3.dll ${CMAKE_BUILD_DIR}/aws-c-s3.dll COPYONLY)
60-
configure_file(${AWS_DLL_DIR}/aws-c-sdkutils.dll ${CMAKE_BUILD_DIR}/aws-c-sdkutils.dll COPYONLY)
36+
if(WIN32)
37+
set(AWS_CMAKE_DIR ${CMAKE_SOURCE_DIR}/../build/aws-sdk/install/lib)
38+
39+
set(CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
40+
set(AWS_DLL_DIR ${CMAKE_SOURCE_DIR}/../build/aws-sdk/install/bin)
41+
set(AWS_LIB_DIR ${CMAKE_SOURCE_DIR}/../build/aws-sdk/install/lib)
42+
43+
# copy AWS DLL to ${CMAKE_BUILD_DIR} as they are needed for Windows building and test running
44+
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-core.dll
45+
${CMAKE_BUILD_DIR}/aws-cpp-sdk-core.dll COPYONLY)
46+
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-timestream-query.dll
47+
${CMAKE_BUILD_DIR}/aws-cpp-sdk-timestream-query.dll COPYONLY)
48+
# Timestream-write dll is needed for data writer tool
49+
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-timestream-write.dll
50+
${CMAKE_BUILD_DIR}/aws-cpp-sdk-timestream-write.dll COPYONLY)
51+
configure_file(${AWS_DLL_DIR}/aws-cpp-sdk-sts.dll
52+
${CMAKE_BUILD_DIR}/aws-cpp-sdk-sts.dll COPYONLY)
53+
configure_file(${AWS_DLL_DIR}/aws-c-auth.dll ${CMAKE_BUILD_DIR}/aws-c-auth.dll COPYONLY)
54+
configure_file(${AWS_DLL_DIR}/aws-c-cal.dll ${CMAKE_BUILD_DIR}/aws-c-cal.dll COPYONLY)
55+
configure_file(${AWS_DLL_DIR}/aws-c-common.dll ${CMAKE_BUILD_DIR}/aws-c-common.dll
56+
COPYONLY)
57+
configure_file(${AWS_DLL_DIR}/aws-c-compression.dll
58+
${CMAKE_BUILD_DIR}/aws-c-compression.dll COPYONLY)
59+
configure_file(${AWS_DLL_DIR}/aws-c-event-stream.dll
60+
${CMAKE_BUILD_DIR}/aws-c-event-stream.dll COPYONLY)
61+
configure_file(${AWS_DLL_DIR}/aws-checksums.dll ${CMAKE_BUILD_DIR}/aws-checksums.dll
62+
COPYONLY)
63+
configure_file(${AWS_DLL_DIR}/aws-c-http.dll ${CMAKE_BUILD_DIR}/aws-c-http.dll COPYONLY)
64+
configure_file(${AWS_DLL_DIR}/aws-c-io.dll ${CMAKE_BUILD_DIR}/aws-c-io.dll COPYONLY)
65+
configure_file(${AWS_DLL_DIR}/aws-c-mqtt.dll ${CMAKE_BUILD_DIR}/aws-c-mqtt.dll COPYONLY)
66+
configure_file(${AWS_DLL_DIR}/aws-crt-cpp.dll ${CMAKE_BUILD_DIR}/aws-crt-cpp.dll
67+
COPYONLY)
68+
configure_file(${AWS_DLL_DIR}/aws-c-s3.dll ${CMAKE_BUILD_DIR}/aws-c-s3.dll COPYONLY)
69+
configure_file(${AWS_DLL_DIR}/aws-c-sdkutils.dll ${CMAKE_BUILD_DIR}/aws-c-sdkutils.dll
70+
COPYONLY)
6171
endif()
6272

6373
# ensure AWS SDK libraries built by us could be found by find_package
6474
set(s2n_DIR "${AWS_CMAKE_DIR}/s2n/cmake")
65-
set(aws-cpp-sdk-timestream-query_DIR "${AWS_CMAKE_DIR}/cmake/aws-cpp-sdk-timestream-query")
75+
set(aws-cpp-sdk-timestream-query_DIR
76+
"${AWS_CMAKE_DIR}/cmake/aws-cpp-sdk-timestream-query")
6677
# Timestream-write directory value is needed for data writer tool
67-
set(aws-cpp-sdk-timestream-write_DIR "${AWS_CMAKE_DIR}/cmake/aws-cpp-sdk-timestream-write")
78+
set(aws-cpp-sdk-timestream-write_DIR
79+
"${AWS_CMAKE_DIR}/cmake/aws-cpp-sdk-timestream-write")
6880
set(aws-cpp-sdk-sts_DIR "${AWS_CMAKE_DIR}/cmake/aws-cpp-sdk-sts")
6981
set(aws-cpp-sdk-core_DIR "${AWS_CMAKE_DIR}/cmake/aws-cpp-sdk-core")
7082
set(aws-crt-cpp_DIR "${AWS_CMAKE_DIR}/aws-crt-cpp/cmake")
@@ -82,68 +94,70 @@ set(aws-c-sdkutils_DIR "${AWS_CMAKE_DIR}/aws-c-sdkutils/cmake")
8294
set(AWSSDK_DIR "${AWS_CMAKE_DIR}/cmake/AWSSDK")
8395

8496
include("${CMAKE_CURRENT_SOURCE_DIR}/modules/code-coverage.cmake")
85-
if (NOT "$ENV{BOOST_ROOT}" STREQUAL "")
86-
set(BOOST_ROOT "$ENV{BOOST_ROOT}")
97+
if(NOT "$ENV{BOOST_ROOT}" STREQUAL "")
98+
set(BOOST_ROOT "$ENV{BOOST_ROOT}")
8799
endif()
88100
set(CMAKE_CXX_STANDARD 11)
89101

90102
set(CMAKE_PROJECT_VERSION ${PROJECT_VERSION})
91103
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
92-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIGNITE_IMPL -DIGNITE_FRIEND -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS")
104+
set(CMAKE_CXX_FLAGS
105+
"${CMAKE_CXX_FLAGS} -DIGNITE_IMPL -DIGNITE_FRIEND -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
106+
)
93107

94108
set(CMAKE_SKIP_BUILD_RPATH FALSE)
95109
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
96110
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
97111
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
98112
set(PROJECT_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/..")
99113

100-
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
114+
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib"
115+
isSystemDir)
101116

102117
if("${isSystemDir}" STREQUAL "-1")
103-
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
118+
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
104119
endif("${isSystemDir}" STREQUAL "-1")
105120

106121
add_definitions(-DUNICODE=1)
107-
if (WIN32)
122+
if(WIN32)
108123

109-
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
124+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
110125

111-
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
126+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
112127
else()
113-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../build/odbc/lib")
114-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../build/odbc/lib")
115-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../build/odbc/bin")
128+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../build/odbc/lib")
129+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../build/odbc/lib")
130+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../build/odbc/bin")
116131
endif()
117132

118-
if (MSVC)
119-
add_compile_options(/source-charset:utf-8 /execution-charset:utf-8)
133+
if(MSVC)
134+
add_compile_options(/source-charset:utf-8 /execution-charset:utf-8)
120135

121-
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
136+
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
122137
endif()
123138

124-
option (WITH_ODBC OFF)
125-
option (WITH_ODBC_MSI OFF)
126-
option (WITH_THIN_CLIENT OFF)
127-
option (WITH_TESTS OFF)
128-
option (WARNINGS_AS_ERRORS OFF)
129-
130-
if (${WARNINGS_AS_ERRORS})
131-
if (MSVC)
132-
add_compile_options(/WX)
133-
else()
134-
add_compile_options(-Wall -Wextra -Werror -Wno-variadic-macros)
135-
endif()
139+
option(WITH_ODBC OFF)
140+
option(WITH_ODBC_MSI OFF)
141+
option(WITH_THIN_CLIENT OFF)
142+
option(WITH_TESTS OFF)
143+
option(WARNINGS_AS_ERRORS OFF)
144+
145+
if(${WARNINGS_AS_ERRORS})
146+
if(MSVC)
147+
add_compile_options(/WX)
148+
else()
149+
add_compile_options(-Wall -Wextra -Werror -Wno-variadic-macros)
150+
endif()
136151
endif()
137152

138-
if (${WITH_ODBC})
139-
add_subdirectory(odbc)
153+
if(${WITH_ODBC})
154+
add_subdirectory(odbc)
140155
endif()
141156

142-
if (${WITH_TESTS})
143-
enable_testing()
157+
if(${WITH_TESTS})
158+
enable_testing()
144159

145-
if (EXISTS ${CMAKE_SOURCE_DIR}/tests)
146-
add_subdirectory(tests)
147-
endif()
160+
if(EXISTS ${CMAKE_SOURCE_DIR}/tests)
161+
add_subdirectory(tests)
162+
endif()
148163
endif()
149-

0 commit comments

Comments
 (0)