diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a8f2a0..0220e40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.2) project(icsneonext VERSION 0.1.0) +set(CMAKE_CXX_STANDARD 11) + include(GNUInstallDirs) include_directories(${CMAKE_SOURCE_DIR}) @@ -26,7 +28,7 @@ endif(NOT WIN32) # winpcap if(WIN32) include_directories(AFTER third-party/winpcap/include) - add_compile_definitions(WPCAP HAVE_REMOTE WIN32_LEAN_AND_MEAN) + add_definitions(-DWPCAP -DHAVE_REMOTE -DWIN32_LEAN_AND_MEAN) endif(WIN32) if(WIN32) @@ -61,6 +63,9 @@ add_library(icsneoc SHARED ${SRC_FILES} ) +target_compile_features(icsneocpp PRIVATE cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums) +target_compile_features(icsneoc PRIVATE cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums) + # libftdi if(NOT WIN32) find_package(Threads) diff --git a/communication/include/network.h b/communication/include/network.h index 1bb5491..059fa01 100644 --- a/communication/include/network.h +++ b/communication/include/network.h @@ -97,7 +97,7 @@ public: Other, Invalid }; - static constexpr const char* GetTypeString(Type type) { + static const char* GetTypeString(Type type) { switch(type) { case Type::CAN: return "CAN"; @@ -114,7 +114,7 @@ public: return "Invalid Type"; } } - static constexpr Type GetTypeOfNetID(NetID netid) { + static Type GetTypeOfNetID(NetID netid) { switch(netid) { case NetID::HSCAN: case NetID::MSCAN: @@ -154,7 +154,7 @@ public: return Type::Other; } } - static constexpr const char* GetNetIDString(NetID netid) { + static const char* GetNetIDString(NetID netid) { switch(netid) { case NetID::Device: return "Device";