Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 30734fb

Browse files
authored
Remove extra spaces between 'if' (#20721)
1 parent 630a144 commit 30734fb

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ set(CMAKE_CXX_EXTENSIONS ON) # GNU extensions used by src/operator/random/shuff
1616
# some compilers claim they support c++17 without actually implementing crucial
1717
# parts of the standard leading to hard to understand compilation errors.
1818
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
19-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
19+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
2020
message(FATAL_ERROR "MXNet 2 requires a C++17 compatible compiler. Please update to GCC version 7 or newer.")
2121
endif()
2222
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
23-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
23+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
2424
message(FATAL_ERROR "MXNet 2 requires a C++17 compatible compiler. Please update to Clang version 6 or newer.")
2525
endif()
2626
endif()
@@ -116,7 +116,7 @@ if(USE_CUDA)
116116
cmake_minimum_required(VERSION 3.13.2) # CUDA 10 (Turing) detection available starting 3.13.2
117117
include(CheckLanguage)
118118
check_language(CUDA)
119-
if (NOT CMAKE_CUDA_COMPILER AND UNIX AND EXISTS "/usr/local/cuda/bin/nvcc")
119+
if(NOT CMAKE_CUDA_COMPILER AND UNIX AND EXISTS "/usr/local/cuda/bin/nvcc")
120120
set(ENV{CUDACXX} "/usr/local/cuda/bin/nvcc")
121121
message(WARNING "CMAKE_CUDA_COMPILER guessed: " $ENV{CUDACXX} "\n"
122122
"Please fix your cuda installation: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#mandatory-post")
@@ -562,7 +562,7 @@ if(USE_OPERATOR_TUNING AND USE_OPENMP)
562562
add_definitions(-DMXNET_USE_OPERATOR_TUNING=1)
563563
endif()
564564

565-
if (NOT (EXTRA_OPERATORS STREQUAL ""))
565+
if(NOT (EXTRA_OPERATORS STREQUAL ""))
566566
mxnet_source_group("Extra" GLOB_RECURSE "${EXTRA_OPERATORS}/*.cc")
567567
mxnet_source_group("Extra\\Cuda" GLOB_RECURSE "${EXTRA_OPERATORS}/*.cu")
568568
FILE(GLOB_RECURSE EXTRA_SRC "${EXTRA_OPERATORS}/*.cc")
@@ -818,7 +818,7 @@ if(USE_CUDA)
818818
target_include_directories(customop_gpu_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op)
819819
endif()
820820
if(UNIX)
821-
if (USE_CUDA)
821+
if(USE_CUDA)
822822
target_compile_options(customop_gpu_lib PUBLIC -shared)
823823
endif()
824824
elseif(MSVC)
@@ -948,11 +948,11 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/include/ DESTIN
948948
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mshadow/mshadow/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mshadow)
949949
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mxnet)
950950
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/nnvm/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
951-
if (INSTALL_EXAMPLES)
951+
if(INSTALL_EXAMPLES)
952952
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/example DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
953953
endif()
954954

955-
if (USE_SIGNAL_HANDLER)
955+
if(USE_SIGNAL_HANDLER)
956956
add_definitions(-DMXNET_USE_SIGNAL_HANDLER=1)
957957
endif()
958958

cmake/Utils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ endfunction()
370370

371371
function(assign_source_group group)
372372
foreach(_source IN ITEMS ${ARGN})
373-
if (IS_ABSOLUTE "${_source}")
373+
if(IS_ABSOLUTE "${_source}")
374374
file(RELATIVE_PATH _source_rel "${CMAKE_CURRENT_SOURCE_DIR}" "${_source}")
375375
else()
376376
set(_source_rel "${_source}")

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if(GTEST_FOUND AND NOT MSVC)
2525
include_directories(${GTEST_INCLUDE_DIR})
2626
include_directories(cpp/include)
2727

28-
if (NOT PRIVATE_RUNTIME_DIR)
28+
if(NOT PRIVATE_RUNTIME_DIR)
2929
set(PRIVATE_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
3030
endif()
3131

0 commit comments

Comments
 (0)