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 376735330961be67cef3a0ccd9a3e9d377427860 (commit)
via bfbf0bc02d8e689eb71c15b9230e4b122080efdb (commit)
from a9dac6a3003102b33da94545a7469cf52b6c726e (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=376735330961be67cef3a0ccd9a3e9d377427860
commit 376735330961be67cef3a0ccd9a3e9d377427860
Merge: a9dac6a bfbf0bc
Author: Nils Gladitz <[email protected]>
AuthorDate: Fri Apr 3 12:06:42 2015 -0400
Commit: CMake Topic Stage <[email protected]>
CommitDate: Fri Apr 3 12:06:42 2015 -0400
Merge topic 'gcov-module-coverage-exclude' into next
bfbf0bc0 CTestCoverageCollectGCOV: Fix visual studio test issues
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bfbf0bc02d8e689eb71c15b9230e4b122080efdb
commit bfbf0bc02d8e689eb71c15b9230e4b122080efdb
Author: Nils Gladitz <[email protected]>
AuthorDate: Fri Apr 3 18:05:35 2015 +0200
Commit: Nils Gladitz <[email protected]>
CommitDate: Fri Apr 3 18:05:35 2015 +0200
CTestCoverageCollectGCOV: Fix visual studio test issues
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2a54648..d9988b2 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2345,6 +2345,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P
${CMake_SOURCE_DIR}/Utilities/Release
"${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake"
@ONLY ESCAPE_QUOTES)
add_test(CTestCoverageCollectGCOV ${CMAKE_CTEST_COMMAND}
+ -C \${CTEST_CONFIGURATION_TYPE}
-S "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake" -VV
--output-log
"${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/testOut.log"
)
diff --git a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
index a492fd3..ce6fac4 100644
--- a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
+++ b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt
@@ -4,21 +4,29 @@ project(TestProject CXX)
include(CTest)
-add_executable(myexecutable
+set(SOURCES
main.cpp
3rdparty/foo.cpp
extra/extra.cpp
)
+add_executable(myexecutable ${SOURCES})
+
set_property(SOURCE main.cpp APPEND PROPERTY LABELS SourceLabel)
set_property(TARGET myexecutable APPEND PROPERTY LABELS TargetLabel)
+set(MYEXECUTABLE_INFO_FILE
"${CMAKE_CURRENT_BINARY_DIR}/myexecutable_info.cmake")
+
+file(WRITE "${MYEXECUTABLE_INFO_FILE}" "
+ set(TARGET myexecutable)
+ set(SOURCE_DIR \"${CMAKE_CURRENT_SOURCE_DIR}\")
+ set(SOURCES \"${SOURCES}\")
+")
+
add_custom_command(TARGET myexecutable
POST_BUILD
- COMMAND ${CMAKE_COMMAND} -
- -DTARGET=myexecutable
- "-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
- "-DSOURCES=$<TARGET_PROPERTY:myexecutable,SOURCES>"
+ COMMAND ${CMAKE_COMMAND}
+ "-DINFO_FILE=${MYEXECUTABLE_INFO_FILE}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/fake_compile_time_gcno.cmake"
VERBATIM
)
diff --git
a/Tests/CTestCoverageCollectGCOV/TestProject/fake_compile_time_gcno.cmake
b/Tests/CTestCoverageCollectGCOV/TestProject/fake_compile_time_gcno.cmake
index 5c87589..881460b 100644
--- a/Tests/CTestCoverageCollectGCOV/TestProject/fake_compile_time_gcno.cmake
+++ b/Tests/CTestCoverageCollectGCOV/TestProject/fake_compile_time_gcno.cmake
@@ -1,3 +1,5 @@
+include("${INFO_FILE}")
+
foreach(source ${SOURCES})
file(WRITE "CMakeFiles/${TARGET}.dir/${source}.gcno"
"${SOURCE_DIR}/${source}"
diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in
b/Tests/CTestCoverageCollectGCOV/test.cmake.in
index c5613fb..29f7e7f 100644
--- a/Tests/CTestCoverageCollectGCOV/test.cmake.in
+++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in
@@ -27,16 +27,21 @@ ctest_coverage_collect_gcov(
GCOV_OPTIONS -P
"@CMake_SOURCE_DIR@/Tests/CTestCoverageCollectGCOV/fakegcov.cmake")
execute_process(COMMAND
- ${CMAKE_COMMAND} -E tar tf ${tar_file}
- OUTPUT_VARIABLE out
- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+ ${CMAKE_COMMAND} -E tar tf ${tar_file}
+ OUTPUT_VARIABLE out
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+string(REPLACE "\n" ";" out "${out}")
+list(SORT out)
set(expected_out
-"Testing/CoverageInfo/main.cpp.gcov
-Testing/CoverageInfo/extra.cpp.gcov
-Testing/CoverageInfo/data.json
-CMakeFiles/myexecutable.dir/Labels.json
-")
+ CMakeFiles/myexecutable.dir/Labels.json
+ Testing/CoverageInfo/data.json
+ Testing/CoverageInfo/extra.cpp.gcov
+ Testing/CoverageInfo/main.cpp.gcov
+)
if("${out}" STREQUAL "${expected_out}")
message("PASSED with correct output: ${out}")
-----------------------------------------------------------------------
Summary of changes:
Tests/CMakeLists.txt | 1 +
.../TestProject/CMakeLists.txt | 18 ++++++++++++-----
.../TestProject/fake_compile_time_gcno.cmake | 2 ++
Tests/CTestCoverageCollectGCOV/test.cmake.in | 21 ++++++++++++--------
4 files changed, 29 insertions(+), 13 deletions(-)
hooks/post-receive
--
CMake
_______________________________________________
Cmake-commits mailing list
[email protected]
http://public.kitware.com/mailman/listinfo/cmake-commits