Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-szweda committed Oct 6, 2023
1 parent b355167 commit 62a9749
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()

if(${PROJECT_VERSION} STREQUAL "")
if("${PROJECT_VERSION}" STREQUAL "")
message(FATAL_ERROR "Project version has not been provided\n Please, provide project version using -DPROJECT_VERSION")
endif()

string(REGEX MATCH "([0-9]+)\.([0-9]+)\.([0-9]+)" _ ${PROJECT_VERSION})
string(REGEX MATCH "([0-9]+)\.([0-9]+)\.([0-9]+)" _ "${PROJECT_VERSION}")
if(NOT CMAKE_MATCH_COUNT EQUAL 3)
message(FATAL_ERROR "Project version parsing failed\n Got: ${PROJECT_VERSION}")
endif()

project(
${_project_name} VERSION ${PROJECT_VERSION} LANGUAGES C CXX
${_project_name} VERSION "${PROJECT_VERSION}" LANGUAGES C CXX
)

set(BPF_C_FLAGS ${BPF_C_FLAGS} -DTARGET_BPF)
Expand Down

0 comments on commit 62a9749

Please sign in to comment.