summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/find_library.rst6
-rw-r--r--Help/manual/ctest.1.rst6
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmQtAutoGenerators.cxx61
-rw-r--r--Tests/CMakeLists.txt1
-rw-r--r--Tests/QtAutogen/CMakeLists.txt9
-rw-r--r--Tests/QtAutogen/generated.txt.in1
-rw-r--r--Tests/QtAutogen/generated_resource.qrc.in5
8 files changed, 64 insertions, 27 deletions
diff --git a/Help/command/find_library.rst b/Help/command/find_library.rst
index 09df688..e3dcd2b 100644
--- a/Help/command/find_library.rst
+++ b/Help/command/find_library.rst
@@ -34,6 +34,12 @@ default will consider one name at a time and search every directory
for it. The NAMES_PER_DIR option tells this command to consider one
directory at a time and search for all names in it.
+Each library name given to the ``NAMES`` option is first considered
+as a library file name and then considered with platform-specific
+prefixes (e.g. ``lib``) and suffixes (e.g. ``.so``). Therefore one
+may specify library file names such as ``libfoo.a`` directly.
+This can be used to locate static libraries on UNIX-like systems.
+
If the library found is a framework, then VAR will be set to the full
path to the framework <fullPath>/A.framework. When a full path to a
framework is used as a library, CMake will use a -framework A, and a
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 584786f..d0ac28d 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -48,7 +48,9 @@ Options
useful for debugging dashboard problems.
``--output-on-failure``
- Output anything outputted by the test program if the test should fail. This option can also be enabled by setting the environment variable CTEST_OUTPUT_ON_FAILURE
+ Output anything outputted by the test program if the test should fail.
+ This option can also be enabled by setting the environment variable
+ ``CTEST_OUTPUT_ON_FAILURE``.
``-F``
Enable failover.
@@ -62,7 +64,7 @@ Options
This option tells ctest to run the tests in parallel using given
number of jobs. This option can also be set by setting the
- environment variable CTEST_PARALLEL_LEVEL.
+ environment variable ``CTEST_PARALLEL_LEVEL``.
``-Q,--quiet``
Make ctest quiet.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 4394f24..439e8ea 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 2)
-set(CMake_VERSION_PATCH 20150421)
+set(CMake_VERSION_PATCH 20150422)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 1572dc1..1548c36 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -170,6 +170,17 @@ static std::string getAutogenTargetDir(cmTarget const* target)
return targetDir;
}
+static std::string cmQtAutoGeneratorsStripCR(std::string const& line)
+{
+ // Strip CR characters rcc may have printed (possibly more than one!).
+ std::string::size_type cr = line.find('\r');
+ if (cr != line.npos)
+ {
+ return line.substr(0, cr);
+ }
+ return line;
+}
+
std::string cmQtAutoGenerators::ListQt5RccInputs(cmSourceFile* sf,
cmTarget const* target,
std::vector<std::string>& depends)
@@ -186,54 +197,56 @@ std::string cmQtAutoGenerators::ListQt5RccInputs(cmSourceFile* sf,
command.push_back(absFile);
- std::string output;
+ std::string rccStdOut;
+ std::string rccStdErr;
int retVal = 0;
- bool result = cmSystemTools::RunSingleCommand(command, &output, &output,
- &retVal, 0,
- cmSystemTools::OUTPUT_NONE);
+ bool result = cmSystemTools::RunSingleCommand(
+ command, &rccStdOut, &rccStdErr,
+ &retVal, 0, cmSystemTools::OUTPUT_NONE);
if (!result || retVal)
{
std::cerr << "AUTOGEN: error: Rcc list process for " << sf->GetFullPath()
- << " failed:\n" << output << std::endl;
+ << " failed:\n" << rccStdOut << "\n" << rccStdErr << std::endl;
return std::string();
}
- std::istringstream ostr(output);
+ {
+ std::istringstream ostr(rccStdOut);
std::string oline;
while(std::getline(ostr, oline))
{
- // Strip CR characters rcc may have printed (possibly more than one!).
- std::string::size_type cr = oline.find('\r');
- if (cr != oline.npos)
+ oline = cmQtAutoGeneratorsStripCR(oline);
+ if(!oline.empty())
{
- oline = oline.substr(0, cr);
+ qrcEntries.push_back(oline);
}
+ }
+ }
- if (oline.empty())
- {
- // The output of rcc --list contains many empty lines.
- continue;
- }
- if (cmHasLiteralPrefix(oline, "RCC: Error in"))
+ {
+ std::istringstream estr(rccStdErr);
+ std::string eline;
+ while(std::getline(estr, eline))
+ {
+ eline = cmQtAutoGeneratorsStripCR(eline);
+ if (cmHasLiteralPrefix(eline, "RCC: Error in"))
{
static std::string searchString = "Cannot find file '";
- std::string::size_type pos = oline.find(searchString);
+ std::string::size_type pos = eline.find(searchString);
if (pos == std::string::npos)
{
std::cerr << "AUTOGEN: error: Rcc lists unparsable output "
- << oline << std::endl;
+ << eline << std::endl;
return std::string();
}
pos += searchString.length();
- std::string::size_type sz = oline.size() - pos - 1;
- qrcEntries.push_back(oline.substr(pos, sz));
- }
- else
- {
- qrcEntries.push_back(oline);
+ std::string::size_type sz = eline.size() - pos - 1;
+ qrcEntries.push_back(eline.substr(pos, sz));
}
}
+ }
+
depends.insert(depends.end(), qrcEntries.begin(), qrcEntries.end());
return cmJoin(qrcEntries, "@list_sep@");
}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 6abee25..eb4dd6b 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2692,6 +2692,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
ADD_TEST_MACRO(CTestTestSerialOrder ${CMAKE_CTEST_COMMAND}
--output-on-failure -C "\${CTestTest_CONFIG}")
+ set_property(TEST CTestTestSerialOrder PROPERTY ENVIRONMENT CTEST_PARALLEL_LEVEL=)
if(NOT BORLAND)
set(CTestLimitDashJ_CTEST_OPTIONS --force-new-ctest-process)
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index f76d11e..60b44fd 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -63,7 +63,15 @@ add_library(codeeditorLib STATIC codeeditor.cpp)
add_library(privateSlot OBJECT private_slot.cpp)
+configure_file(generated_resource.qrc.in generated_resource.qrc @ONLY)
+add_custom_command(
+ OUTPUT generated.txt
+ COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/generated.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/generated.txt"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/generated.txt.in"
+ )
+
add_custom_target(generate_moc_input
+ DEPENDS generated.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/myinterface.h.in" "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} -E rename "${CMAKE_CURRENT_BINARY_DIR}/myinterface.h.in" "${CMAKE_CURRENT_BINARY_DIR}/myinterface.h"
)
@@ -89,6 +97,7 @@ add_executable(QtAutogen main.cpp calwidget.cpp second_widget.cpp foo.cpp blub.c
multiplewidgets.cpp
xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>
test.qrc second_resource.qrc resourcetester.cpp generated.cpp ${debug_srcs}
+ ${CMAKE_CURRENT_BINARY_DIR}/generated_resource.qrc
)
set_property(TARGET QtAutogen APPEND PROPERTY AUTOGEN_TARGET_DEPENDS generate_moc_input "${CMAKE_CURRENT_BINARY_DIR}/myotherinterface.h")
diff --git a/Tests/QtAutogen/generated.txt.in b/Tests/QtAutogen/generated.txt.in
new file mode 100644
index 0000000..77507bb
--- /dev/null
+++ b/Tests/QtAutogen/generated.txt.in
@@ -0,0 +1 @@
+Some generated text file.
diff --git a/Tests/QtAutogen/generated_resource.qrc.in b/Tests/QtAutogen/generated_resource.qrc.in
new file mode 100644
index 0000000..da5fa62
--- /dev/null
+++ b/Tests/QtAutogen/generated_resource.qrc.in
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>generated.txt</file>
+</qresource>
+</RCC>