Anonymous avatar Anonymous committed 1a8c6d1

get a test executable' location from its target property.

Comments (0)

Files changed (21)

tests/freetype/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gd2/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagearc/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecolorclosest/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST("${test_name}" ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecolordeallocate/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST("${test_name}" ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecolorexact/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST("${test_name}" ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecolorresolve/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST("${test_name}" ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecolortransparent/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST("${test_name}" ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecopy/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagecopyrotated/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagefill/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagefilledellipse/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagefilledrectangle/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagefilltoborder/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimageline/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdimagerectangle/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/gdtiled/CMakeLists.txt

-add_executable(bug00032 bug00032.c)
+SET(TESTS_FILES
+	bug00032
+)
 
-target_link_libraries (bug00032 gdTest ${GD_LIB})
-
-ADD_TEST(bug00032 ${EXECUTABLE_OUTPUT_PATH}/bug00032)
+FOREACH(test_name ${TESTS_FILES})
+	add_executable(${test_name} "${test_name}.c")
+	target_link_libraries (${test_name} gdTest ${GD_LIB})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
+ENDFOREACH(test_name)

tests/gif/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/jpeg/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/png/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)

tests/xpm/CMakeLists.txt

 FOREACH(test_name ${TESTS_FILES})
 	add_executable(${test_name} "${test_name}.c")
 	target_link_libraries (${test_name} gdTest ${GD_LIB})
-	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+	get_target_property(test_path ${test_name} LOCATION)
+	ADD_TEST(${test_name} ${test_path})
 ENDFOREACH(test_name)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.