mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
C++11 and CMake 3.2 compliance changes
This commit is contained in:
+6
-1
@@ -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)
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user