[PATCH] D15523: [test-suite] Set -lm more fine-grained, making general cmake rules a bit cleaner.
Kristof Beyls via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 15 06:04:00 PST 2015
kristof.beyls created this revision.
kristof.beyls added reviewers: MatzeB, jmolloy.
kristof.beyls added a subscriber: llvm-commits.
This reverts r255239 which did set -lm on all MultiSource links, and
instead sets it more fine-grained. An unnecessarily broad appending of
-lm in SingleSource/CMakeLists.txt is also removed.
The patch was tested both on Ubuntu Linux and OSX.
http://reviews.llvm.org/D15523
Files:
MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt
MultiSource/Benchmarks/nbench/CMakeLists.txt
SingleSource/CMakeLists.txt
SingleSource/Regression/C/CMakeLists.txt
cmake/modules/SingleMultiSource.cmake
Index: cmake/modules/SingleMultiSource.cmake
===================================================================
--- cmake/modules/SingleMultiSource.cmake
+++ cmake/modules/SingleMultiSource.cmake
@@ -180,7 +180,6 @@
append_cflags(${source_exename} CPPFLAGS)
append_cflags(${source_exename} CXXFLAGS)
append_ldflags(${source_exename} LDFLAGS)
- target_link_libraries(${source_exename} -lm)
llvm_add_test(${PROG} ${source_exename})
add_dependencies(${source_exename} timeit timeit-target fpcmp)
endif()
Index: SingleSource/Regression/C/CMakeLists.txt
===================================================================
--- SingleSource/Regression/C/CMakeLists.txt
+++ SingleSource/Regression/C/CMakeLists.txt
@@ -12,6 +12,7 @@
if(DEFINED BENCHMARKING_ONLY)
list(APPEND PROGRAMS_TO_SKIP 2003-05-14-initialize-string 2003-05-21-BitfieldHandling 2003-05-21-UnionBitfields 2003-05-21-UnionTest 2003-05-22-LocalTypeTest 2003-05-22-VarSizeArray 2003-05-23-TransparentUnion 2003-06-16-InvalidInitializer 2003-06-16-VolatileError 2003-10-12-GlobalVarInitializers 2004-02-03-AggregateCopy 2004-03-15-IndirectGoto 2005-05-06-LongLongSignedShift 2008-01-07-LongDouble badidx bigstack callargs casts compare ConstructorDestructorAttributes DuffsDevice globalrefs matrixTranspose pointer_arithmetic PR10189 PR1386 PR491 PR640 sumarray sumarray2d sumarraymalloc test_indvars testtrace)
endif()
+list(APPEND LDFLAGS -lm)
llvm_singlesource()
llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS})
Index: SingleSource/CMakeLists.txt
===================================================================
--- SingleSource/CMakeLists.txt
+++ SingleSource/CMakeLists.txt
@@ -8,7 +8,6 @@
if(NOT DEFINED BENCHMARKING_ONLY)
list(APPEND PARALLEL_DIRS UnitTests)
endif()
-list(APPEND LDFLAGS -lm)
llvm_singlesource()
llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS})
Index: MultiSource/Benchmarks/nbench/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/nbench/CMakeLists.txt
+++ MultiSource/Benchmarks/nbench/CMakeLists.txt
@@ -6,7 +6,7 @@
set(LEVEL ../../..)
set(PROG nbench)
set(CPPFLAGS -DBASE_ITERATIONS=25)
-set(LDFLAGS )
+set(LDFLAGS -lm)
if("${ARCH}" STREQUAL "XCore")
set(RUNTIMELIMIT 7200)
else()
Index: MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt
+++ MultiSource/Benchmarks/VersaBench/dbms/CMakeLists.txt
@@ -5,6 +5,7 @@
set(LEVEL ../../../..)
set(PROG dbms)
+list(APPEND LDFLAGS -lm)
if(DEFINED SMALL_PROBLEM_SIZE)
set(RUN_OPTIONS -i ${CMAKE_CURRENT_SOURCE_DIR}/dbms.train.in)
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15523.42841.patch
Type: text/x-patch
Size: 2724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151215/0f18c845/attachment.bin>
More information about the llvm-commits
mailing list