Allow Linux compiling with correct EBP frame pointer.

Nicky 2014-05-12 14:49:27 +02:00
parent 3f8b454940
commit e5bf5bd78b
1 changed files with 7 additions and 0 deletions

View File

@ -263,6 +263,13 @@ if (LINUX)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
# <FS:ND> Build without frame pointer if requested. Otherwise profiling might not work reliable. N.B. Win32 uses FP based calling by default.
if( NO_OMIT_FRAMEPOINTER )
set(CMAKE_CXX_FLAGS_RELEASE "-fno-omit-frame-pointer ${CMAKE_CXX_FLAGS_RELEASE}")
endif( NO_OMIT_FRAMEPOINTER )
# </FS:ND>
endif (LINUX)