File tree Expand file tree Collapse file tree 3 files changed +11
-14
lines changed
Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,24 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
88if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
99 set (CMAKE_CXX_FLAGS "-O3 -ftree-vectorize -Rpass-analysis=loop-vectorize -Rpass=loop-vectorize \
1010-Rpass-missed=loop-vectorize -march=native -funroll-loops -ffast-math -funsafe-math-optimizations" )
11- elseif (ENABLE_EDG )
11+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
1212 set (CMAKE_CXX_FLAGS "-O3 -ftree-vectorize -fopt-info-vec -march=native -funroll-loops -ffast-math \
13- -funsafe-math-optimizations --param inline-unit-growth=1000 --param large-stack-frame-growth=1000 \
14- --param large-function-growth=2000 --param max-inline-insns-single=1000 --param max-inline-insns-auto=1000 \
15- -flto -fopt-info-vec" )
13+ -funsafe-math-optimizations -fopt-info-vec" )
14+ endif ()
15+
16+ if (ENABLE_EDG)
17+ list (APPEND CMAKE_CXX_FLAGS "-flto" )
1618 include (edg_config.cmake )
17- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
18- set (CMAKE_CXX_FLAGS "-O3 -ftree-vectorize -fopt-info-vec -march=native -funroll-loops -ffast-math" )
1919endif ()
2020
2121# Detect if build dir contains "vtune"
2222get_filename_component (BUILD_DIR_NAME ${CMAKE_BINARY_DIR} NAME )
2323string (FIND "${BUILD_DIR_NAME} " "vtune" VTUNE_DIR_POS)
2424if (VTUNE_DIR_POS GREATER -1)
25- if (NOT ENABLE_EDG)
26- message (STATUS "VTune build detected (debug symbols enabled)" )
25+ message (STATUS "VTune build detected (debug symbols enabled)" )
26+ if (ENABLE_EDG)
27+ list (APPEND CMAKE_CXX_FLAGS "-g" )
28+ else ()
2729 add_compile_options (-g ) # Need to add this to EDG_C_TO_OBJ_DEFAULT_OPTIONS instead of CMAKE_CXX_FLAGS
2830 endif ()
2931else ()
Original file line number Diff line number Diff line change @@ -7,18 +7,13 @@ message(STATUS "Compiling EDG versions with ${CMAKE_CXX_COMPILER} and ${EDG_GCC_
77message (STATUS "Linking EDG versions with ${EDG_LINKER} " )
88
99set (CMAKE_DEPFILE_FLAGS_CXX "" )
10- message (STATUS "CMAKE_DEPFILE_FLAGS_CXX: ${CMAKE_DEPFILE_FLAGS_CXX} " )
1110
1211set (EDG_CPFE_DEFAULT_OPTIONS --g++ --set_flag=reflection --c++26 --gnu 140200 -tlocal --no_strict_gnu --no_char8_t)
1312set (EDG_DEFAULT_DEFINES __CHAR_BIT__=8 _POSIX_SOURCE)
1413set (EDG_C_TO_OBJ_LIBRARIES -shared-libgcc -lstdc++ -lgcc_s -lpthread -lm)
1514
1615set (EDG_C_TO_OBJ_DEFAULT_OPTIONS -Dsetjmp=_setjmp -Dva_copy=__va_copy -falign-functions=4 -march=skylake
1716 ${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 ()
2217separate_arguments (EDG_C_TO_OBJ_DEFAULT_OPTIONS )
2318
2419
You can’t perform that action at this time.
0 commit comments