Skip to content

Commit 5e94a0c

Browse files
committed
Inline generate_view without --param flags
1 parent 6d4dd6e commit 5e94a0c

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

CMakeLists.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
88
if (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")
1919
endif()
2020

2121
# Detect if build dir contains "vtune"
2222
get_filename_component(BUILD_DIR_NAME ${CMAKE_BINARY_DIR} NAME)
2323
string(FIND "${BUILD_DIR_NAME}" "vtune" VTUNE_DIR_POS)
2424
if (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()
2931
else()

edg_config.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ message(STATUS "Compiling EDG versions with ${CMAKE_CXX_COMPILER} and ${EDG_GCC_
77
message(STATUS "Linking EDG versions with ${EDG_LINKER}")
88

99
set(CMAKE_DEPFILE_FLAGS_CXX "")
10-
message(STATUS "CMAKE_DEPFILE_FLAGS_CXX: ${CMAKE_DEPFILE_FLAGS_CXX}")
1110

1211
set(EDG_CPFE_DEFAULT_OPTIONS --g++ --set_flag=reflection --c++26 --gnu 140200 -tlocal --no_strict_gnu --no_char8_t)
1312
set(EDG_DEFAULT_DEFINES __CHAR_BIT__=8 _POSIX_SOURCE)
1413
set(EDG_C_TO_OBJ_LIBRARIES -shared-libgcc -lstdc++ -lgcc_s -lpthread -lm)
1514

1615
set(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()
2217
separate_arguments(EDG_C_TO_OBJ_DEFAULT_OPTIONS)
2318

2419

refl/reflmempp

0 commit comments

Comments
 (0)