This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 30734fb Remove extra spaces between 'if' (#20721)
30734fb is described below
commit 30734fb1d16be10bb8d5452f8956d505a7d504d0
Author: mozga <[email protected]>
AuthorDate: Thu Nov 4 00:50:14 2021 +0100
Remove extra spaces between 'if' (#20721)
---
CMakeLists.txt | 14 +++++++-------
cmake/Utils.cmake | 2 +-
tests/CMakeLists.txt | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6893c6..19e1c49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,11 +16,11 @@ set(CMAKE_CXX_EXTENSIONS ON) # GNU extensions used by
src/operator/random/shuff
# some compilers claim they support c++17 without actually implementing crucial
# parts of the standard leading to hard to understand compilation errors.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
message(FATAL_ERROR "MXNet 2 requires a C++17 compatible compiler. Please
update to GCC version 7 or newer.")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
message(FATAL_ERROR "MXNet 2 requires a C++17 compatible compiler. Please
update to Clang version 6 or newer.")
endif()
endif()
@@ -116,7 +116,7 @@ if(USE_CUDA)
cmake_minimum_required(VERSION 3.13.2) # CUDA 10 (Turing) detection
available starting 3.13.2
include(CheckLanguage)
check_language(CUDA)
- if (NOT CMAKE_CUDA_COMPILER AND UNIX AND EXISTS "/usr/local/cuda/bin/nvcc")
+ if(NOT CMAKE_CUDA_COMPILER AND UNIX AND EXISTS "/usr/local/cuda/bin/nvcc")
set(ENV{CUDACXX} "/usr/local/cuda/bin/nvcc")
message(WARNING "CMAKE_CUDA_COMPILER guessed: " $ENV{CUDACXX} "\n"
"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)
add_definitions(-DMXNET_USE_OPERATOR_TUNING=1)
endif()
-if (NOT (EXTRA_OPERATORS STREQUAL ""))
+if(NOT (EXTRA_OPERATORS STREQUAL ""))
mxnet_source_group("Extra" GLOB_RECURSE "${EXTRA_OPERATORS}/*.cc")
mxnet_source_group("Extra\\Cuda" GLOB_RECURSE "${EXTRA_OPERATORS}/*.cu")
FILE(GLOB_RECURSE EXTRA_SRC "${EXTRA_OPERATORS}/*.cc")
@@ -818,7 +818,7 @@ if(USE_CUDA)
target_include_directories(customop_gpu_lib PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet
${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op)
endif()
if(UNIX)
- if (USE_CUDA)
+ if(USE_CUDA)
target_compile_options(customop_gpu_lib PUBLIC -shared)
endif()
elseif(MSVC)
@@ -948,11 +948,11 @@ install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/include/ DESTIN
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mshadow/mshadow/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mshadow)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet/ DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/mxnet)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/nnvm/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-if (INSTALL_EXAMPLES)
+if(INSTALL_EXAMPLES)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/example DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
endif()
-if (USE_SIGNAL_HANDLER)
+if(USE_SIGNAL_HANDLER)
add_definitions(-DMXNET_USE_SIGNAL_HANDLER=1)
endif()
diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
index 294e7cf..ce062e2b7 100644
--- a/cmake/Utils.cmake
+++ b/cmake/Utils.cmake
@@ -370,7 +370,7 @@ endfunction()
function(assign_source_group group)
foreach(_source IN ITEMS ${ARGN})
- if (IS_ABSOLUTE "${_source}")
+ if(IS_ABSOLUTE "${_source}")
file(RELATIVE_PATH _source_rel "${CMAKE_CURRENT_SOURCE_DIR}"
"${_source}")
else()
set(_source_rel "${_source}")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3209aa0..4844036 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -25,7 +25,7 @@ if(GTEST_FOUND AND NOT MSVC)
include_directories(${GTEST_INCLUDE_DIR})
include_directories(cpp/include)
- if (NOT PRIVATE_RUNTIME_DIR)
+ if(NOT PRIVATE_RUNTIME_DIR)
set(PRIVATE_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()