summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexander Kutsan <AKutsan@luxoft.com>2016-11-18 18:12:45 +0200
committerAlexander Kutsan <AKutsan@luxoft.com>2016-12-05 09:33:20 +0200
commit16891012aadef1839f460ddae51d7ee71c2d6ff0 (patch)
treed5b385a0088605c4028b64218d8ecc339e5981a3 /CMakeLists.txt
parent84f3d3bcd54c1ae1b842e3660c905d9f78cf9d25 (diff)
downloadsdl_core-16891012aadef1839f460ddae51d7ee71c2d6ff0.tar.gz
Fix usages of policy in code
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 26 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index deddd75cd1..c34c86e646 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,12 +48,16 @@ option(ENABLE_GCOV "gcov code coverage feature" OFF)
option(ENABLE_SANITIZE "Sanitize tool" OFF)
option(ENABLE_SECURITY "Security Ford protocol protection" ON)
option(ENABLE_HMI_PTU_DECRYPTION "Policy table update parsed by hmi" ON)
-option(ENABLE_EXTENDED_POLICY "Turns extended flow which requires embedded system interaction" ON)
option(USE_COTIRE "Use Cotire to speed up build (currently only for commands tests)" ON)
option(USE_GOLD_LD "Use gold linker intead of GNU linker" ON)
option(USE_CCACHE "Turn on ccache usage" ON)
option(USE_DISTCC "Turn on distributed build_usage" ON)
+set (EXTENDED_POLICY "${EXTENDED_POLICY}" CACHE STRING "Policy mode (PROPRIETARY, HTTP or EXTENDED_PROPRIETARY)")
+if(EXTENDED_POLICY STREQUAL "")
+ set(EXTENDED_POLICY "PROPRIETARY")
+endif()
+
set(OS_TYPE_OPTION "$ENV{OS_TYPE}")
set(DEBUG_OPTION "$ENV{DEBUG}")
set(HMI_TYPE_OPTION "$ENV{HMI_TYPE}")
@@ -277,8 +281,22 @@ if (TELEMETRY_MONITOR)
add_definitions(-DTELEMETRY_MONITOR)
endif()
-if (ENABLE_EXTENDED_POLICY)
- add_definitions(-DEXTENDED_POLICY)
+if (${EXTENDED_POLICY} STREQUAL "EXTENDED_PROPRIETARY")
+ add_definitions(-DEXTENDED_PROPRIETARY)
+ set(POLICY_PATH ${COMPONENTS_DIR}/policy/policy_premium/)
+ set(POLICY_GLOBAL_INCLUDE_PATH ${COMPONENTS_DIR}/include/policy/policy_premium/)
+ set(POLICY_MOCK_INCLUDE_PATH ${COMPONENTS_DIR}/include/test/policy/policy_premium/)
+ message(STATUS "DEFINED EXTENDED_PROPRIETARY")
+else()
+ if (${EXTENDED_POLICY} STREQUAL "PROPRIETARY")
+ add_definitions(-DEXTENDED_POLICY)
+ message(STATUS "DEFINED PROPRIETARY")
+ else()
+ message(STATUS "DEFAULT HTTP")
+ endif()
+ set(POLICY_PATH ${COMPONENTS_DIR}/policy/policy_regular/)
+ set(POLICY_GLOBAL_INCLUDE_PATH ${COMPONENTS_DIR}/include/policy/policy_regular/)
+ set(POLICY_MOCK_INCLUDE_PATH ${COMPONENTS_DIR}/include/test/policy/policy_regular/)
endif()
# TODO(AK): check current OS here
@@ -428,10 +446,13 @@ endif()
include_directories(
${COMPONENTS_DIR}/include
${COMPONENTS_DIR}/protocol/include
+)
+
if (BUILD_TESTS)
- ${COMPONENTS_DIR}/include/test
+ include_directories(
+ ${COMPONENTS_DIR}/include/test
+ )
endif ()
-)
# --- 3rd party libs
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/src/3rd_party/set_3rd_party_paths.cmake)