set(LP_COMPILER_FLAGS "-fvisibility=hidden -Wextra")
set(LP_LINKER_FLAGS "-Wl,--no-undefined")

set(CMAKE_C_FLAGS_DEBUG "-D_DEBUG ${CMAKE_C_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}")

set(CMAKE_C_FLAGS "${LP_COMPILER_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${LP_COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath='\$ORIGIN' ${LP_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s ${CMAKE_EXE_LINKER_FLAGS_RELEASE}")

set(CMAKE_SHARED_LINKER_FLAGS "${LP_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-s ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
