X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=8970eb5675efafd2ed7bef8e146fe55bb004c742;hb=45514381c51ec65b1a2d05264a30a4d468348748;hp=a2f5bf2f8d12b69094169926bb5082b2e0ecd46e;hpb=ad97b3ac33d6bc0e9ef12b35d1f97e473ed0d7fb;p=apps%2Fagl-service-can-low-level.git diff --git a/CMakeLists.txt b/CMakeLists.txt index a2f5bf2f..8970eb56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,33 +1,23 @@ -cmake_minimum_required(VERSION 3.3) -project(can-config-generator) - -if (CMAKE_VERSION VERSION_LESS "3.1") - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}") - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set (CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}") - endif () -else () - set (CMAKE_CXX_STANDARD 11) -endif () - -include_directories(SYSTEM 3rdparty/json) - -find_package(Boost REQUIRED COMPONENTS program_options filesystem system) -if(Boost_FOUND) - add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) - include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) - - add_executable(can-config-generator - src/main.cpp - src/openxc/message_set.cpp - src/openxc/can_bus.cpp - src/openxc/can_message.cpp - src/openxc/command.cpp - src/openxc/diagnostic_message.cpp - src/openxc/mapping.cpp - src/openxc/signal.cpp) - - target_link_libraries(can-config-generator ${Boost_LIBRARIES}) - target_compile_features(can-config-generator PRIVATE cxx_range_for cxx_constexpr cxx_nullptr) -endif() +########################################################################### +# Copyright 2015 - 2018 IoT.bzh +# +# author: Romain Forlot +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +########################################################################### + +CMAKE_MINIMUM_REQUIRED(VERSION 3.3) + +include(CTest) +enable_testing() +include(${CMAKE_CURRENT_SOURCE_DIR}/conf.d/cmake/config.cmake)