From 4988ad93c06d62186025b8061e01b06aa9c201f4 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Thu, 11 Apr 2002 10:11:42 -0400 Subject: [PATCH] ENH: use target as source if source is empty --- Tests/Complex/Library/CMakeLists.txt | 6 ++---- Tests/ComplexOneConfig/Library/CMakeLists.txt | 6 ++---- Tests/ComplexRelativePaths/Library/CMakeLists.txt | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index 1aa325a55..c354c342e 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -35,13 +35,11 @@ ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c) # ADD_DEPENDENCIES(CMakeTestLibraryShared create_file) -ADD_CUSTOM_COMMAND(SOURCE CMakeTestLibraryShared - COMMAND ${CREATE_FILE_EXE} +ADD_CUSTOM_COMMAND(COMMAND ${CREATE_FILE_EXE} ARGS "${Complex_BINARY_DIR}/Library/postbuild.txt" TARGET CMakeTestLibraryShared) -ADD_CUSTOM_COMMAND(SOURCE CMakeTestLibraryShared - COMMAND ${CCOMMAND_COMMAND} +ADD_CUSTOM_COMMAND(COMMAND ${CCOMMAND_COMMAND} ARGS copy "${Complex_BINARY_DIR}/Library/postbuild.txt" "${Complex_BINARY_DIR}/Library/postbuild2.txt" diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt index 1aa325a55..c354c342e 100644 --- a/Tests/ComplexOneConfig/Library/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt @@ -35,13 +35,11 @@ ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c) # ADD_DEPENDENCIES(CMakeTestLibraryShared create_file) -ADD_CUSTOM_COMMAND(SOURCE CMakeTestLibraryShared - COMMAND ${CREATE_FILE_EXE} +ADD_CUSTOM_COMMAND(COMMAND ${CREATE_FILE_EXE} ARGS "${Complex_BINARY_DIR}/Library/postbuild.txt" TARGET CMakeTestLibraryShared) -ADD_CUSTOM_COMMAND(SOURCE CMakeTestLibraryShared - COMMAND ${CCOMMAND_COMMAND} +ADD_CUSTOM_COMMAND(COMMAND ${CCOMMAND_COMMAND} ARGS copy "${Complex_BINARY_DIR}/Library/postbuild.txt" "${Complex_BINARY_DIR}/Library/postbuild2.txt" diff --git a/Tests/ComplexRelativePaths/Library/CMakeLists.txt b/Tests/ComplexRelativePaths/Library/CMakeLists.txt index 1aa325a55..c354c342e 100644 --- a/Tests/ComplexRelativePaths/Library/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Library/CMakeLists.txt @@ -35,13 +35,11 @@ ADD_LIBRARY(CMakeTestCLibraryShared SHARED testConly.c) # ADD_DEPENDENCIES(CMakeTestLibraryShared create_file) -ADD_CUSTOM_COMMAND(SOURCE CMakeTestLibraryShared - COMMAND ${CREATE_FILE_EXE} +ADD_CUSTOM_COMMAND(COMMAND ${CREATE_FILE_EXE} ARGS "${Complex_BINARY_DIR}/Library/postbuild.txt" TARGET CMakeTestLibraryShared) -ADD_CUSTOM_COMMAND(SOURCE CMakeTestLibraryShared - COMMAND ${CCOMMAND_COMMAND} +ADD_CUSTOM_COMMAND(COMMAND ${CCOMMAND_COMMAND} ARGS copy "${Complex_BINARY_DIR}/Library/postbuild.txt" "${Complex_BINARY_DIR}/Library/postbuild2.txt"