aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-09-10 17:26:30 +0200
committerJan200101 <sentrycraft123@gmail.com>2023-09-10 17:26:30 +0200
commit94841a78b8126f0ed02db3e7066f4680031011a6 (patch)
tree8f4c37e5e1eef2af7996b0fab60c5007dad54c55
parent35f1402ad5d7f142bb3932238422188455bbb9df (diff)
downloadSouthRPC-base.tar.gz
SouthRPC-base.zip
streamline compiler flag checkingbase
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/FindNorthstarPluginABI.cmake2
-rw-r--r--cmake/R2plugin.cmake10
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/internal/logging.h1
5 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3d04dd..c6cf527 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,6 @@ endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_FLAGS "-fpermissive")
set(CMAKE_SHARED_LIBRARY_PREFIX "")
diff --git a/cmake/FindNorthstarPluginABI.cmake b/cmake/FindNorthstarPluginABI.cmake
index 08518f2..ff8024a 100644
--- a/cmake/FindNorthstarPluginABI.cmake
+++ b/cmake/FindNorthstarPluginABI.cmake
@@ -9,4 +9,4 @@ check_init_submodule(${NS_LAUNCHER_DIR})
set(NS_DLL_DIR "${NS_LAUNCHER_DIR}/NorthstarDLL")
set(NS_PLUG_DIR "${NS_DLL_DIR}/plugins")
-set(NorthstarPluginABI_FOUND)
+set(NorthstarPluginABI_FOUND 1)
diff --git a/cmake/R2plugin.cmake b/cmake/R2plugin.cmake
index bb9dac0..107a981 100644
--- a/cmake/R2plugin.cmake
+++ b/cmake/R2plugin.cmake
@@ -27,12 +27,12 @@ include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckLinkerFlag)
-macro(check_compiler_flags CHECK_FUNC FLAGS OUTPUT)
+macro(check_compiler_flags LANG FLAGS OUTPUT)
foreach(flag ${${FLAGS}})
string(REPLACE "+" "P" VAR_NAME ${flag})
string(TOUPPER ${VAR_NAME} VAR_NAME)
set(flag "-${flag}")
- cmake_language(CALL ${CHECK_FUNC} "${flag}" "${VAR_NAME}")
+ check_compiler_flag("${LANG}" "${flag}" "${VAR_NAME}")
if(${${VAR_NAME}})
list(APPEND ${OUTPUT} "${flag}")
@@ -79,7 +79,7 @@ list(APPEND
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
if("C" IN_LIST languages)
- check_compiler_flags(check_c_compiler_flag C_FLAGS C_FLAGS_LIST)
+ check_compiler_flags("C" C_FLAGS C_FLAGS_LIST)
list(JOIN C_FLAGS_LIST " " C_FLAGS)
set(PLUGIN_C_FLAGS "${PLUGIN_C_FLAGS} ${C_FLAGS}")
@@ -87,11 +87,11 @@ if("C" IN_LIST languages)
list(JOIN C_LINK_FLAGS_LIST " " PLUGIN_C_LINK_FLAGS)
endif()
if("CXX" IN_LIST languages)
- check_compiler_flags(check_cxx_compiler_flag CXX_FLAGS CXX_FLAGS_LIST)
+ check_compiler_flags("CXX" CXX_FLAGS CXX_FLAGS_LIST)
list(JOIN CXX_FLAGS_LIST " " CXX_FLAGS)
set(PLUGIN_CXX_FLAGS "${PLUGIN_CXX_FLAGS} ${CXX_FLAGS}")
- check_linker_flags("C" CXX_LINK_FLAGS CXX_LINK_FLAGS_LIST)
+ check_linker_flags("CXX" CXX_LINK_FLAGS CXX_LINK_FLAGS_LIST)
list(JOIN CXX_LINK_FLAGS_LIST " " PLUGIN_CXX_LINK_FLAGS)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 44ae5d4..bddc237 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,8 +3,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
find_package(spdlog REQUIRED)
-plugin_manifest(SouthRPC name "South-RPC")
-plugin_manifest(SouthRPC displayname "South RPC")
+plugin_manifest(SouthRPC name "SouthRPC")
+plugin_manifest(SouthRPC displayname "SouthRPC")
plugin_manifest(SouthRPC description "Implements JSON-RPC Bridge for Northstar over TCP/IP")
plugin_manifest(SouthRPC run_on_server OFF)
plugin_manifest(SouthRPC run_on_client ON)
diff --git a/src/internal/logging.h b/src/internal/logging.h
index ad6de6b..fb0e415 100644
--- a/src/internal/logging.h
+++ b/src/internal/logging.h
@@ -2,6 +2,7 @@
#define LOGGING_H
#include <iostream>
+#include <chrono>
#include "plugin.h"
#include "spdlog/sinks/base_sink.h"