[Cmake-commits] CMake branch, next, updated. v3.2.1-1552-g3edfc7c

Brad King brad.king at kitware.com
Tue Apr 7 11:22:48 EDT 2015


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  3edfc7c8774e64a54b2222c8d52db3213eaf3248 (commit)
       via  53883968ce61d2a291811d91ca44eea51260b963 (commit)
      from  58bbc94bfd87cdd3fc15c8b08c568db5ef319f56 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3edfc7c8774e64a54b2222c8d52db3213eaf3248
commit 3edfc7c8774e64a54b2222c8d52db3213eaf3248
Merge: 58bbc94 5388396
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 7 11:22:47 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Apr 7 11:22:47 2015 -0400

    Merge topic 'emulator-property' into next
    
    53883968 Revert topic 'emulator-property'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53883968ce61d2a291811d91ca44eea51260b963
commit 53883968ce61d2a291811d91ca44eea51260b963
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 7 11:22:20 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 7 11:22:20 2015 -0400

    Revert topic 'emulator-property'
    
    It fails several tests and needs to be revised.

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index d5e2d60..1dff33e 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -113,7 +113,6 @@ Properties on Targets
    /prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
    /prop_tgt/CONFIG_OUTPUT_NAME
    /prop_tgt/CONFIG_POSTFIX
-   /prop_tgt/CROSSCOMPILING_EMULATOR
    /prop_tgt/CXX_EXTENSIONS
    /prop_tgt/CXX_STANDARD
    /prop_tgt/CXX_STANDARD_REQUIRED
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 63f704d..c342dbe 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -25,7 +25,6 @@ Variables that Provide Information
    /variable/CMAKE_CFG_INTDIR
    /variable/CMAKE_COMMAND
    /variable/CMAKE_CROSSCOMPILING
-   /variable/CMAKE_CROSSCOMPILING_EMULATOR
    /variable/CMAKE_CTEST_COMMAND
    /variable/CMAKE_CURRENT_BINARY_DIR
    /variable/CMAKE_CURRENT_LIST_DIR
diff --git a/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst b/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst
deleted file mode 100644
index 3ef8e03..0000000
--- a/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-CROSSCOMPILING_EMULATOR
------------------------
-
-Use the given emulator to run executables created when crosscompiling.  This
-command will be added as a prefix to :command:`add_test` test commands for
-built target system executables.
diff --git a/Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst b/Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst
deleted file mode 100644
index 95d2c7f..0000000
--- a/Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-CMAKE_CROSSCOMPILING_EMULATOR
------------------------------
-
-This variable is only used when :variable:`CMAKE_CROSSCOMPILING` is on. It
-should point to a command on the host system that can run executable built
-for the target system.
-
-The command will be used to run :command:`try_run` generated executables,
-which avoids manual population of the TryRunResults.cmake file.
-
-It is also used as the default value for the
-:prop_tgt:`CROSSCOMPILING_EMULATOR` target property of executables.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 85e5165..b3d1155 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -442,7 +442,6 @@ void cmTarget::SetMakefile(cmMakefile* mf)
   if(this->TargetTypeValue == cmTarget::EXECUTABLE)
     {
     this->SetPropertyDefault("ANDROID_GUI", 0);
-    this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", 0);
     }
   if(this->TargetTypeValue == cmTarget::SHARED_LIBRARY
       || this->TargetTypeValue == cmTarget::MODULE_LIBRARY)
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index add80fa..f87a535 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -82,31 +82,11 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
   // be translated.
   std::string exe = command[0];
   cmMakefile* mf = this->Test->GetMakefile();
-  cmLocalGenerator* lg = mf->GetLocalGenerator();
   cmTarget* target = mf->FindTargetToUse(exe);
   if(target && target->GetType() == cmTarget::EXECUTABLE)
     {
     // Use the target file on disk.
     exe = target->GetFullPath(config);
-
-    // Prepend with the emulator when cross compiling if required.
-    const char * 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 << lg->EscapeForCMake(emulatorExe) << " ";
-      for(std::vector<std::string>::const_iterator ei =
-          emulatorWithArgs.begin()+1;
-          ei != emulatorWithArgs.end();
-          ++ei)
-        {
-        os << lg->EscapeForCMake(*ei) << " ";
-        }
-      }
     }
   else
     {
@@ -116,6 +96,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
     }
 
   // Generate the command line with full escapes.
+  cmLocalGenerator* lg = mf->GetLocalGenerator();
   os << lg->EscapeForCMake(exe);
   for(std::vector<std::string>::const_iterator ci = command.begin()+1;
       ci != command.end(); ++ci)
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index 8b68d64..b5280cf 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -149,8 +149,7 @@ bool cmTryRunCommand
       {
       // "run" it and capture the output
       std::string runOutputContents;
-      if (this->Makefile->IsOn("CMAKE_CROSSCOMPILING") &&
-          !this->Makefile->IsDefinitionSet("CMAKE_CROSSCOMPILING_EMULATOR"))
+      if (this->Makefile->IsOn("CMAKE_CROSSCOMPILING"))
         {
         this->DoNotRunExecutable(runArgs,
                                  argv[3],
@@ -196,28 +195,7 @@ void cmTryRunCommand::RunExecutable(const std::string& runArgs,
                                     std::string* out)
 {
   int retVal = -1;
-
-  std::string finalCommand;
-  const std::string emulator =
-  this->Makefile->GetSafeDefinition("CMAKE_CROSSCOMPILING_EMULATOR");
-  if (!emulator.empty())
-    {
-    std::vector<std::string> emulatorWithArgs;
-    cmSystemTools::ExpandListArgument(emulator, emulatorWithArgs);
-    finalCommand += cmSystemTools::ConvertToRunCommandPath(
-                                 emulatorWithArgs[0].c_str());
-    finalCommand += " ";
-    for (std::vector<std::string>::const_iterator ei =
-         emulatorWithArgs.begin()+1;
-         ei != emulatorWithArgs.end(); ++ei)
-      {
-      finalCommand += "\"";
-      finalCommand += *ei;
-      finalCommand += "\"";
-      finalCommand += " ";
-      }
-    }
-  finalCommand += cmSystemTools::ConvertToRunCommandPath(
+  std::string finalCommand = cmSystemTools::ConvertToRunCommandPath(
                                this->OutputFile.c_str());
   if (!runArgs.empty())
     {
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 4bbb521..7b9c810 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -220,7 +220,3 @@ add_RunCMake_test(COMPILE_LANGUAGE-genex)
 if(CMake_TEST_FindMatlab)
   add_RunCMake_test(FindMatlab)
 endif()
-
-add_executable(pseudo_emulator pseudo_emulator.c)
-add_RunCMake_test(CrosscompilingEmulator
- -DPSEUDO_EMULATOR=$<TARGET_FILE:pseudo_emulator>)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
deleted file mode 100644
index 1ed8dd9..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-set(testfile "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake")
-if(EXISTS "${testfile}")
-  file(READ "${testfile}" testfile_contents)
-else()
-  message(FATAL_ERROR "Could not find expected CTestTestfile.cmake.")
-endif()
-if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator [^ ]+pseudo_emulator.+$")
-  message(SEND_ERROR "Used emulator when it should not be used.")
-endif()
-if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator [^ ]+pseudo_emulator.+$")
-  message(SEND_ERROR "Did not use emulator when it should be used.")
-endif()
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
deleted file mode 100644
index 41850f2..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-set(CMAKE_CROSSCOMPILING 1)
-enable_testing()
-add_test(NAME DoesNotUseEmulator
-  COMMAND ${CMAKE_COMMAND} -E echo "Hi")
-
-add_executable(generated_exe simple_src.cxx)
-add_test(NAME UsesEmulator
-  COMMAND generated_exe)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
deleted file mode 100644
index 2d75985..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 3.1)
-project(${RunCMake_TEST} CXX)
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake b/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
deleted file mode 100644
index 22d537c..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
-# This tests setting the CROSSCOMPILING_EMULATOR target property from the
-# CMAKE_CROSSCOMPILING_EMULATOR variable.
-
-# -DCMAKE_CROSSCOMPILING_EMULATOR=/path/to/pseudo_emulator is passed to this
-# test
-add_executable(target_with_emulator simple_src.cxx)
-get_property(emulator TARGET target_with_emulator
-             PROPERTY CROSSCOMPILING_EMULATOR)
-if(NOT "${emulator}" MATCHES "pseudo_emulator")
-  message(SEND_ERROR "Default CROSSCOMPILING_EMULATOR property not set")
-endif()
-
-set_property(TARGET target_with_emulator
-             PROPERTY CROSSCOMPILING_EMULATOR "another_emulator")
-get_property(emulator TARGET target_with_emulator
-             PROPERTY CROSSCOMPILING_EMULATOR)
-if(NOT "${emulator}" MATCHES "another_emulator")
-  message(SEND_ERROR
-    "set_property/get_property CROSSCOMPILING_EMULATOR is not consistent")
-endif()
-
-unset(CMAKE_CROSSCOMPILING_EMULATOR CACHE)
-add_executable(target_without_emulator simple_src.cxx)
-get_property(emulator TARGET target_without_emulator
-             PROPERTY CROSSCOMPILING_EMULATOR)
-if(NOT "${emulator}" STREQUAL "")
-  message(SEND_ERROR "Default CROSSCOMPILING_EMULATOR property not set to null")
-endif()
diff --git a/Tests/RunCMake/CrosscompilingEmulator/InitialCache.txt.in b/Tests/RunCMake/CrosscompilingEmulator/InitialCache.txt.in
deleted file mode 100644
index c95fd8b..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/InitialCache.txt.in
+++ /dev/null
@@ -1 +0,0 @@
-CMAKE_EMULATOR:STRING=@PSEUDO_EMULATOR@
diff --git a/Tests/RunCMake/CrosscompilingEmulator/RunCMakeTest.cmake b/Tests/RunCMake/CrosscompilingEmulator/RunCMakeTest.cmake
deleted file mode 100644
index 2581cfc..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/RunCMakeTest.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-include(RunCMake)
-
-set(RunCMake_TEST_OPTIONS
-    "-DCMAKE_CROSSCOMPILING_EMULATOR=${PSEUDO_EMULATOR}")
-
-run_cmake(CrosscompilingEmulatorProperty)
-run_cmake(TryRun)
-run_cmake(AddTest)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/TryRun-stdout.txt b/Tests/RunCMake/CrosscompilingEmulator/TryRun-stdout.txt
deleted file mode 100644
index d012974..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/TryRun-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-run_result: 42
diff --git a/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake b/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake
deleted file mode 100644
index 4851cc7..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-set(CMAKE_CROSSCOMPILING 1)
-
-try_run(run_result compile_result
-  ${CMAKE_CURRENT_BINARY_DIR}
-  ${CMAKE_CURRENT_SOURCE_DIR}/simple_src.cxx
-  RUN_OUTPUT_VARIABLE run_output)
-
-message(STATUS "run_output: ${run_output}")
-message(STATUS "run_result: ${run_result}")
-
-set(CMAKE_CROSSCOMPILING_EMULATOR ${CMAKE_CROSSCOMPILING_EMULATOR}
-  --flag
-  "multi arg")
-try_run(run_result compile_result
-  ${CMAKE_CURRENT_BINARY_DIR}
-  ${CMAKE_CURRENT_SOURCE_DIR}/simple_src.cxx
-  RUN_OUTPUT_VARIABLE run_output)
-message(STATUS "Emulator with arguments run_output: ${run_output}")
diff --git a/Tests/RunCMake/CrosscompilingEmulator/simple_src.cxx b/Tests/RunCMake/CrosscompilingEmulator/simple_src.cxx
deleted file mode 100644
index e5e94f2..0000000
--- a/Tests/RunCMake/CrosscompilingEmulator/simple_src.cxx
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(int, char **)
-{
-  return 13;
-}
diff --git a/Tests/RunCMake/pseudo_emulator.c b/Tests/RunCMake/pseudo_emulator.c
deleted file mode 100644
index 33be24c..0000000
--- a/Tests/RunCMake/pseudo_emulator.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char * argv[] )
-{
- printf("Command:");
- int ii;
- for(ii = 1; ii < argc; ++ii )
- {
- printf(" \"%s\"", argv[ii]);
- }
- printf("\n");
-
- return 42;
-}

-----------------------------------------------------------------------

Summary of changes:
 Help/manual/cmake-properties.7.rst                 |    1 -
 Help/manual/cmake-variables.7.rst                  |    1 -
 Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst          |    6 -----
 Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst    |   12 ---------
 Source/cmTarget.cxx                                |    1 -
 Source/cmTestGenerator.cxx                         |   21 +--------------
 Source/cmTryRunCommand.cxx                         |   26 ++----------------
 Tests/RunCMake/CMakeLists.txt                      |    4 ---
 .../CrosscompilingEmulator/AddTest-check.cmake     |   12 ---------
 .../RunCMake/CrosscompilingEmulator/AddTest.cmake  |    8 ------
 .../RunCMake/CrosscompilingEmulator/CMakeLists.txt |    3 ---
 .../CrosscompilingEmulatorProperty.cmake           |   28 --------------------
 .../CrosscompilingEmulator/InitialCache.txt.in     |    1 -
 .../CrosscompilingEmulator/RunCMakeTest.cmake      |    8 ------
 .../CrosscompilingEmulator/TryRun-stdout.txt       |    1 -
 Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake |   18 -------------
 .../RunCMake/CrosscompilingEmulator/simple_src.cxx |    4 ---
 Tests/RunCMake/pseudo_emulator.c                   |   14 ----------
 18 files changed, 3 insertions(+), 166 deletions(-)
 delete mode 100644 Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst
 delete mode 100644 Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/InitialCache.txt.in
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/RunCMakeTest.cmake
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/TryRun-stdout.txt
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake
 delete mode 100644 Tests/RunCMake/CrosscompilingEmulator/simple_src.cxx
 delete mode 100644 Tests/RunCMake/pseudo_emulator.c


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list