File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,19 +72,20 @@ endfunction(add_spec)
7272function (discover_specs spec_folder )
7373 file (GLOB_RECURSE specs ${spec_folder} /*_spec.cpp )
7474
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 ()
8280
8381 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 ()
8687 endforeach ()
87- endfunction (discover_specs_output_junit )
88+ endfunction ()
8889
8990# OPTIONS
9091option (CPPSPEC_BUILD_TESTS "Build C++Spec tests" )
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ class BaseFormatter {
9292 case Result::Status::Skipped:
9393 return YELLOW;
9494 }
95+ return " " ; // Default to no color
9596 }
9697
9798 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")
22 add_compile_options (-Wno-unused-parameter -Wno-missing-template-arg-list-after-template-kw -Wno-missing-template-keyword -Wno-unknown-warning-option )
33endif ()
44
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