From 3ab01516671a913646b2179b8e53af6cf71e9d9c Mon Sep 17 00:00:00 2001 From: Petr Semiletov Date: Thu, 2 Mar 2023 20:22:06 +0300 Subject: [PATCH] 2.3.0 --- CMakeLists.txt | 14 ++++---------- ChangeLog | 1 + Makefile.Haiku | 52 -------------------------------------------------- NEWS | 5 ++++- main.cpp | 2 +- 5 files changed, 10 insertions(+), 64 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae31e75..8899d76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,6 @@ set (CMAKE_CXX_STANDARD 11) option(USE_PROMCPP "Use prometheus_cpp" OFF) option(USE_STATIC "Static build" OFF) option(USE_CLANG "Build with Clang" OFF) -#option(USE_OPENSUSE "Build with OpenSUSE" OFF) - if(USE_CLANG) @@ -16,12 +14,10 @@ if(USE_CLANG) endif(USE_CLANG) - -project (logfilegen VERSION 2.2.0 LANGUAGES CXX) +project (logfilegen VERSION 2.3.0 LANGUAGES CXX) add_definitions(-DVERSION_NUMBER="\\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\\"") - set(SOURCES utl.cpp params.cpp @@ -39,8 +35,7 @@ add_executable (logfilegen ${SOURCES}) #set(CMAKE_EXE_LINKER_FLAGS "-pthread -lpthread") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") - - +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -O3 ") #if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.1.0) @@ -48,7 +43,6 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") #endif() - if(USE_STATIC) message("+ static build") @@ -66,10 +60,11 @@ if(WIN32) endif() -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig") if(USE_PROMCPP) +set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig") + find_package(PkgConfig REQUIRED) pkg_check_modules(prometheus-cpp-core QUIET prometheus-cpp-core) @@ -92,7 +87,6 @@ else() target_link_libraries(logfilegen ${prometheus-cpp-pull_LIBRARIES}) - endif() diff --git a/ChangeLog b/ChangeLog index bdec2e8..ff273dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ ++ CMake support optimization + HaikuOS support (compile with make --makefile=Makefile.Haiku + Mac ARM support (compile with make --makefile=Makefile.macarm diff --git a/Makefile.Haiku b/Makefile.Haiku index 870da84..b8a0640 100644 --- a/Makefile.Haiku +++ b/Makefile.Haiku @@ -3,64 +3,12 @@ prefix=/usr endif CXX = g++ -#CXXFLAGS = -Wall -g -O3 -fopenmp CXXFLAGS = -Wall -g -Og -std=c++11 -pthread -lpthread -#LDFLAGS= -pthread -lpthread -#add for -lpthread -#OS_NAME := $(shell uname -s | tr A-Z a-z) - -#os: -# @echo $(OS_NAME) - -# Detect operating system in Makefile. -# Author: He Tao -# Date: 2015-05-30 - -OSFLAG := -ifeq ($(OS),Windows_NT) -# OSFLAG += -D WIN32 - CXXFLAGS += -DWIN32 - -ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) - OSFLAG += -D AMD64 - endif - ifeq ($(PROCESSOR_ARCHITECTURE),x86) - OSFLAG += -D IA32 - endif -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - OSFLAG += -D LINUX - endif - ifeq ($(UNAME_S),Darwin) - OSFLAG += -D OSX - endif - UNAME_P := $(shell uname -p) - ifeq ($(UNAME_P),x86_64) - OSFLAG += -D AMD64 - endif - ifneq ($(filter %86,$(UNAME_P)),) - OSFLAG += -D IA32 - endif - ifneq ($(filter arm%,$(UNAME_P)),) - OSFLAG += -D ARM - endif -endif - - -ifeq ($(OS),Windows_NT) -all: main.cpp - $(CXX) $(CXXFLAGS) -o logfilegen utl.cpp params.cpp macro.cpp vars.cpp tpl.cpp pairfile.cpp cycle.cpp logrot.cpp main.cpp -lws2_32 -else -# @echo $(OSFLAG) all: main.cpp $(CXX) $(CXXFLAGS) -o logfilegen utl.cpp params.cpp macro.cpp vars.cpp tpl.cpp pairfile.cpp cycle.cpp logrot.cpp main.cpp -lnetwork -endif - - clean: $(RM) logfilegen diff --git a/NEWS b/NEWS index e79c4ed..d692448 100644 --- a/NEWS +++ b/NEWS @@ -1 +1,4 @@ -This release makes logfilegen possible to build on old compiler versions. Now logfilegen needs C++11 instead of C++17. ++ CMake support optimization ++ HaikuOS support (compile with make --makefile=Makefile.Haiku ++ Mac ARM support (compile with make --makefile=Makefile.macarm +* randomization engine take less resources diff --git a/main.cpp b/main.cpp index 7dd30f1..366f417 100644 --- a/main.cpp +++ b/main.cpp @@ -34,7 +34,7 @@ #ifndef VERSION_NUMBER -#define VERSION_NUMBER "2.2.0" +#define VERSION_NUMBER "2.3.0" #endif