aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-17 11:04:43 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-17 11:04:43 -0400
commit1e3a0352753ecd67874cfeefd8e1d67319235b45 (patch)
tree4a33ca5c230b614de787e6e5045d51ae1285cd14 /cmake
parent8356bc8d067d0f291284b256c515b1be0766856c (diff)
Fix general linking issue for tests linking to multiple libs, and explicitly link mpfr_real test to GMP.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/EigenTesting.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake
index 60d99adc9..b2b5a7a8e 100644
--- a/cmake/EigenTesting.cmake
+++ b/cmake/EigenTesting.cmake
@@ -35,13 +35,16 @@ macro(ei_add_test_internal testname testname_with_suffix)
if(EXTERNAL_LIBS)
target_link_libraries(${targetname} ${EXTERNAL_LIBS})
endif()
+
if(${ARGC} GREATER 3)
- string(STRIP "${ARGV3}" ARGV3_stripped)
- string(LENGTH "${ARGV3_stripped}" ARGV3_stripped_length)
- if(${ARGV3_stripped_length} GREATER 0)
- target_link_libraries(${targetname} ${ARGV3})
- endif(${ARGV3_stripped_length} GREATER 0)
- endif(${ARGC} GREATER 3)
+ foreach(lib_to_link ${ARGV3})
+ string(STRIP lib_to_link lib_to_link_stripped)
+ string(LENGTH "${lib_to_link_stripped}" lib_to_link_stripped_length)
+ if(${lib_to_link_stripped_length} GREATER 0)
+ target_link_libraries(${targetname} "${lib_to_link}")
+ endif()
+ endforeach()
+ endif()
if(WIN32)
if(CYGWIN)