diff --git a/rton-json/CMakeLists.txt b/rton-json/CMakeLists.txt index 30de699..6091d11 100644 --- a/rton-json/CMakeLists.txt +++ b/rton-json/CMakeLists.txt @@ -6,19 +6,14 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON) set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}\ + -Os\ -Wall -Wextra -Werror -pedantic\ -static\ -s") -elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS}\ - -W4 -WX\ - -MT") endif() include_directories("${CMAKE_CURRENT_SOURCE_DIR}") @@ -35,13 +30,7 @@ endif() set(JSON_BuildTests OFF CACHE INTERNAL "") # require fifo_map -find_package(nlohmann-fifo-map QUIET) -if (nlohmann-fifo-map_FOUND) - message(STATUS "FOUND nlohmann-fifo-map ${nlohmann-fifo-map_VERSION}") -else() - add_subdirectory(third_party/fifo_map) - message(STATUS "Using external nlohmann-fifo-map") -endif() +add_subdirectory(third_party/fifo_map) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) add_executable(rton-json ${SOURCES}) diff --git a/rton-json/include/rton-json.hpp b/rton-json/include/rton-json.hpp index 5830b6c..bec2991 100644 --- a/rton-json/include/rton-json.hpp +++ b/rton-json/include/rton-json.hpp @@ -5,7 +5,7 @@ #include "include/json_fifo.hpp" -const std::string architecture = std::to_string(uint16_t(log2(INTPTR_MAX))+1) + "-bit"; +const std::string architecture = std::to_string(uint16_t(round(log2(UINTPTR_MAX)))) + "-bit"; const std::string ver = "3.1.0"; std::string to_hex_string(const uint64_t &q); diff --git a/rton-json/src/json2rton.cpp b/rton-json/src/json2rton.cpp index 5dc091c..f2550d4 100644 --- a/rton-json/src/json2rton.cpp +++ b/rton-json/src/json2rton.cpp @@ -1,5 +1,6 @@ #include "include/json2rton.hpp" +#include #include #include "include/error.hpp" diff --git a/rton-json/src/main.cpp b/rton-json/src/main.cpp index b9bf1cb..9c2c386 100644 --- a/rton-json/src/main.cpp +++ b/rton-json/src/main.cpp @@ -161,7 +161,7 @@ int main(const int argc, const char *argv[]){ std::cout << std::endl << "rton-json made by H3x4n1um" << std::endl << std::endl - << "Version: " << ver << " " << architecture << " executable" << std::endl + << "Version: " << ver << " " << architecture << std::endl << "Compiled on " << __DATE__ << " at " << __TIME__ << std::endl << "Credits: nlohmann for his awesome JSON parser and fifo_map" << std::endl << std::endl;