-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix version parsing in CMakeLists files (#1596)
* Fix version parsing in CMakeLists files #1589 Signed-off-by: Daniel Asztalos <[email protected]> * Lint fixes Signed-off-by: asztalosdani <[email protected]> --------- Signed-off-by: Daniel Asztalos <[email protected]> Signed-off-by: asztalosdani <[email protected]>
- Loading branch information
1 parent
e07b12f
commit ea63d5c
Showing
4 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5734,6 +5734,18 @@ test("parseCmakeLikeFile tests", () => { | |
type: "application", | ||
version: "", | ||
}); | ||
retMap = parseCmakeLikeFile( | ||
"./test/data/cmakes/CMakeLists-version.txt", | ||
"generic", | ||
); | ||
expect(retMap.parentComponent).toEqual({ | ||
"bom-ref": "pkg:generic/[email protected]", | ||
group: "", | ||
name: "MyProject", | ||
purl: "pkg:generic/[email protected]", | ||
type: "application", | ||
version: "2.1.3", | ||
}); | ||
retMap = parseCmakeLikeFile( | ||
"./test/data/cmakes/CMakeLists-tpl.txt", | ||
"generic", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(MyProject VERSION 2.1.3) | ||
|
||
add_executable(myexample example.cpp) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.