File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ std::string join(const std::vector<std::string> &elements,
18
18
19
19
CodSpeed::CodSpeed () : is_instrumented(measurement_is_instrumented()) {
20
20
if (!is_instrumented) {
21
- std::cout
21
+ std::cerr
22
22
<< " NOTICE: codspeed is enabled, but no performance measurement will "
23
23
" be made since it's running in an unknown environment."
24
24
<< std::endl;
@@ -48,6 +48,6 @@ void CodSpeed::end_benchmark() {
48
48
std::string action_str = is_instrumented ? " Measured" : " Checked" ;
49
49
std::string group_str =
50
50
group_stack.empty () ? " " : " (group: " + join (group_stack, " /" ) + " )" ;
51
- std::cout << action_str << " : " << current_benchmark << group_str
51
+ std::cerr << action_str << " : " << current_benchmark << group_str
52
52
<< std::endl;
53
53
}
Original file line number Diff line number Diff line change 38
38
buildInputs =
39
39
with pkgs ;
40
40
[
41
- cmake-language-server
41
+ gersemi
42
42
clang-tools
43
43
]
44
44
++ commonBuildInputs ;
Original file line number Diff line number Diff line change @@ -4,8 +4,19 @@ execute_process(
4
4
COMMAND git rev-parse --show-toplevel
5
5
OUTPUT_VARIABLE GIT_ROOT_DIR
6
6
OUTPUT_STRIP_TRAILING_WHITESPACE
7
+ RESULT_VARIABLE GIT_COMMAND_RESULT
7
8
)
8
9
10
+ if (NOT GIT_COMMAND_RESULT EQUAL 0)
11
+ message (
12
+ WARNING
13
+ "Failed to determine the git root directory.\
14
+ Check that git is in your PATH, and that you are in a git repository.\
15
+ Continuing, but Codspeed features will not be useable"
16
+ )
17
+ set (GIT_ROOT_DIR ${CMAKE_SOURCE_DIR} )
18
+ endif ()
19
+
9
20
target_compile_definitions (
10
21
codspeed
11
22
INTERFACE -DCODSPEED_GIT_ROOT_DIR="${GIT_ROOT_DIR} "
@@ -21,14 +32,11 @@ if(DEFINED CODSPEED_MODE)
21
32
elseif (CODSPEED_MODE STREQUAL "walltime" )
22
33
target_compile_definitions (codspeed INTERFACE -DCODSPEED_WALLTIME)
23
34
else ()
24
- # Step 3: Default to "instrumentation" if no value is provided
25
- set (CODSPEED_MODE "instrumentation" )
26
- endif ()
27
- endif ()
28
35
message (
29
36
FATAL_ERROR
30
37
"Invalid build mode: ${CODSPEED_MODE} . Use 'instrumentation' or 'walltime'."
31
38
)
32
- if (CODSPEED_MODE STREQUAL "instrumentation" )
33
- target_compile_definitions (codspeed INTERFACE -DCODSPEED_INSTRUMENTATION)
34
- elseif (CODSPEED_MODE STREQUAL "walltime" )
39
+ endif ()
40
+ endif ()
41
+
42
+ message (STATUS "Build mode set to: ${CODSPEED_MODE} " )
You can’t perform that action at this time.
0 commit comments