X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=da601e0852e248370db7c3624e5f50e519e6ad86;hb=7129df470867291f917e6718dad2a964e113aad6;hp=ebda48f0b0d9c59e24f5a5160d8f96ae95b53877;hpb=a1e6d2c08445030fc35e98f5b97dd1a10024fe62;p=src%2Fapp-framework-binder.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ebda48f0..da601e08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,8 @@ set(AFS_SUPERVISION_SOCKET "@urn:AGL:afs:supervision:socket" CACHE STRING "Inter set(AFS_SUPERVISOR_PORT 1619 CACHE STRING "Port of service for the supervisor") set(AFS_SUPERVISOR_TOKEN HELLO CACHE STRING "Secret token for the supervisor") set(UNITDIR_SYSTEM ${CMAKE_INSTALL_LIBDIR}/systemd/system CACHE STRING "Path to systemd system unit files") +set(INTRINSIC_BINDING_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/afb CACHE STRING "Path to install intrinsic bindings") +set(SAMPLE_INSTALL_DIR ${CMAKE_INSTALL_FULL_DATADIR}/af-binder CACHE STRING "Path to install samples") ########################################################################### @@ -59,11 +61,16 @@ link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined) add_compile_options(-Wall -Wextra -Wconversion) add_compile_options(-Wno-unused-parameter) # frankly not using a parameter does it care? add_compile_options(-Wno-sign-compare -Wno-sign-conversion) -add_compile_options(-Werror=maybe-uninitialized) +if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + add_compile_options(-Werror=maybe-uninitialized) +elseif(${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + add_compile_options(-Werror=sometimes-uninitialized) +endif() add_compile_options(-Werror=implicit-function-declaration) add_compile_options(-ffunction-sections -fdata-sections) add_compile_options(-fPIC) add_compile_options(-g -O2) +add_compile_options(-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.) set (CMAKE_CXX_STANDARD 14) set(CMAKE_C_FLAGS_PROFILING "-g -O2 -pg -U_FORTIFY_SOURCE") @@ -156,8 +163,6 @@ ADD_SUBDIRECTORY(src/devtools) IF(ONLY_DEVTOOLS) MESSAGE(WARNING "Only DEVTOOLS are compiled, not the binder!") ELSE() - SET(binding_install_dir ${CMAKE_INSTALL_FULL_LIBDIR}/afb) - SET(install_datadir ${CMAKE_INSTALL_FULL_DATADIR}/af-binder) ########################################################################### # activates the monitoring by default @@ -166,7 +171,7 @@ ELSE() INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test/monitoring DESTINATION - ${binding_install_dir} + ${INTRINSIC_BINDING_DIR} ) endif() @@ -194,6 +199,8 @@ ENDIF() IF(INCLUDE_SUPERVISOR) CONFIGURE_FILE(afs-supervisor.service.in afs-supervisor.service @ONLY) INSTALL(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/afm-api-supervisor.service + ${CMAKE_CURRENT_SOURCE_DIR}/afm-api-supervisor.socket ${CMAKE_CURRENT_BINARY_DIR}/afs-supervisor.service DESTINATION ${UNITDIR_SYSTEM}