Skip to content

Commit

Permalink
2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
psemiletov committed Mar 2, 2023
1 parent 779a117 commit 3ab0151
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 64 deletions.
14 changes: 4 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -39,16 +35,14 @@ 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)
# target_link_libraries(logfilegen -lstdc++fs)
#endif()



if(USE_STATIC)
message("+ static build")

Expand All @@ -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)
Expand All @@ -92,7 +87,6 @@ else()

target_link_libraries(logfilegen ${prometheus-cpp-pull_LIBRARIES})


endif()


Expand Down
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
+ CMake support optimization
+ HaikuOS support (compile with make --makefile=Makefile.Haiku
+ Mac ARM support (compile with make --makefile=Makefile.macarm

Expand Down
52 changes: 0 additions & 52 deletions Makefile.Haiku
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


#ifndef VERSION_NUMBER
#define VERSION_NUMBER "2.2.0"
#define VERSION_NUMBER "2.3.0"
#endif


Expand Down

0 comments on commit 3ab0151

Please sign in to comment.