This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via e6ddb57479a3620c712719c120a7337a84470d21 (commit) via 14fb0f3967f625264768dc9005e0b3e9191bd6d7 (commit) via e82e4b03418e13c7e9d7062d81ba6510fd66be9b (commit) via bd5006e8134a3ea5d949f9eedf139126af357820 (commit) via 3b409643bd0f69d38d91bba6b64250e48b276398 (commit) via 8c83f39a90b98a65a067813db1841ebcd6e0a400 (commit) via 445ff5ccdf7f888b48d12076fb42ca856482779f (commit) from 42a20ef79b86090b65de9836158db2a59c837e69 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6ddb57479a3620c712719c120a7337a84470d21 commit e6ddb57479a3620c712719c120a7337a84470d21 Merge: 14fb0f3 3b40964 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Sep 17 15:11:55 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Sep 17 11:12:08 2019 -0400 Merge topic 'byproduct-collapse-full-path' 3b409643bd Byproducts: Add test for collapsing of full paths in byproducts 445ff5ccdf Byproducts: collapse full paths of custom target byproducts Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3804 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14fb0f3967f625264768dc9005e0b3e9191bd6d7 commit 14fb0f3967f625264768dc9005e0b3e9191bd6d7 Merge: e82e4b0 8c83f39 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Sep 17 15:10:08 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Sep 17 11:11:06 2019 -0400 Merge topic 'smart_ptr/cmSourceFile' 8c83f39a90 cmSourceFile: use unique_ptr for CustomCommand Acked-by: Kitware Robot <kwro...@kitware.com> Acked-by: Kyle Edwards <kyle.edwa...@kitware.com> Merge-request: !3815 diff --cc Source/cmMakefile.cxx index 88d03f9,6961e8e..f35b999 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@@ -13,8 -10,13 +13,10 @@@ #include <iterator> #include <memory> #include <sstream> -#include <stdio.h> -#include <stdlib.h> #include <utility> + #include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCommandArgumentParserHelper.h" #include "cmCustomCommand.h" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e82e4b03418e13c7e9d7062d81ba6510fd66be9b commit e82e4b03418e13c7e9d7062d81ba6510fd66be9b Merge: 42a20ef bd5006e Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Sep 17 15:09:35 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Sep 17 11:09:56 2019 -0400 Merge topic 'iar-v850' bd5006e813 IAR: Add v850 support Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3821 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd5006e8134a3ea5d949f9eedf139126af357820 commit bd5006e8134a3ea5d949f9eedf139126af357820 Author: Nico Mueller <nicomueller1...@googlemail.com> AuthorDate: Mon Sep 16 10:45:03 2019 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 16 11:07:04 2019 -0400 IAR: Add v850 support Add compiler identification for V850. Issue: #17264 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} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b409643bd0f69d38d91bba6b64250e48b276398 commit 3b409643bd0f69d38d91bba6b64250e48b276398 Author: Daniel Eiband <daniel.eib...@brainlab.com> AuthorDate: Mon Sep 16 10:24:24 2019 +0200 Commit: Daniel Eiband <daniel.eib...@brainlab.com> CommitDate: Mon Sep 16 10:24:24 2019 +0200 Byproducts: Add test for collapsing of full paths in byproducts Add test for collapsing of full paths in byproducts and additional tests for the GENERATED source file properties set by add_custom_command and add_custom_target with relative paths. 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/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) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c83f39a90b98a65a067813db1841ebcd6e0a400 commit 8c83f39a90b98a65a067813db1841ebcd6e0a400 Author: Tushar Maheshwari <tushar27...@gmail.com> AuthorDate: Wed Aug 28 21:36:21 2019 +0530 Commit: Tushar Maheshwari <tushar27...@gmail.com> CommitDate: Sat Sep 14 00:54:31 2019 +0530 cmSourceFile: use unique_ptr for CustomCommand diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9e64f97..6961e8e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -15,6 +15,8 @@ #include <stdlib.h> #include <utility> +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCommandArgumentParserHelper.h" #include "cmCustomCommand.h" @@ -1025,7 +1027,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); @@ -1033,7 +1035,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; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=445ff5ccdf7f888b48d12076fb42ca856482779f commit 445ff5ccdf7f888b48d12076fb42ca856482779f Author: Daniel Eiband <daniel.eib...@brainlab.com> AuthorDate: Wed Sep 11 11:22:40 2019 +0200 Commit: Daniel Eiband <daniel.eib...@brainlab.com> CommitDate: Fri Sep 13 18:09:23 2019 +0200 Byproducts: collapse full paths of custom target byproducts Collapse full paths of add_custom_target command byproducts for symmetry with byproducts passed to the add_custom_command command. 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; ----------------------------------------------------------------------- Summary of changes: Modules/CMakePlatformId.h.in | 3 +++ Modules/Compiler/IAR-C.cmake | 5 +++++ Modules/Compiler/IAR-CXX.cmake | 4 ++++ Modules/Compiler/IAR-DetermineCompiler.cmake | 2 +- Modules/Compiler/IAR-FindBinUtils.cmake | 3 ++- Source/cmAddCustomTargetCommand.cxx | 2 +- Source/cmMakefile.cxx | 6 ++++-- Source/cmSourceFile.cxx | 21 ++++----------------- Source/cmSourceFile.h | 17 ++++++----------- Tests/CustomCommandByproducts/CMakeLists.txt | 10 +++++----- .../add_custom_command/GeneratedProperty.cmake | 10 ++++++++++ .../RunCMake/add_custom_command/RunCMakeTest.cmake | 1 + .../add_custom_target/GeneratedProperty.cmake | 14 ++++++++++++++ Tests/RunCMake/add_custom_target/RunCMakeTest.cmake | 1 + 14 files changed, 61 insertions(+), 38 deletions(-) create mode 100644 Tests/RunCMake/add_custom_command/GeneratedProperty.cmake create mode 100644 Tests/RunCMake/add_custom_target/GeneratedProperty.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits