File tree Expand file tree Collapse file tree 6 files changed +19
-7
lines changed Expand file tree Collapse file tree 6 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ endmacro()
5050macro (add_benchmark_target TARGET_NAME TARGET_DEPENDENCIES EXECUTABLE ARGS)
5151 find_program (GAWK gawk NO_CACHE)
5252 if (NOT GAWK)
53- message (WARNING "AWK tool is not forund : no benchmark reports will be composed by ${TARGET_NAME} ." )
53+ message (WARNING "AWK tool is not found : no benchmark reports will be composed by ${TARGET_NAME} ." )
5454 else ()
5555 message ("AWK tool to compose data reports by ${TARGET_NAME} : ${GAWK} " )
5656 find_file (TARGET_NAME_FILTER
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ class measurements {
5353 double computeRelError () {
5454 // Accumulate the total duration in microseconds using std::accumulate with a lambda function
5555 assert (0 != _time_intervals.size ());
56- auto total_duration = std::accumulate (
56+ unsigned long long total_duration = std::accumulate (
5757 _time_intervals.begin (),
5858 _time_intervals.end (),
59- 0 , // Start with 0 count
59+ 0ull , // Start with 0 count
6060 [](long long total, const std::pair<time_point, time_point>& interval) {
6161 // Compute the difference and add it to the total
6262 return total + std::chrono::duration_cast<std::chrono::microseconds>(
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ add_subdirectory(../../common/gui gui)
2626
2727target_link_libraries (seismic PUBLIC TBB::tbb Threads::Threads UI_LIB_seismic)
2828target_compile_options (seismic PRIVATE ${TBB_CXX_STD_FLAG} )
29+ if (MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
30+ target_compile_options (seismic PRIVATE /EHsc)
31+ endif ()
2932
3033if (EXAMPLES_UI_MODE STREQUAL "con" )
3134 target_compile_definitions (seismic PRIVATE _CONSOLE)
Original file line number Diff line number Diff line change @@ -63,9 +63,12 @@ add_subdirectory(../../common/gui gui)
6363
6464target_link_libraries (tachyon TBB::tbb Threads::Threads UI_LIB_tachyon)
6565target_compile_options (tachyon PRIVATE ${TBB_CXX_STD_FLAG} )
66-
67- if ( MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
66+ if ( MSVC )
67+ if ( CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
6868 target_compile_options (tachyon PRIVATE -D_CRT_SECURE_NO_WARNINGS)
69+ else ()
70+ target_compile_options (tachyon PRIVATE /EHsc)
71+ endif ()
6972endif ()
7073
7174set (EXECUTABLE "$<TARGET_FILE:tachyon>" )
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ add_executable(primes main.cpp primes.cpp)
2424
2525target_link_libraries (primes TBB::tbb Threads::Threads)
2626target_compile_options (primes PRIVATE ${TBB_CXX_STD_FLAG} )
27+ if (MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
28+ target_compile_options (primes PRIVATE /EHsc)
29+ endif ()
2730
2831set (EXECUTABLE "$<TARGET_FILE:primes>" )
2932set (ARGS "" )
Original file line number Diff line number Diff line change @@ -24,9 +24,12 @@ add_executable(sudoku sudoku.cpp)
2424
2525target_link_libraries (sudoku TBB::tbb Threads::Threads)
2626target_compile_options (sudoku PRIVATE ${TBB_CXX_STD_FLAG} )
27-
28- if ( MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
27+ if ( MSVC )
28+ if ( CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM)
2929 target_compile_options (sudoku PRIVATE -D_CRT_SECURE_NO_WARNINGS)
30+ else ()
31+ target_compile_options (sudoku PRIVATE /EHsc)
32+ endif ()
3033endif ()
3134
3235set (EXECUTABLE "$<TARGET_FILE:sudoku>" )
You can’t perform that action at this time.
0 commit comments