summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-09 14:29:02 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-09 14:29:02 (GMT)
commitad9f0d831e6522d9606bab7ae08559cebeed83ce (patch)
treed85ba309d378fac37063e7b05fc624e60a819a64 /Tests
parent6aad93f407f341fae1afb80ebeab532451c39458 (diff)
parentb633b263082ae2c74a030aefb9048b0a20098b61 (diff)
downloadCMake-ad9f0d831e6522d9606bab7ae08559cebeed83ce.zip
CMake-ad9f0d831e6522d9606bab7ae08559cebeed83ce.tar.gz
CMake-ad9f0d831e6522d9606bab7ae08559cebeed83ce.tar.bz2
Merge topic 'dev/string-apis'
b633b263 CPackWiX: Fix test to build with expected config 191f25e2 stringapi: Prevent a NULL dereference in WiX 219d6ad6 speedup: Avoid excess iterator dereferences caaad357 speedup: Cache strings for comparisons 7abf4e31 stringapi: Use strings for dependency information 94fc63e2 stringapi: Use strings for cache iterator values 85fc9f26 stringapi: Command names 6557382d stringapi: Use strings for program paths 1a1b737c stringapi: Use strings for generator names 24b5e93d stringapi: Use strings for directories 11ed3e2c stringapi: Add string overload for the Def struct b3bf31a5 stringapi: Miscellaneous char* parameters 5af95c39 typo: Match argument name with the header 2b17626e stringapi: Pass strings as install directories in CPack 3def29da stringapi: Use strings for feature arguments acb116e3 stringapi: Return a string reference for the configuration ...
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx8
-rw-r--r--Tests/CMakeLists.txt2
-rw-r--r--Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake5
3 files changed, 11 insertions, 4 deletions
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx
index dc1ce24..279bcd5 100644
--- a/Tests/CMakeLib/run_compile_commands.cxx
+++ b/Tests/CMakeLib/run_compile_commands.cxx
@@ -2,14 +2,14 @@
class CompileCommandParser {
public:
- class CommandType: public std::map<cmStdString, cmStdString>
+ class CommandType: public std::map<std::string, std::string>
{
public:
- cmStdString const& at(cmStdString const& k) const
+ std::string const& at(std::string const& k) const
{
const_iterator i = this->find(k);
if(i != this->end()) { return i->second; }
- static cmStdString emptyString;
+ static std::string emptyString;
return emptyString;
}
};
@@ -127,7 +127,7 @@ int main ()
it = parser.GetTranslationUnits().begin(),
end = parser.GetTranslationUnits().end(); it != end; ++it)
{
- std::vector<cmStdString> command;
+ std::vector<std::string> command;
cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command);
if (!cmSystemTools::RunSingleCommand(
command, 0, 0, it->at("directory").c_str()))
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index ea04911..726e790 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -829,6 +829,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
if(WIX_LIGHT_EXECUTABLE)
add_test(CPackWiXGenerator ${CMAKE_CTEST_COMMAND}
+ -C \${CTEST_CONFIGURATION_TYPE}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator"
"${CMake_BINARY_DIR}/Tests/CPackWiXGenerator"
@@ -837,6 +838,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-options ${build_options}
--test-command ${CMAKE_CMAKE_COMMAND}
"-DCPackWiXGenerator_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackWiXGenerator"
+ "-Dconfig=\${CTEST_CONFIGURATION_TYPE}"
-P "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake")
endif()
endif()
diff --git a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake
index 30e33cf2..ca9fd90 100644
--- a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake
+++ b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake
@@ -10,7 +10,12 @@ message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")
message(STATUS "CMAKE_CPACK_COMMAND: ${CMAKE_CPACK_COMMAND}")
message(STATUS "CPackWiXGenerator_BINARY_DIR: ${CPackWiXGenerator_BINARY_DIR}")
+if(config)
+ set(_C_config -C ${config})
+endif()
+
execute_process(COMMAND "${CMAKE_CPACK_COMMAND}"
+ ${_C_config}
RESULT_VARIABLE CPack_result
OUTPUT_VARIABLE CPack_output
ERROR_VARIABLE CPack_error