Unverified Commit 6b451b17 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

cmake: remove redundant compile flag declarations

The preload specific cmake files inherits the global flag declarations,
thus it is not necessary to specify again all the flags.
Moreover the only addition made by this declaration is the `-fPIC` flag.
According to the official CMake docs [1], is set automatically for
library target as SHARED. Thus we don't need to set it explicitely.

[1]: https://cmake.org/cmake/help/v3.6/prop_tgt/POSITION_INDEPENDENT_CODE.html
parent 0e15394b
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
# Compiler flags for various cmake build types
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3 -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC")
set(CMAKE_CXX_FLAGS_MEMCHECK "-Wall --pedantic -g -O0 -fsanitize=address -fno-omit-frame-pointer -fPIC")
set(CMAKE_CXX_FLAGS_MAINTAINER "-Wall --pedantic -g -O0 -pg -no-pie -fPIC") # -no-pie to be tested with gprof
message("* Current library build type is : ${CMAKE_BUILD_TYPE}")

set(PRELOAD_SOURCES
    preload.cpp
    open_file_map.cpp