Skip to content

Commit

Permalink
Remove: unnecessary code in libs CMakeLists.txt files (#1156)
Browse files Browse the repository at this point in the history
* Remove: unnecessary code in libs CMakeLists.txt files

Remove the project string setup code for the nasl and misc CMakeLists.txt files,
since the main project version string is already used.
  • Loading branch information
jjnicola committed Aug 18, 2022
1 parent 4e2b37e commit b614dbd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
22 changes: 0 additions & 22 deletions misc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,6 @@ set (FILES bpf_share.c ftp_funcs.c vendorversion.c network.c plugutils.c pcap.c
# Also stack protection needs a shared library to work
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fPIC")

## Project version
# The following three variables should be set through the project command once
# we require CMake >= 3.0
set (MISC_VERSION_MAJOR 21)
set (MISC_VERSION_MINOR 10)
set (MISC_VERSION_PATCH 0)

if (PROJECT_BETA_RELEASE)
set (MISC_VERSION_SUFFIX "+beta${PROJECT_BETA_RELEASE}")
else (PROJECT_BETA_RELEASE)
set (MISC_VERSION_SUFFIX ".${PROJECT_VERSION_PATCH}")
endif (PROJECT_BETA_RELEASE)

set (MISC_VERSION_STRING "${MISC_VERSION_MAJOR}.${MISC_VERSION_MINOR}${MISC_VERSION_SUFFIX}")
if (PROJECT_BETA_RELEASE)
set (MISC_PACKAGE_VERSION "${MISC_VERSION_STRING}${PROJECT_VERSION_GIT}")
else (PROJECT_BETA_RELEASE)
set (MISC_PACKAGE_VERSION "${MISC_VERSION_STRING}")
endif (PROJECT_BETA_RELEASE)
set (MISC_VERSION "${MISC_VERSION_STRING}")


# Build shared

add_library (openvas_misc_shared SHARED ${FILES})
Expand Down
23 changes: 0 additions & 23 deletions nasl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,6 @@

## Config

## Project version
# The following three variables should be set through the project command once
# we require CMake >= 3.0
set (NASL_VERSION_MAJOR 21)
set (NASL_VERSION_MINOR 10)
set (NASL_VERSION_PATCH 0)

if (PROJECT_BETA_RELEASE)
set (NASL_VERSION_SUFFIX "+beta${PROJECT_BETA_RELEASE}")
else (PROJECT_BETA_RELEASE)
set (NASL_VERSION_SUFFIX ".${PROJECT_VERSION_PATCH}")
endif (PROJECT_BETA_RELEASE)

set (NASL_VERSION_STRING "${NASL_VERSION_MAJOR}.${NASL_VERSION_MINOR}${NASL_VERSION_SUFFIX}")


if (PROJECT_BETA_RELEASE)
set (NASL_PACKAGE_VERSION "${NASL_VERSION_STRING}${PROJECT_VERSION_GIT}")
else (PROJECT_BETA_RELEASE)
set (NASL_PACKAGE_VERSION "${NASL_VERSION_STRING}")
endif (PROJECT_BETA_RELEASE)

set (NASL_VERSION "${NASL_VERSION_STRING}")

include (FindPkgConfig)

Expand Down

0 comments on commit b614dbd

Please sign in to comment.