From ef582933c102fe514a161ccce950b77b403e7f2c Mon Sep 17 00:00:00 2001 From: "Marcus D. Hanwell" Date: Fri, 21 Aug 2009 14:04:17 -0400 Subject: [PATCH] Proper fix for linking to the Qt libraries (and others) My initial fix was incorrect, the libraries must be quoted when being passed to the add test macro, but must be unquoted when passed to the target_link_libraries function. --- cmake/EigenTesting.cmake | 2 +- test/CMakeLists.txt | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake index ef36d2067..571774787 100644 --- a/cmake/EigenTesting.cmake +++ b/cmake/EigenTesting.cmake @@ -74,7 +74,7 @@ macro(ei_add_test testname) string(STRIP "${ARGV2}" ARGV2_stripped) string(LENGTH "${ARGV2_stripped}" ARGV2_stripped_length) if(${ARGV2_stripped_length} GREATER 0) - target_link_libraries(${targetname} "${ARGV2}") + target_link_libraries(${targetname} ${ARGV2}) endif(${ARGV2_stripped_length} GREATER 0) endif(${ARGC} GREATER 2) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ac4eb7633..dd8f07386 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -78,7 +78,6 @@ else(QT4_FOUND) ei_add_property(EIGEN_MISSING_BACKENDS "Qt4 support, ") endif(QT4_FOUND) - if(TEST_LIB) add_definitions("-DEIGEN_EXTERN_INSTANTIATIONS=1") endif(TEST_LIB) @@ -137,11 +136,6 @@ ei_add_test(regression) ei_add_test(stdvector) ei_add_test(resize) if(QT4_FOUND) - if(QT_QTCORE_LIBRARY_DEBUG) - set(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY_DEBUG}) - else(QT_QTCORE_LIBRARY_DEBUG) - set(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY_RELEASE}) - endif(QT_QTCORE_LIBRARY_DEBUG) ei_add_test(qtvector " " "${QT_QTCORE_LIBRARY}") endif(QT4_FOUND) ei_add_test(sparse_vector)