diff options
author | Oz Linden <oz@lindenlab.com> | 2018-09-05 18:07:35 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2018-09-05 18:07:35 -0400 |
commit | 49c483eeb350f3620f26ce933007c3d4e9f66d4f (patch) | |
tree | d14383281a926d7348f6775a0be5c0a79b4effaf /indra/cmake | |
parent | a906ccd478c4aad1780d1f6e9a4a7926ff8934fb (diff) |
add more block structure to TeamCity log output for components
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/00-Common.cmake | 21 | ||||
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 40fc706a99..24f6329d10 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -217,4 +217,25 @@ else (USESYSTEMLIBS) ) endif (USESYSTEMLIBS) +macro (buildscripts_block target_name) + # add custom commands to bracket a target build to make logs easier to read + + if (DEFINED ENV{TEAMCITY_BUILDCONF_NAME}) + add_custom_command(TARGET ${target_name} PRE_BUILD + COMMAND echo ARGS "##teamcity[blockOpened name='${target_name}']" VERBATIM + ) + add_custom_command(TARGET ${target_name} POST_BUILD + COMMAND echo ARGS "##teamcity[blockClosed name='${target_name}']" VERBATIM + ) + else (DEFINED ENV{TEAMCITY_BUILDCONF_NAME}) + add_custom_command(TARGET ${target_name} PRE_BUILD + COMMAND echo ARGS "################## START ${target_name}" VERBATIM + ) + add_custom_command(TARGET ${target_name} POST_BUILD + COMMAND echo ARGS "################## FINISH ${target_name}" VERBATIM + ) + endif (DEFINED ENV{TEAMCITY_BUILDCONF_NAME}) + +endmacro (buildscripts_block target_name) + endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 024bfe14a1..3b5bc0af7c 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -1,4 +1,5 @@ # -*- cmake -*- +include(00-Common) include(LLTestCommand) include(GoogleMock) include(Tut) @@ -104,6 +105,7 @@ INCLUDE(GoogleMock) # Setup target ADD_EXECUTABLE(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES}) + buildscripts_block(PROJECT_${project}_TEST_${name}) SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") # @@ -165,6 +167,7 @@ INCLUDE(GoogleMock) # Add the test runner target per-project # (replaces old _test_ok targets all over the place) ADD_CUSTOM_TARGET(${project}_tests ALL DEPENDS ${${project}_TEST_OUTPUT}) + buildscripts_block(${project}_tests) ADD_DEPENDENCIES(${project} ${project}_tests) ENDMACRO(LL_ADD_PROJECT_UNIT_TESTS) @@ -212,6 +215,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})") endif(TEST_DEBUG) ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) + buildscripts_block(INTEGRATION_TEST_${testname}) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}" |