[test-suite] r286197 - cmake: Get rid of PROGRAMS_TO_SKIP concept
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 18:17:19 PST 2016
Author: matze
Date: Mon Nov 7 20:17:19 2016
New Revision: 286197
URL: http://llvm.org/viewvc/llvm-project?rev=286197&view=rev
Log:
cmake: Get rid of PROGRAMS_TO_SKIP concept
Instead of having additional PROGRAMS_TO_SKIP magic that filters
benchmarks after the fact, we rather explicitely construct the list of
benchmarks to run with normal cmake commands.
Modified:
test-suite/trunk/SingleSource/Benchmarks/McGill/CMakeLists.txt
test-suite/trunk/SingleSource/Benchmarks/Misc/CMakeLists.txt
test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt
test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt
test-suite/trunk/SingleSource/Benchmarks/Stanford/CMakeLists.txt
test-suite/trunk/SingleSource/UnitTests/CMakeLists.txt
test-suite/trunk/SingleSource/UnitTests/Threads/CMakeLists.txt
test-suite/trunk/cmake/modules/SingleMultiSource.cmake
Modified: test-suite/trunk/SingleSource/Benchmarks/McGill/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/McGill/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/McGill/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/Benchmarks/McGill/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -1,6 +1,11 @@
list(APPEND LDFLAGS -lm )
set(FP_TOLERANCE 0.001)
-if(TEST_SUITE_BENCHMARKING_ONLY)
- list(APPEND PROGRAMS_TO_SKIP exptree)
+set(Source
+ chomp.c
+ misr.c
+ queens.c
+)
+if(NOT TEST_SUITE_BENCHMARKING_ONLY)
+ list(APPEND Source exptree.c)
endif()
llvm_singlesource()
Modified: test-suite/trunk/SingleSource/Benchmarks/Misc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Misc/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Misc/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Misc/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -1,9 +1,35 @@
list(APPEND LDFLAGS -lm )
set(FP_TOLERANCE 0.001)
-if(ARCH STREQUAL "PowerPC")
- if(TARGET_OS STREQUAL "Darwin")
- set(PROGRAMS_TO_SKIP dt)
- endif()
+
+set(Source
+ ReedSolomon.c
+ fbench.c
+ ffbench.c
+ flops-1.c
+ flops-2.c
+ flops-3.c
+ flops-4.c
+ flops-5.c
+ flops-6.c
+ flops-7.c
+ flops-8.c
+ flops.c
+ fp-convert.c
+ himenobmtxpa.c
+ lowercase.c
+ mandel-2.c
+ mandel.c
+ matmul_f64_4x4.c
+ oourafft.c
+ perlin.c
+ pi.c
+ richards_benchmark.c
+ salsa20.c
+ whetstone.c
+)
+
+if(NOT ARCH STREQUAL "PowerPC" OR NOT TARGET_OS STREQUAL "Darwin")
+ list(APPEND Source dt.c)
endif()
if(ARCH STREQUAL "Mips")
set(RUNTIMELIMIT 2000)
Modified: test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout-C%2B%2B/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -2,15 +2,42 @@ add_subdirectory(EH)
list(APPEND CXXFLAGS -Wno-deprecated)
set(FP_TOLERANCE 0.00000001)
+set(Source
+ ackermann.cpp
+ ary.cpp
+ ary2.cpp
+ ary3.cpp
+ fibo.cpp
+ hash.cpp
+ hash2.cpp
+ heapsort.cpp
+ lists.cpp
+ lists1.cpp
+ matrix.cpp
+ methcall.cpp
+ moments.cpp
+ nestedloop.cpp
+ objinst.cpp
+ random.cpp
+ sieve.cpp
+ strcat.cpp
+)
+if(NOT TEST_SUITE_BENCHMARKING_ONLY)
+ list(APPEND Source
+ hello.cpp
+ reversefile.cpp
+ spellcheck.cpp
+ sumcol.cpp
+ wc.cpp
+ wordfreq.cpp
+ )
+endif()
if(ARCH STREQUAL "XCore")
if(NOT DEFINED SMALL_PROBLEM_SIZE)
set(XCORE_TARGET_NEEDS_MEMORY 256)
set(RUNTIMELIMIT 10800)
endif()
endif()
-if(TEST_SUITE_BENCHMARKING_ONLY)
- list(APPEND PROGRAMS_TO_SKIP hello reversefile spellcheck sumcol wc wordfreq)
-endif()
list(APPEND LDFLAGS -lstdc++ -lm)
if(TARGET_OS STREQUAL "Darwin")
# Necessary for ackermann on iOS
Modified: test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -2,7 +2,22 @@ list(APPEND LDFLAGS -lm)
if(ARCH STREQUAL "XCore")
set(XCORE_TARGET_NEEDS_MEMORY 256)
endif()
-if(TEST_SUITE_BENCHMARKING_ONLY)
- list(APPEND PROGRAMS_TO_SKIP hello)
+set(Source
+ ackermann.c
+ ary3.c
+ fib2.c
+ hash.c
+ heapsort.c
+ lists.c
+ matrix.c
+ methcall.c
+ nestedloop.c
+ objinst.c
+ random.c
+ sieve.c
+ strcat.c
+)
+if(NOT TEST_SUITE_BENCHMARKING_ONLY)
+ list(APPEND Source hello.c)
endif()
llvm_singlesource(PREFIX "shootout")
Modified: test-suite/trunk/SingleSource/Benchmarks/Stanford/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Stanford/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Stanford/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Stanford/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -1,6 +1,18 @@
list(APPEND LDFLAGS -lm)
set(FP_TOLERANCE 0.001)
-if(TEST_SUITE_BENCHMARKING_ONLY)
- list(APPEND PROGRAMS_TO_SKIP IntMM)
+set(Source
+ Bubblesort.c
+ FloatMM.c
+ Oscar.c
+ Perm.c
+ Puzzle.c
+ Queens.c
+ Quicksort.c
+ RealMM.c
+ Towers.c
+ Treesort.c
+)
+if(NOT TEST_SUITE_BENCHMARKING_ONLY)
+ list(APPEND Source IntMM.c)
endif()
llvm_singlesource()
Modified: test-suite/trunk/SingleSource/UnitTests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/UnitTests/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -3,44 +3,44 @@ add_subdirectory(SignlessTypes)
add_subdirectory(Threads)
add_subdirectory(Vector)
add_subdirectory(Vectorizer)
-
# FIXME: Disable SJLJ tests for now, until EH edges are represented.
# add_subdirectory(SetjmpLongjmp)
-
if(TARGET_OS STREQUAL "Darwin")
add_subdirectory(ObjC)
add_subdirectory(ObjC++)
endif()
+
+file(GLOB Source RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c *.cpp)
if(TARGET_OS STREQUAL "Darwin")
- set(PROGRAMS_TO_SKIP 2007-04-25-weak)
+ list(REMOVE_ITEM Source 2007-04-25-weak.c)
if(ARCH STREQUAL "PowerPC")
- list(APPEND PROGRAMS_TO_SKIP AtomicOps)
+ list(REMOVE_ITEM Source AtomicOps.c)
endif()
endif()
if(ARCH STREQUAL "AArch64")
- list(APPEND PROGRAMS_TO_SKIP blockstret)
+ list(REMOVE_ITEM Source blockstret.c)
endif()
if(ARCH STREQUAL "Mips")
add_subdirectory(Mips)
# Only MIPS 64-bit supports 8 bytes atomic operations.
if(NOT MIPS_IS_MIPS64_ENABLED)
- list(APPEND PROGRAMS_TO_SKIP AtomicOps)
+ list(REMOVE_ITEM Source AtomicOps.c)
endif()
endif()
if(ARCH STREQUAL "XCore")
- list(APPEND PROGRAMS_TO_SKIP AtomicOps)
- list(APPEND PROGRAMS_TO_SKIP initp1)
+ list(REMOVE_ITEM Source AtomicOps.c)
+ list(REMOVE_ITEM Source initp1.cpp)
set(XCORE_TARGET_NEEDS_MEMORY 1)
endif()
list(APPEND LDFLAGS -lstdc++)
if(NOT ARCH STREQUAL "x86")
- list(APPEND PROGRAMS_TO_SKIP
- ms_struct-bitfield
- ms_struct-bitfield-1
- ms_struct-bitfield-init
- ms_struct-bitfield-init-1
- ms_struct_pack_layout
- ms_struct_pack_layout-1
+ list(REMOVE_ITEM Source
+ ms_struct-bitfield.c
+ ms_struct-bitfield-1.c
+ ms_struct-bitfield-init.c
+ ms_struct-bitfield-init-1.c
+ ms_struct_pack_layout.c
+ ms_struct_pack_layout-1.c
)
endif()
llvm_singlesource()
Modified: test-suite/trunk/SingleSource/UnitTests/Threads/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Threads/CMakeLists.txt?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Threads/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/UnitTests/Threads/CMakeLists.txt Mon Nov 7 20:17:19 2016
@@ -1,9 +1,6 @@
-if(NOT ARCH STREQUAL "XCore")
- list(APPEND LDFLAGS -lpthread)
-else()
- set(PROGRAMS_TO_SKIP tls)
+# XCore and older Darwin version do not support thread local storage
+if(NOT ARCH STREQUAL "XCore" AND NOT ARCH STREQUAL "Darwin")
+ list(APPEND LDFLAGS -pthread)
+ list(APPEND CFLAGS -pthread)
+ llvm_singlesource()
endif()
-if(TARGET_OS STREQUAL "Darwin")
- set(PROGRAMS_TO_SKIP tls 2010-12-08-tls)
-endif()
-llvm_singlesource()
Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=286197&r1=286196&r2=286197&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)
+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Mon Nov 7 20:17:19 2016
@@ -19,8 +19,7 @@
#
# Invokes llvm_test_executable() for each c/c++ source file. If
# 'sources is emptyno sources are specified, creates test executables
-# for all C/C++ files in current directory, except for those
-# listed in PROGRAMS_TO_SKIP.
+# for all C/C++ files in current directory.
# Passes optional PREFIX parameter to llvm_test_executable().
# If optional TARGET_VAR is specified, the variable is set to
# list of all created targets.
@@ -28,9 +27,6 @@
# llvm_multisource(executable)
# Invokes llvm_test_executable(executable [sources...])
#
-# Variables that control target generation:
-# PROGRAMS_TO_SKIP - list of base names of executalbes to skip.
-#
##===----------------------------------------------------------------------===##
include(TestFile)
@@ -144,37 +140,32 @@ macro(llvm_test_executable name)
set(executable ${name})
endif()
unset("${_LTARG_TARGET_VAR}")
- list(FIND PROGRAMS_TO_SKIP ${executable} exe_idx)
- list(FIND PROGRAMS_TO_SKIP ${name} name_idx)
- # Should we skip this?
- if(${name_idx} EQUAL -1 AND ${exe_idx} EQUAL -1)
- add_executable(${executable} ${_LTARG_UNPARSED_ARGUMENTS})
- if(_LTARG_TARGET_VAR)
- set(${_LTARG_TARGET_VAR} ${executable})
- endif()
- append_compile_flags(${executable} ${CFLAGS})
- append_compile_flags(${executable} ${CPPFLAGS})
- append_compile_flags(${executable} ${CXXFLAGS})
- # Note that we cannot use target_link_libraries() here because that one
- # 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)
- append_compile_flags(${executable} -fprofile-instr-use=${executable_path}.profdata)
- append_link_flags(${executable} -fprofile-instr-use=${executable_path}.profdata)
- endif()
-
- set_property(GLOBAL APPEND PROPERTY TEST_SUITE_TARGETS ${executable})
-
- # Fall back to old style involving RUN_OPTIONS and STDIN_FILENAME if
- # llvm_test_run() was not called yet.
- if(NOT TESTSCRIPT)
- llvm_test_traditional(${executable_path}.test ${executable_path} ${name})
- else()
- llvm_add_test(${executable_path}.test ${executable_path})
- endif()
- test_suite_add_build_dependencies(${executable})
+ add_executable(${executable} ${_LTARG_UNPARSED_ARGUMENTS})
+ if(_LTARG_TARGET_VAR)
+ set(${_LTARG_TARGET_VAR} ${executable})
+ endif()
+ append_compile_flags(${executable} ${CFLAGS})
+ append_compile_flags(${executable} ${CPPFLAGS})
+ append_compile_flags(${executable} ${CXXFLAGS})
+ # Note that we cannot use target_link_libraries() here because that one
+ # 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)
+ append_compile_flags(${executable} -fprofile-instr-use=${executable_path}.profdata)
+ append_link_flags(${executable} -fprofile-instr-use=${executable_path}.profdata)
+ endif()
+
+ set_property(GLOBAL APPEND PROPERTY TEST_SUITE_TARGETS ${executable})
+
+ # Fall back to old style involving RUN_OPTIONS and STDIN_FILENAME if
+ # llvm_test_run() was not called yet.
+ if(NOT TESTSCRIPT)
+ llvm_test_traditional(${executable_path}.test ${executable_path} ${name})
+ else()
+ llvm_add_test(${executable_path}.test ${executable_path})
endif()
+ test_suite_add_build_dependencies(${executable})
endmacro()
# Configure the current directory as a SingleSource subdirectory - i.e. every
More information about the llvm-commits
mailing list