Commit 6f693e19 authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'profile-build' into 'master'

Add ENABLE_PROFILE build option for profiling with perf

Closes #416

See merge request !169
parents 85d8e5ce 9ee85419
Pipeline #2113 passed with stage
in 65 minutes and 31 seconds
......@@ -45,6 +45,7 @@ opt(CGNS "Enable CGNS mesh import" ${DEFAULT})
opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT})
opt(CXX11 "Enable C++11" ${DEFAULT})
opt(C99 "Enable C99" ${DEFAULT})
opt(PROFILE "Enable profiling compiler flags" OFF)
opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT})
opt(FLTK "Enable FLTK graphical user interface (requires mesh/post)" ${DEFAULT})
opt(FOURIER_MODEL "Enable Fourier geometrical models (experimental)" OFF)
......@@ -265,6 +266,15 @@ if(ENABLE_C99)
endif(STDC99)
endif(ENABLE_C99)
if(ENABLE_PROFILE)
# Using the perf set of profiling tools doesn't work without the frame
# pointer and a common optimisation is to remove it
check_cxx_compiler_flag("-fno-omit-frame-pointer" FNOFP)
if(FNOFP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
endif(FNOFP)
endif(ENABLE_PROFILE)
macro(append_gmsh_src DIRNAME FILES)
foreach(FILE ${FILES})
list(APPEND LIST ${DIRNAME}/${FILE})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment