[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.46 1.46.2.1

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 1 17:21:25 EDT 2009


Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv11203/Tests/CustomCommand

Modified Files:
      Tag: CMake-2-8
	CMakeLists.txt 
Log Message:
Merge in changes to CMake-2-8 RC 2


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/CMakeLists.txt,v
retrieving revision 1.46
retrieving revision 1.46.2.1
diff -C 2 -d -r1.46 -r1.46.2.1
*** CMakeLists.txt	8 Jul 2009 15:41:15 -0000	1.46
--- CMakeLists.txt	1 Oct 2009 21:21:23 -0000	1.46.2.1
***************
*** 387,388 ****
--- 387,416 ----
    )
  ADD_DEPENDENCIES(do_check_command_line pre_check_command_line)
+ 
+ # <SameNameTest>
+ #
+ # Add a custom target called "SameName" -- then add a custom command in a
+ # different target whose output is a full-path file called "SameName" -- then
+ # add a second custom target that depends on the full-path file ".../SameName"
+ #
+ # At first, this reproduces a bug reported by a customer. After fixing it,
+ # having this test here makes sure it stays fixed moving forward.
+ #
+ ADD_CUSTOM_COMMAND(
+   OUTPUT SameName1.txt
+   COMMAND ${CMAKE_COMMAND} -E touch SameName1.txt
+   )
+ ADD_CUSTOM_TARGET(SameName ALL
+   DEPENDS SameName1.txt
+   )
+ 
+ ADD_CUSTOM_COMMAND(
+   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/subdir/SameName
+   COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/subdir
+   COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/subdir/SameName
+   )
+ ADD_CUSTOM_TARGET(DifferentName ALL
+   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/subdir/SameName
+   )
+ #
+ # </SameNameTest>



More information about the Cmake-commits mailing list