]> granicus.if.org Git - llvm/commitdiff
cmake: Add 'examples' target
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 6 Jan 2015 23:42:49 +0000 (23:42 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 6 Jan 2015 23:42:49 +0000 (23:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225319 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake

index ee55c52df6e74cbb6a4e7ba42770e88d1aea6c40..517b828991b1af5dcd0d47c933f4162915a6b1b3 100644 (file)
@@ -513,6 +513,12 @@ macro(add_llvm_example name)
     install(TARGETS ${name} RUNTIME DESTINATION examples)
   endif()
   set_target_properties(${name} PROPERTIES FOLDER "Examples")
+
+  if(NOT TARGET examples)
+    add_custom_target(examples ${name})
+  else()
+    add_dependencies(examples ${name})
+  endif()
 endmacro(add_llvm_example name)