[test-suite] r286182 - cmake: Consistently use "if(" instead of "if ("; NFC
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 15:53:05 PST 2016
Author: matze
Date: Mon Nov 7 17:53:04 2016
New Revision: 286182
URL: http://llvm.org/viewvc/llvm-project?rev=286182&view=rev
Log:
cmake: Consistently use "if(" instead of "if ("; NFC
Modified:
test-suite/trunk/Bitcode/Benchmarks/Halide/CMakeLists.txt
test-suite/trunk/CMakeLists.txt
test-suite/trunk/External/CUDA/CMakeLists.txt
test-suite/trunk/External/SPEC/CFP2006/447.dealII/CMakeLists.txt
test-suite/trunk/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt
test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt
test-suite/trunk/cmake/modules/SingleMultiSource.cmake
test-suite/trunk/tools/CMakeLists.txt
Modified: test-suite/trunk/Bitcode/Benchmarks/Halide/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Bitcode/Benchmarks/Halide/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/Bitcode/Benchmarks/Halide/CMakeLists.txt (original)
+++ test-suite/trunk/Bitcode/Benchmarks/Halide/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -1,7 +1,7 @@
-if (NOT WIN32)
+if(NOT WIN32)
list(APPEND LDFLAGS -lpthread -ldl)
endif()
-if (NOT MSVC)
+if(NOT MSVC)
list(APPEND CXXFLAGS "-std=c++11")
endif()
Modified: test-suite/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/CMakeLists.txt (original)
+++ test-suite/trunk/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -6,7 +6,7 @@ project(test-suite C CXX)
# The test-suite is designed to be built in release mode anyway and
# falls over unless -DNDEBUG is set.
-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, defaulting to Release")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
endif()
@@ -58,7 +58,7 @@ set(CMAKE_MODULE_PATH
# sure that we don't have any stray generated files lying around in the tree
# (which would end up getting picked up by header search, instead of the correct
# versions).
-if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE)
message(FATAL_ERROR "In-source builds are not allowed.
CMake would overwrite the makefiles distributed with LLVM.
Please create a directory and run cmake from there, passing the path
Modified: test-suite/trunk/External/CUDA/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/CUDA/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt (original)
+++ test-suite/trunk/External/CUDA/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -15,7 +15,7 @@ endmacro (get_version)
macro(cuda_glob Var)
file(GLOB FileList ${ARGN})
foreach(File IN LISTS FileList)
- if (${File} MATCHES ".*\.cu$")
+ if(${File} MATCHES ".*\.cu$")
set_source_files_properties(${File} PROPERTIES LANGUAGE CXX)
endif()
endforeach()
@@ -177,7 +177,7 @@ macro(create_cuda_tests)
COMMAND ${GccDir}/bin/gcc -print-file-name=libstdc++.so
OUTPUT_VARIABLE _path_to_libstdcxx
OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (EXISTS ${_path_to_libstdcxx})
+ if(EXISTS ${_path_to_libstdcxx})
message(STATUS "Found libstdc++ ${GccVersion}")
add_library(libstdcxx-${GccVersion} SHARED IMPORTED)
set_property(TARGET libstdcxx-${GccVersion} PROPERTY IMPORTED_LOCATION
@@ -195,7 +195,7 @@ macro(create_cuda_tests)
OUTPUT_VARIABLE _path_to_libcxx
OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (EXISTS ${_path_to_libcxx})
+ if(EXISTS ${_path_to_libcxx})
add_library(libcxx SHARED IMPORTED)
set_property(TARGET libcxx PROPERTY IMPORTED_LOCATION ${_path_to_libcxx})
set(HAVE_LIBCXX 1)
@@ -252,7 +252,7 @@ macro(create_cuda_tests)
foreach(_GccPath IN LISTS GCC_PATHS)
get_version(_GccVersion ${_GccPath})
# libstdc++ seems not to support C++14 before version 5.0.
- if (${_Std} STREQUAL "c++14" AND ${_GccVersion} VERSION_LESS "5.0")
+ if(${_Std} STREQUAL "c++14" AND ${_GccVersion} VERSION_LESS "5.0")
continue()
endif()
set(_Gcc_Suffix "libstdc++-${_GccVersion}")
@@ -265,7 +265,7 @@ macro(create_cuda_tests)
create_cuda_test_variant(${_Std} "${_Cuda_Suffix}-${_Std_Suffix}-${_Gcc_Suffix}")
endforeach()
- if (HAVE_LIBCXX)
+ if(HAVE_LIBCXX)
# Same as above, but for libc++
# Tell clang to use libc++
# We also need to add compiler's include path for cxxabi.h
Modified: test-suite/trunk/External/SPEC/CFP2006/447.dealII/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2006/447.dealII/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2006/447.dealII/CMakeLists.txt (original)
+++ test-suite/trunk/External/SPEC/CFP2006/447.dealII/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -30,7 +30,7 @@ macro(test_input run_type size)
foreach(i RANGE 0 8)
verify_n(${run_type} all ${i})
endforeach()
- if (${size} GREATER 8)
+ if(${size} GREATER 8)
foreach(i RANGE 9 ${size})
verify_n(${run_type} ${run_type} ${i})
endforeach()
Modified: test-suite/trunk/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt (original)
+++ test-suite/trunk/External/SPEC/CFP2006/482.sphinx3/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -47,7 +47,7 @@ macro(prepare_data run_type)
llvm_copy(${TARGET} ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/args.an4)
llvm_copy(${TARGET} ${DESTDIR} ${BENCHMARK_DIR}/data/${run_type}/input/beams.dat)
# Create ctlfile and copy .raw files depending on endianess
- if (IS_BIGENDIAN)
+ if(IS_BIGENDIAN)
file(GLOB files "${BENCHMARK_DIR}/data/${run_type}/input/*.be.raw")
else()
file(GLOB files "${BENCHMARK_DIR}/data/${run_type}/input/*.le.raw")
Modified: test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt (original)
+++ test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -2,7 +2,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-D__RISC_64__)
endif()
include(TestBigEndian)
-if (IS_BIGENDIAN)
+if(IS_BIGENDIAN)
set(INPUTNAME "vortex.in.big")
else()
set(INPUTNAME "vortex.in.little")
Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)
+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Mon Nov 7 17:53:04 2016
@@ -130,7 +130,7 @@ function(llvm_test_traditional testfile
endfunction()
macro (test_suite_add_build_dependencies executable)
- if (NOT TEST_SUITE_USE_PERF)
+ if(NOT TEST_SUITE_USE_PERF)
add_dependencies(${executable} timeit-target)
endif()
add_dependencies(${executable} timeit-host fpcmp-host)
@@ -138,7 +138,7 @@ endmacro()
macro(llvm_test_executable name)
cmake_parse_arguments(_LTARG "" "PREFIX;TARGET_VAR" "" ${ARGN})
- if (_LTARG_PREFIX)
+ if(_LTARG_PREFIX)
set(executable "${_LTARG_PREFIX}-${name}")
else()
set(executable ${name})
@@ -149,7 +149,7 @@ macro(llvm_test_executable name)
# Should we skip this?
if(${name_idx} EQUAL -1 AND ${exe_idx} EQUAL -1)
add_executable(${executable} ${_LTARG_UNPARSED_ARGUMENTS})
- if (_LTARG_TARGET_VAR)
+ if(_LTARG_TARGET_VAR)
set(${_LTARG_TARGET_VAR} ${executable})
endif()
append_compile_flags(${executable} ${CFLAGS})
@@ -159,7 +159,7 @@ macro(llvm_test_executable name)
# only interprets inputs starting with '-' as flags.
append_link_flags(${executable} ${LDFLAGS})
set(executable_path ${CMAKE_CURRENT_BINARY_DIR}/${executable})
- if (TEST_SUITE_PROFILE_USE)
+ if(TEST_SUITE_PROFILE_USE)
append_compile_flags(${executable} -fprofile-instr-use=${executable_path}.profdata)
append_link_flags(${executable} -fprofile-instr-use=${executable_path}.profdata)
endif()
@@ -182,7 +182,7 @@ endmacro()
macro(llvm_singlesource)
cmake_parse_arguments(_LSARG "" "PREFIX;TARGET_VAR" "" ${ARGN})
unset(_llvm_singlesource_extra_args)
- if (_LSARG_PREFIX)
+ if(_LSARG_PREFIX)
list(APPEND _llvm_singlesource_extra_args PREFIX ${_LSARG_PREFIX})
endif()
file(GLOB sources *.c *.cpp *.cc)
@@ -190,7 +190,7 @@ macro(llvm_singlesource)
basename(name ${source})
llvm_test_executable(${name} TARGET_VAR _llvm_single_source_target
${_llvm_singlesource_extra_args} ${source})
- if (_LSARG_TARGET_VAR AND _llvm_single_source_target)
+ if(_LSARG_TARGET_VAR AND _llvm_single_source_target)
list(APPEND ${_LSARG_TARGET_VAR} ${_llvm_single_source_target})
endif()
endforeach()
@@ -217,7 +217,7 @@ macro(llvm_multisource)
target_include_directories(${_llvm_multisource_target}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
endif()
- if (_LMARG_TARGET_VAR AND _llvm_multisource_target)
+ if(_LMARG_TARGET_VAR AND _llvm_multisource_target)
set(${_LMARG_TARGET_VAR} ${_llvm_multisource_target})
endif()
endif()
Modified: test-suite/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/CMakeLists.txt?rev=286182&r1=286181&r2=286182&view=diff
==============================================================================
--- test-suite/trunk/tools/CMakeLists.txt (original)
+++ test-suite/trunk/tools/CMakeLists.txt Mon Nov 7 17:53:04 2016
@@ -17,7 +17,7 @@ endmacro()
llvm_add_host_executable(fpcmp-host fpcmp fpcmp.c)
set(TEST_SUITE_USE_PERF "OFF" CACHE BOOL "Use perf (timeit.sh) instead of timeit.c")
-if (${TEST_SUITE_USE_PERF})
+if(TEST_SUITE_USE_PERF)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/timeit
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/timeit.sh ${CMAKE_CURRENT_BINARY_DIR}/timeit
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/timeit
More information about the llvm-commits
mailing list