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, next has been updated via 5755af3f986fe8553afc1bc56509906d54551c8e (commit) via 84fd5cf5a2d6b7bf1c74962bd686df91200d28a3 (commit) from 7555b597ce38fb223c1d6cf1821eeb3065be3846 (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=5755af3f986fe8553afc1bc56509906d54551c8e commit 5755af3f986fe8553afc1bc56509906d54551c8e Merge: 7555b59 84fd5cf Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Apr 18 09:10:30 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Apr 18 09:10:30 2016 -0400 Merge topic 'fix-addtest-and-crosscompiling-emulator-to-work-globally' into next 84fd5cf5 Revert "TestGenerator: Fix CROSSCOMPILING_EMULATOR support." https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84fd5cf5a2d6b7bf1c74962bd686df91200d28a3 commit 84fd5cf5a2d6b7bf1c74962bd686df91200d28a3 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Apr 18 09:10:07 2016 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Apr 18 09:10:07 2016 -0400 Revert "TestGenerator: Fix CROSSCOMPILING_EMULATOR support." This reverts commit 78077d705000986decbd0282014c09b214461d45. diff --git a/Help/release/dev/fix-CROSSCOMPILING_EMULATOR-TestGenerator-support.rst b/Help/release/dev/fix-CROSSCOMPILING_EMULATOR-TestGenerator-support.rst deleted file mode 100644 index 5be2e27..0000000 --- a/Help/release/dev/fix-CROSSCOMPILING_EMULATOR-TestGenerator-support.rst +++ /dev/null @@ -1,6 +0,0 @@ -Fix CROSSCOMPILING_EMULATOR TestGenerator support -------------------------------------------------- - -If specified, emulator is now consistently added as a prefix -to :command:`add_test` test commands for built target system -executables. It works for tests added in a parent directory. diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 152d48a..b411f15 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -83,8 +83,6 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, // Get the test command line to be executed. std::vector<std::string> const& command = this->Test->GetCommand(); - const char * emulator = 0; - // Check whether the command executable is a target whose name is to // be translated. std::string exe = command[0]; @@ -95,45 +93,30 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, // Use the target file on disk. exe = target->GetFullPath(config); - // Lookup emulator - emulator = target->GetProperty("CROSSCOMPILING_EMULATOR"); - } - else - { - // Use the command name given. - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(exe.c_str()); - exe = cge->Evaluate(this->LG, config); - cmSystemTools::ConvertToUnixSlashes(exe); - - // Lookup emulator - for(std::set<cmGeneratorTarget*>::const_iterator ci = - cge->GetTargets().begin(); - ci != cge->GetTargets().end(); ++ci) + // Prepend with the emulator when cross compiling if required. + const char * emulator = + target->GetProperty("CROSSCOMPILING_EMULATOR"); + if (emulator != 0) { - target = (*ci); - emulator = target->GetProperty("CROSSCOMPILING_EMULATOR"); - if (emulator != 0) + std::vector<std::string> emulatorWithArgs; + cmSystemTools::ExpandListArgument(emulator, emulatorWithArgs); + std::string emulatorExe(emulatorWithArgs[0]); + cmSystemTools::ConvertToUnixSlashes(emulatorExe); + os << cmOutputConverter::EscapeForCMake(emulatorExe) << " "; + for(std::vector<std::string>::const_iterator ei = + emulatorWithArgs.begin()+1; + ei != emulatorWithArgs.end(); + ++ei) { - break; + os << cmOutputConverter::EscapeForCMake(*ei) << " "; } } } - - // Prepend with the emulator when cross compiling if required. - if (emulator != 0) + else { - std::vector<std::string> emulatorWithArgs; - cmSystemTools::ExpandListArgument(emulator, emulatorWithArgs); - std::string emulatorExe(emulatorWithArgs[0]); - cmSystemTools::ConvertToUnixSlashes(emulatorExe); - os << cmOutputConverter::EscapeForCMake(emulatorExe) << " "; - for(std::vector<std::string>::const_iterator ei = - emulatorWithArgs.begin()+1; - ei != emulatorWithArgs.end(); - ++ei) - { - os << cmOutputConverter::EscapeForCMake(*ei) << " "; - } + // Use the command name given. + exe = ge.Parse(exe.c_str())->Evaluate(this->LG, config); + cmSystemTools::ConvertToUnixSlashes(exe); } // Generate the command line with full escapes. diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake index 750fcbf..2dd6e85 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake +++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake @@ -14,6 +14,3 @@ endif() if(NOT testfile_contents MATCHES "add_test[(]UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex .+pseudo_emulator.+$") message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}") endif() -if(NOT testfile_contents MATCHES "add_test[(]UsesEmulatorWithExecTargetFromSubdirAddedWithGenex .+pseudo_emulator.+$") - message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}") -endif() diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake index 53a8544..b6eacf1 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake +++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake @@ -11,6 +11,3 @@ add_subdirectory(AddTest) add_test(NAME UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex COMMAND generated_exe_in_subdir_added_to_test_without_genex) - -add_test(NAME UsesEmulatorWithExecTargetFromSubdirAddedWithGenex - COMMAND $<TARGET_FILE:generated_exe_in_subdir_added_to_test_with_genex>) diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt index f3d11d5..a10a694 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt +++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt @@ -1,3 +1 @@ add_executable(generated_exe_in_subdir_added_to_test_without_genex ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src.cxx) - -add_executable(generated_exe_in_subdir_added_to_test_with_genex ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src.cxx) ----------------------------------------------------------------------- Summary of changes: ...OSSCOMPILING_EMULATOR-TestGenerator-support.rst | 6 --- Source/cmTestGenerator.cxx | 53 +++++++------------- .../CrosscompilingEmulator/AddTest-check.cmake | 3 -- .../RunCMake/CrosscompilingEmulator/AddTest.cmake | 3 -- .../CrosscompilingEmulator/AddTest/CMakeLists.txt | 2 - 5 files changed, 18 insertions(+), 49 deletions(-) delete mode 100644 Help/release/dev/fix-CROSSCOMPILING_EMULATOR-TestGenerator-support.rst hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits