File tree 7 files changed +20
-11
lines changed
7 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 8
8
DESCRIPTION "%(description)s"
9
9
HOMEPAGE_URL "%(homepage)s"
10
10
LANGUAGES C
11
- ) #
11
+ )
12
12
13
13
include (cmake/project-is-top-level.cmake)
14
14
include (cmake/variables .cmake)
Original file line number Diff line number Diff line change 8
8
DESCRIPTION "%(description)s"
9
9
HOMEPAGE_URL "%(homepage)s"
10
10
LANGUAGES NONE
11
- ) #
11
+ )
12
12
13
13
include (cmake/project-is-top-level.cmake)
14
14
include (cmake/variables .cmake)
Original file line number Diff line number Diff line change 8
8
DESCRIPTION "%(description)s"
9
9
HOMEPAGE_URL "%(homepage)s"
10
10
LANGUAGES C
11
- ) #
11
+ )
12
12
13
13
include (cmake/project-is-top-level.cmake)
14
14
include (cmake/variables .cmake)
Original file line number Diff line number Diff line change @@ -42,11 +42,20 @@ endif()
42
42
# ---- Process project() call in CMakeLists.txt ----
43
43
44
44
file (READ "${src} /CMakeLists.txt" content )
45
- string (FIND "${content} " "project(" start_index)
46
- string (FIND "${content} " "\n ) #" end_index)
47
- math (EXPR length "${end_index} + 2 - ${start_index} " )
48
- string (SUBSTRING "${content} " "${start_index} " "${length} " content )
49
- file (WRITE "${bin} /docs-ci.project.cmake" "docs_${content} \n " )
45
+
46
+ string (FIND "${content} " "project(" index)
47
+ if (index EQUAL "-1" )
48
+ message (FATAL_ERROR "Could not find \" project(\" " )
49
+ endif ()
50
+ string (SUBSTRING "${content} " "${index} " -1 content )
51
+
52
+ string (FIND "${content} " "\n )\n " index)
53
+ if (index EQUAL "-1" )
54
+ message (FATAL_ERROR "Could not find \"\\ n)\\ n\" " )
55
+ endif ()
56
+ string (SUBSTRING "${content} " 0 "${index} " content )
57
+
58
+ file (WRITE "${bin} /docs-ci.project.cmake" "docs_${content} \n )\n " )
50
59
51
60
macro (list_pop_front list out)
52
61
list (GET "${list} " 0 "${out} " )
Original file line number Diff line number Diff line change 8
8
DESCRIPTION "%(description)s"
9
9
HOMEPAGE_URL "%(homepage)s"
10
10
LANGUAGES CXX
11
- ) #
11
+ )
12
12
13
13
include (cmake/project-is-top-level.cmake)
14
14
include (cmake/variables .cmake)
Original file line number Diff line number Diff line change 8
8
DESCRIPTION "%(description)s"
9
9
HOMEPAGE_URL "%(homepage)s"
10
10
LANGUAGES NONE
11
- ) #
11
+ )
12
12
13
13
include (cmake/project-is-top-level.cmake)
14
14
include (cmake/variables .cmake)
Original file line number Diff line number Diff line change 8
8
DESCRIPTION "%(description)s"
9
9
HOMEPAGE_URL "%(homepage)s"
10
10
LANGUAGES CXX
11
- ) #
11
+ )
12
12
13
13
include (cmake/project-is-top-level.cmake)
14
14
include (cmake/variables .cmake)
You can’t perform that action at this time.
0 commit comments