File tree Expand file tree Collapse file tree 2 files changed +20
-13
lines changed
Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -18,24 +18,26 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
1818 set (CMAKE_CXX_FLAGS "-O3 -ftree-vectorize -fopt-info-vec -march=native -funroll-loops -ffast-math" )
1919endif ()
2020
21- function (add_benchmark_executable target sources )
22- if (ENABLE_EDG)
23- add_edg_executable (${target} ${sources} )
24- else ()
25- add_executable (${target} ${sources} )
26- endif ()
27- endfunction ()
28-
2921# Detect if build dir contains "vtune"
3022get_filename_component (BUILD_DIR_NAME ${CMAKE_BINARY_DIR} NAME )
3123string (FIND "${BUILD_DIR_NAME} " "vtune" VTUNE_DIR_POS)
3224if (VTUNE_DIR_POS GREATER -1)
33- message (STATUS "VTune build detected (debug symbols enabled)" )
34- add_compile_options (-g )
25+ if (NOT ENABLE_EDG)
26+ message (STATUS "VTune build detected (debug symbols enabled)" )
27+ add_compile_options (-g ) # Need to add this to EDG_C_TO_OBJ_DEFAULT_OPTIONS instead of CMAKE_CXX_FLAGS
28+ endif ()
3529else ()
3630 message (STATUS "Release build (no debug symbols)" )
3731endif ()
3832
33+ function (add_benchmark_executable target sources )
34+ if (ENABLE_EDG)
35+ add_edg_executable (${target} ${sources} )
36+ else ()
37+ add_executable (${target} ${sources} )
38+ endif ()
39+ endfunction ()
40+
3941find_package (benchmark REQUIRED )
4042find_package (Boost REQUIRED )
4143find_package (Eigen3 REQUIRED NO_MODULE )
Original file line number Diff line number Diff line change @@ -9,13 +9,18 @@ message(STATUS "Linking EDG versions with ${EDG_LINKER}")
99set (CMAKE_DEPFILE_FLAGS_CXX "" )
1010message (STATUS "CMAKE_DEPFILE_FLAGS_CXX: ${CMAKE_DEPFILE_FLAGS_CXX} " )
1111
12- set (EDG_CPFE_DEFAULT_OPTIONS --g++ --set_flag=reflection --c++26 --gnu 140200 -tlocal --no_strict_gnu --no_char8_t
13- )
12+ set (EDG_CPFE_DEFAULT_OPTIONS --g++ --set_flag=reflection --c++26 --gnu 140200 -tlocal --no_strict_gnu --no_char8_t)
1413set (EDG_DEFAULT_DEFINES __CHAR_BIT__=8 _POSIX_SOURCE)
14+ set (EDG_C_TO_OBJ_LIBRARIES -shared-libgcc -lstdc++ -lgcc_s -lpthread -lm)
15+
1516set (EDG_C_TO_OBJ_DEFAULT_OPTIONS -Dsetjmp=_setjmp -Dva_copy=__va_copy -falign-functions=4 -march=skylake
1617 ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER} } ${CMAKE_CXX_FLAGS} )
18+ if (VTUNE_DIR_POS GREATER -1)
19+ message (STATUS "VTune build detected (debug symbols enabled)" )
20+ list (APPEND EDG_C_TO_OBJ_DEFAULT_OPTIONS -g)
21+ endif ()
1722separate_arguments (EDG_C_TO_OBJ_DEFAULT_OPTIONS )
18- set (EDG_C_TO_OBJ_LIBRARIES -shared-libgcc -lstdc++ -lgcc_s -lpthread -lm)
23+
1924
2025#### Get paths to includes and libraries ####
2126
You can’t perform that action at this time.
0 commit comments