aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index fd39dc82e..4255128ad 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -131,9 +131,11 @@ macro(ei_add_test testname)
target_link_libraries(${targetname} ${EXTERNAL_LIBS})
if(${ARGC} GREATER 2)
- if(ARGV2)
+ string(STRIP "${ARGV2}" ARGV2_stripped)
+ string(LENGTH "${ARGV2_stripped}" ARGV2_stripped_length)
+ if(${ARGV2_stripped_length} GREATER 0)
target_link_libraries(${targetname} ${ARGV2})
- endif(ARGV2)
+ endif(${ARGV2_stripped_length} GREATER 0)
endif(${ARGC} GREATER 2)
if(WIN32)