Skip to content

Commit b0d63fc

Browse files
committed
spec results in folders
1 parent d0d2e9d commit b0d63fc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ endfunction(add_spec)
7070

7171
# Discover Specs
7272
function(discover_specs spec_folder)
73-
file(GLOB_RECURSE specs ${spec_folder}/*_spec.cpp)
73+
file(GLOB_RECURSE specs RELATIVE ${spec_folder} ${spec_folder}/*_spec.cpp)
7474

7575
if (${ARGC} GREATER 1)
7676
set(output_junit ${ARGV1})
@@ -79,8 +79,11 @@ function(discover_specs spec_folder)
7979
endif()
8080

8181
foreach(spec IN LISTS specs)
82+
cmake_path(GET spec STEM spec_name)
83+
cmake_path(GET spec PARENT_PATH spec_folder)
84+
8285
if (${output_junit})
83-
add_spec(${spec} "--output-junit;${CMAKE_CURRENT_BINARY_DIR}/results/${spec_name}.xml")
86+
add_spec(${spec} "--output-junit;${CMAKE_CURRENT_BINARY_DIR}/results/${spec_folder}/${spec_name}.xml")
8487
else()
8588
add_spec(${spec} "")
8689
endif()

0 commit comments

Comments
 (0)