summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakePlatformId.h.in3
-rw-r--r--Modules/Compiler/IAR-C.cmake5
-rw-r--r--Modules/Compiler/IAR-CXX.cmake4
-rw-r--r--Modules/Compiler/IAR-DetermineCompiler.cmake2
-rw-r--r--Modules/Compiler/IAR-FindBinUtils.cmake3
-rw-r--r--Modules/FindPkgConfig.cmake6
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmAddCustomTargetCommand.cxx2
-rw-r--r--Source/cmMakefile.cxx6
-rw-r--r--Source/cmSourceFile.cxx21
-rw-r--r--Source/cmSourceFile.h17
-rw-r--r--Tests/CustomCommandByproducts/CMakeLists.txt10
-rw-r--r--Tests/FindEnvModules/EnvModules.cmake16
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake49
-rw-r--r--Tests/RunCMake/add_custom_command/GeneratedProperty.cmake10
-rw-r--r--Tests/RunCMake/add_custom_command/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/add_custom_target/GeneratedProperty.cmake14
-rw-r--r--Tests/RunCMake/add_custom_target/RunCMakeTest.cmake1
18 files changed, 90 insertions, 82 deletions
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index 542a6fe..95465ce 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -174,6 +174,9 @@
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
+# elif defined(__ICCV850__)
+# define ARCHITECTURE_ID "V850"
+
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake
index e03ce3f..9ad1ba0 100644
--- a/Modules/Compiler/IAR-C.cmake
+++ b/Modules/Compiler/IAR-C.cmake
@@ -60,6 +60,11 @@ elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
__compiler_check_default_language_standard(C 1.10 90 5.10 99)
set(CMAKE_C_OUTPUT_EXTENSION ".r43")
+elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
+ __compiler_iar_xlink(C)
+ __compiler_check_default_language_standard(C 1.10 90 4.10 99)
+ set(CMAKE_C_OUTPUT_EXTENSION ".r85")
+
else()
message(FATAL_ERROR "CMAKE_C_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.")
endif()
diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake
index e8f1142..549d242 100644
--- a/Modules/Compiler/IAR-CXX.cmake
+++ b/Modules/Compiler/IAR-CXX.cmake
@@ -68,6 +68,10 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
__compiler_check_default_language_standard(CXX 5.10 98)
set(CMAKE_CXX_OUTPUT_EXTENSION ".r43")
+elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
+ __compiler_iar_xlink(CXX)
+ __compiler_check_default_language_standard(CXX 1.10 98)
+ set(CMAKE_C_OUTPUT_EXTENSION ".r85")
else()
message(FATAL_ERROR "CMAKE_CXX_COMPILER_ARCHITECTURE_ID not detected. This should be automatic." )
endif()
diff --git a/Modules/Compiler/IAR-DetermineCompiler.cmake b/Modules/Compiler/IAR-DetermineCompiler.cmake
index 57ca1c9..7e17778 100644
--- a/Modules/Compiler/IAR-DetermineCompiler.cmake
+++ b/Modules/Compiler/IAR-DetermineCompiler.cmake
@@ -31,7 +31,7 @@ set(_compiler_id_version_compute "
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000)
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000)
# define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__)
-# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__))
+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__))
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 100)
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@((__VER__) - (((__VER__) / 100)*100))
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__SUBVERSION__)
diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake
index b7d4664..6258cf3 100644
--- a/Modules/Compiler/IAR-FindBinUtils.cmake
+++ b/Modules/Compiler/IAR-FindBinUtils.cmake
@@ -45,7 +45,8 @@ set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
")
elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
+ "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430" OR
+ "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
# Find the "xlink" linker and "xar" archiver:
find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints}
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 4c9af91..5162a44 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -214,7 +214,11 @@ function(_pkg_find_libs _prefix _no_cmake_path _no_cmake_environment_path)
NAMES ${_pkg_search}
${_find_opts})
mark_as_advanced(pkgcfg_lib_${_prefix}_${_pkg_search})
- list(APPEND _libs "${pkgcfg_lib_${_prefix}_${_pkg_search}}")
+ if(pkgcfg_lib_${_prefix}_${_pkg_search})
+ list(APPEND _libs "${pkgcfg_lib_${_prefix}_${_pkg_search}}")
+ else()
+ list(APPEND _libs ${_pkg_search})
+ endif()
endforeach()
set(${_prefix}_LINK_LIBRARIES "${_libs}" PARENT_SCOPE)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 2aef888..1e0721f 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 15)
-set(CMake_VERSION_PATCH 20190916)
+set(CMake_VERSION_PATCH 20190918)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index caea510..ec5c1a7 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -127,7 +127,7 @@ bool cmAddCustomTargetCommand(std::vector<std::string> const& args,
}
filename += copy;
cmSystemTools::ConvertToUnixSlashes(filename);
- byproducts.push_back(filename);
+ byproducts.push_back(cmSystemTools::CollapseFullPath(filename));
} break;
case doing_depends: {
std::string dep = copy;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 88d03f9..f35b999 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -15,6 +15,8 @@
#include <sstream>
#include <utility>
+#include "cm_memory.hxx"
+
#include "cmAlgorithms.h"
#include "cmCommandArgumentParserHelper.h"
#include "cmCustomCommand.h"
@@ -1026,7 +1028,7 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput(
depends2.push_back(main_dependency);
}
- cmCustomCommand* cc = new cmCustomCommand(
+ std::unique_ptr<cmCustomCommand> cc = cm::make_unique<cmCustomCommand>(
this, outputs, byproducts, depends2, commandLines, comment, workingDir);
cc->SetEscapeOldStyle(escapeOldStyle);
cc->SetEscapeAllowMakeVars(true);
@@ -1035,7 +1037,7 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput(
cc->SetCommandExpandLists(command_expand_lists);
cc->SetDepfile(depfile);
cc->SetJobPool(job_pool);
- file->SetCustomCommand(cc);
+ file->SetCustomCommand(std::move(cc));
this->UpdateOutputToSourceMap(outputs, file, false);
this->UpdateOutputToSourceMap(byproducts, file, true);
}
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 4deb94a..3344217 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -5,7 +5,6 @@
#include <array>
#include <utility>
-#include "cmCustomCommand.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -21,11 +20,6 @@ cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name,
{
}
-cmSourceFile::~cmSourceFile()
-{
- this->SetCustomCommand(nullptr);
-}
-
std::string const& cmSourceFile::GetExtension() const
{
return this->Extension;
@@ -320,19 +314,12 @@ bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const
return cmIsOn(this->GetProperty(prop));
}
-cmCustomCommand* cmSourceFile::GetCustomCommand()
-{
- return this->CustomCommand;
-}
-
-cmCustomCommand const* cmSourceFile::GetCustomCommand() const
+cmCustomCommand* cmSourceFile::GetCustomCommand() const
{
- return this->CustomCommand;
+ return this->CustomCommand.get();
}
-void cmSourceFile::SetCustomCommand(cmCustomCommand* cc)
+void cmSourceFile::SetCustomCommand(std::unique_ptr<cmCustomCommand> cc)
{
- cmCustomCommand* old = this->CustomCommand;
- this->CustomCommand = cc;
- delete old;
+ this->CustomCommand = std::move(cc);
}
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 774cb28..dd36d45 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -5,14 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmCustomCommand.h"
#include "cmPropertyMap.h"
#include "cmSourceFileLocation.h"
#include "cmSourceFileLocationKind.h"
+#include <memory>
#include <string>
#include <vector>
-class cmCustomCommand;
class cmMakefile;
/** \class cmSourceFile
@@ -32,17 +33,11 @@ public:
cmMakefile* mf, const std::string& name,
cmSourceFileLocationKind kind = cmSourceFileLocationKind::Ambiguous);
- ~cmSourceFile();
-
- cmSourceFile(const cmSourceFile&) = delete;
- cmSourceFile& operator=(const cmSourceFile&) = delete;
-
/**
- * Get the list of the custom commands for this source file
+ * Get the custom command for this source file
*/
- cmCustomCommand* GetCustomCommand();
- cmCustomCommand const* GetCustomCommand() const;
- void SetCustomCommand(cmCustomCommand* cc);
+ cmCustomCommand* GetCustomCommand() const;
+ void SetCustomCommand(std::unique_ptr<cmCustomCommand> cc);
//! Set/Get a property of this source file
void SetProperty(const std::string& prop, const char* value);
@@ -114,7 +109,7 @@ public:
private:
cmSourceFileLocation Location;
cmPropertyMap Properties;
- cmCustomCommand* CustomCommand = nullptr;
+ std::unique_ptr<cmCustomCommand> CustomCommand;
std::string Extension;
std::string Language;
std::string FullPath;
diff --git a/Tests/CustomCommandByproducts/CMakeLists.txt b/Tests/CustomCommandByproducts/CMakeLists.txt
index bfa69ce..08c897c 100644
--- a/Tests/CustomCommandByproducts/CMakeLists.txt
+++ b/Tests/CustomCommandByproducts/CMakeLists.txt
@@ -14,20 +14,20 @@ add_custom_command(
# Generate a byproduct in a rule that runs in a dependency of the consumer.
add_custom_command(
- OUTPUT timestamp2.txt
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/timestamp2.txt
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/byproduct2.c.in byproduct2.c
- BYPRODUCTS byproduct2.c
+ BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/byproduct2.c
COMMAND ${CMAKE_COMMAND} -E touch timestamp2.txt
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/byproduct2.c.in
)
-add_custom_target(Producer2 DEPENDS timestamp2.txt)
+add_custom_target(Producer2 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/timestamp2.txt)
# Generate a byproduct in a custom target.
add_custom_target(Producer3_4
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/byproduct3.c.in byproduct3.c
- BYPRODUCTS byproduct3.c
+ BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/byproduct3.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/byproduct3.c.in
)
@@ -36,7 +36,7 @@ add_custom_command(
TARGET Producer3_4 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/byproduct4.c.in byproduct4.c
- BYPRODUCTS byproduct4.c
+ BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/byproduct4.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/byproduct4.c.in
)
diff --git a/Tests/FindEnvModules/EnvModules.cmake b/Tests/FindEnvModules/EnvModules.cmake
index 0c81bf2..21b0042 100644
--- a/Tests/FindEnvModules/EnvModules.cmake
+++ b/Tests/FindEnvModules/EnvModules.cmake
@@ -18,18 +18,16 @@ if(avail_mods)
message("module list")
env_module_list(loaded_mods)
+ set(mod0_found FALSE)
foreach(mod IN LISTS loaded_mods)
message(" ${mod}")
+ if(NOT mod0_found AND mod MATCHES "^${mod0}")
+ set(mod0_found ${mod})
+ endif()
endforeach()
- list(LENGTH loaded_mods num_loaded_mods)
- message("Number of modules loaded: ${num_loaded_mods}")
- if(NOT num_loaded_mods EQUAL 1)
- message(FATAL_ERROR "Exactly 1 module should be loaded. Found ${num_loaded_mods}")
- endif()
-
- list(GET loaded_mods 0 mod0_actual)
- if(NOT (mod0_actual MATCHES "^${mod0}"))
- message(FATAL_ERROR "Loaded module does not match ${mod0}. Actual: ${mod0_actual}")
+ if(NOT mod0_found)
+ message(FATAL_ERROR "Requested module ${mod0} not found in loaded modules")
endif()
+ message("module ${mod0} found loaded as ${mod0_found}")
endif()
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
index e82b05f..62bb5de 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
@@ -39,7 +39,7 @@ foreach(i 1 2)
"Name: CMakeInternalFakePackage${i}
Description: Dummy package (${i}) for FindPkgConfig IMPORTED_TARGET test
Version: 1.2.3
-Libs: -l${pname}
+Libs: -l${pname} -l${pname}-doesnotexist
")
endforeach()
@@ -47,27 +47,6 @@ endforeach()
# the import target find_library() calls handle the NO...PATH options correctly
set(ENV{PKG_CONFIG_PATH} ${fakePkgDir}/lib/pkgconfig)
-# Confirm correct behavior of NO_CMAKE_PATH, ensuring we only find the library
-# for the imported target if we have both set CMAKE_PREFIX_PATH and have not
-# given the NO_CMAKE_PATH option
-unset(CMAKE_PREFIX_PATH)
-unset(ENV{CMAKE_PREFIX_PATH})
-pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET cmakeinternalfakepackage1)
-if (TARGET PkgConfig::FakePackage1)
- message(FATAL_ERROR "Have import target for fake package 1 with no path prefix")
-endif()
-
-set(CMAKE_PREFIX_PATH ${fakePkgDir})
-pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET NO_CMAKE_PATH cmakeinternalfakepackage1)
-if (TARGET PkgConfig::FakePackage1)
- message(FATAL_ERROR "Have import target for fake package 1 with ignored cmake path")
-endif()
-
-pkg_check_modules(FakePackage1 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage1)
-if (NOT TARGET PkgConfig::FakePackage1)
- message(FATAL_ERROR "No import target for fake package 1 with prefix path")
-endif()
-
# find targets in subdir and check their visibility
add_subdirectory(target_subdir)
if (TARGET PkgConfig::FakePackage1_dir)
@@ -82,31 +61,35 @@ endif()
# combination
unset(CMAKE_PREFIX_PATH)
unset(ENV{CMAKE_PREFIX_PATH})
-pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET cmakeinternalfakepackage2)
-if (TARGET PkgConfig::FakePackage2)
- message(FATAL_ERROR "Have import target for fake package 2 with no path prefix")
-endif()
-
set(ENV{CMAKE_PREFIX_PATH} ${fakePkgDir})
-pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET NO_CMAKE_ENVIRONMENT_PATH cmakeinternalfakepackage2)
-if (TARGET PkgConfig::FakePackage2)
- message(FATAL_ERROR "Have import target for fake package 2 with ignored cmake path")
-endif()
pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage2)
if (NOT TARGET PkgConfig::FakePackage2)
message(FATAL_ERROR "No import target for fake package 2 with prefix path")
endif()
+# check that 2 library entries exist
+list(LENGTH FakePackage2_LINK_LIBRARIES fp2_nlibs)
+if (NOT fp2_nlibs EQUAL 2)
+ message(FATAL_ERROR "FakePackage2_LINK_LIBRARIES has ${fp2_nlibs} entries but should have exactly 2")
+endif()
+
# check that the full library path is also returned
-if (NOT FakePackage2_LINK_LIBRARIES STREQUAL "${fakePkgDir}/lib/libcmakeinternalfakepackage2.a")
+list(GET FakePackage2_LINK_LIBRARIES 0 fp2_lib0)
+if (NOT fp2_lib0 STREQUAL "${fakePkgDir}/lib/libcmakeinternalfakepackage2.a")
+ message(FATAL_ERROR "FakePackage2_LINK_LIBRARIES has bad content on first run: ${FakePackage2_LINK_LIBRARIES}")
+endif()
+
+# check that the library that couldn't be found still shows up
+list(GET FakePackage2_LINK_LIBRARIES 1 fp2_lib1)
+if (NOT fp2_lib1 STREQUAL "cmakeinternalfakepackage2-doesnotexist")
message(FATAL_ERROR "FakePackage2_LINK_LIBRARIES has bad content on first run: ${FakePackage2_LINK_LIBRARIES}")
endif()
# the information in *_LINK_LIBRARIES is not cached, so ensure is also is present on second run
unset(FakePackage2_LINK_LIBRARIES)
pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage2)
-if (NOT FakePackage2_LINK_LIBRARIES STREQUAL "${fakePkgDir}/lib/libcmakeinternalfakepackage2.a")
+if (NOT FakePackage2_LINK_LIBRARIES STREQUAL "${fakePkgDir}/lib/libcmakeinternalfakepackage2.a;cmakeinternalfakepackage2-doesnotexist")
message(FATAL_ERROR "FakePackage2_LINK_LIBRARIES has bad content on second run: ${FakePackage2_LINK_LIBRARIES}")
endif()
diff --git a/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake b/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake
new file mode 100644
index 0000000..628134b
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake
@@ -0,0 +1,10 @@
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a"
+ BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/b"
+ COMMAND c
+ )
+get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED)
+get_source_file_property(GENERATED_B "${CMAKE_CURRENT_BINARY_DIR}/b" GENERATED)
+if(NOT GENERATED_A OR NOT GENERATED_B)
+ message(FATAL_ERROR "failed")
+endif()
diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
index 0387dbb..20097b7 100644
--- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
@@ -3,6 +3,7 @@ include(RunCMake)
run_cmake(AppendNoOutput)
run_cmake(AppendNotOutput)
run_cmake(BadArgument)
+run_cmake(GeneratedProperty)
run_cmake(NoArguments)
run_cmake(NoOutputOrTarget)
run_cmake(OutputAndTarget)
diff --git a/Tests/RunCMake/add_custom_target/GeneratedProperty.cmake b/Tests/RunCMake/add_custom_target/GeneratedProperty.cmake
new file mode 100644
index 0000000..d034534
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/GeneratedProperty.cmake
@@ -0,0 +1,14 @@
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a"
+ COMMAND b
+ )
+add_custom_target(CollapseFullPath
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/a"
+ BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/c"
+ COMMAND d
+ )
+get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED)
+get_source_file_property(GENERATED_C "${CMAKE_CURRENT_BINARY_DIR}/c" GENERATED)
+if(NOT GENERATED_A OR NOT GENERATED_C)
+ message(FATAL_ERROR "failed")
+endif()
diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
index 2caed03..d80ca19 100644
--- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
include(RunCMake)
run_cmake(CommandExpandsEmpty)
+run_cmake(GeneratedProperty)
run_cmake(NoArguments)
run_cmake(BadTargetName)
run_cmake(ByproductsNoCommand)