###########################################################################
-# Copyright (C) 2015-2019 "IoT.bzh"
+# Copyright (C) 2015-2020 "IoT.bzh"
#
# author: José Bollo <jose.bollo@iot.bzh>
#
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")
###########################################################################
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_DEFINITIONS("-DAFS_SUPERVISOR_TOKEN=\"${AFS_SUPERVISOR_TOKEN}\"")
ADD_DEFINITIONS("-DAFS_SUPERVISOR_PORT=${AFS_SUPERVISOR_PORT}")
-IF(AGL_DEVEL)
- ADD_DEFINITIONS(-DAGL_DEVEL)
-ENDIF()
-
IF(cynara_FOUND)
ADD_DEFINITIONS(-DBACKEND_PERMISSION_IS_CYNARA)
ENDIF(cynara_FOUND)
IF(ONLY_DEVTOOLS)
MESSAGE(WARNING "Only DEVTOOLS are compiled, not the binder!")
ELSE()
- SET(binding_install_dir ${CMAKE_INSTALL_FULL_LIBDIR}/afb)
###########################################################################
# activates the monitoring by default
INSTALL(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/test/monitoring
DESTINATION
- ${binding_install_dir}
+ ${INTRINSIC_BINDING_DIR}
)
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}