examples: updates
[apps/agl-service-can-low-level.git] / CMakeLists.txt
index 7fdf8f4..8970eb5 100644 (file)
@@ -1,33 +1,23 @@
-cmake_minimum_required(VERSION 3.0)\r
-project(can-config-generator)\r
-\r
-if (CMAKE_VERSION VERSION_LESS "3.1")\r
-       if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")\r
-               set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")\r
-       elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")\r
-               set (CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}")\r
-       endif ()\r
-else ()\r
-       set (CMAKE_CXX_STANDARD 11)\r
-endif ()\r
-\r
-include_directories(SYSTEM 3rdparty/json)\r
-\r
-find_package(Boost REQUIRED COMPONENTS program_options filesystem system)\r
-if(Boost_FOUND)\r
-       add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})\r
-       include_directories(SYSTEM ${Boost_INCLUDE_DIRS})\r
-\r
-       add_executable(can-config-generator\r
-               src/main.cpp\r
-               src/openxc/message_set.cpp\r
-               src/openxc/can_bus.cpp\r
-               src/openxc/can_message.cpp\r
-               src/openxc/command.cpp\r
-               src/openxc/diagnostic_message.cpp\r
-               src/openxc/mapping.cpp\r
-               src/openxc/signal.cpp)\r
-\r
-       target_link_libraries(can-config-generator ${Boost_LIBRARIES})\r
-       target_compile_features(can-config-generator PRIVATE cxx_range_for cxx_constexpr cxx_nullptr)\r
-endif()\r
+###########################################################################
+# Copyright 2015 - 2018 IoT.bzh
+#
+# author: Romain Forlot <romain.forlot@iot.bzh>
+#
+# 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)