File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -72,19 +72,20 @@ endfunction(add_spec)
72
72
function (discover_specs spec_folder )
73
73
file (GLOB_RECURSE specs ${spec_folder} /*_spec.cpp )
74
74
75
- foreach (spec IN LISTS specs )
76
- add_spec (${spec} "" )
77
- endforeach ()
78
- endfunction (discover_specs )
79
-
80
- function (discover_specs_output_junit spec_folder )
81
- file (GLOB_RECURSE specs ${spec_folder} /*_spec.cpp )
75
+ if (${ARGC} GREATER 1 )
76
+ set (output_junit ${ARGV1} )
77
+ else ()
78
+ set (output_junit FALSE )
79
+ endif ()
82
80
83
81
foreach (spec IN LISTS specs )
84
- cmake_path (GET spec STEM spec_name )
85
- add_spec (${spec} "--output-junit;${CMAKE_CURRENT_BINARY_DIR} /results/${spec_name} .xml" )
82
+ if (${output_junit} )
83
+ add_spec (${spec} "--output-junit;${CMAKE_CURRENT_BINARY_DIR} /results/${spec_name} .xml" )
84
+ else ()
85
+ add_spec (${spec} "" )
86
+ endif ()
86
87
endforeach ()
87
- endfunction (discover_specs_output_junit )
88
+ endfunction ()
88
89
89
90
# OPTIONS
90
91
option (CPPSPEC_BUILD_TESTS "Build C++Spec tests" )
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ class BaseFormatter {
92
92
case Result::Status::Skipped:
93
93
return YELLOW;
94
94
}
95
+ return " " ; // Default to no color
95
96
}
96
97
97
98
const char * reset_color () { return color_output ? RESET : " " ; }
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
2
2
add_compile_options (-Wno-unused-parameter -Wno-missing-template-arg-list-after-template-kw -Wno-missing-template-keyword -Wno-unknown-warning-option )
3
3
endif ()
4
4
5
- discover_specs_output_junit (${CMAKE_CURRENT_SOURCE_DIR} )
5
+ discover_specs (${CMAKE_CURRENT_SOURCE_DIR} TRUE )
You can’t perform that action at this time.
0 commit comments