File tree 4 files changed +22
-4
lines changed
4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,16 @@ target_include_directories(
29
29
target_compile_features ({= name =}_lib PUBLIC c_std_{= std =}){% if pm %}
30
30
31
31
find_package (json-c REQUIRED)
32
- target_link_libraries ({= name =}_lib PRIVATE json-c::json-c){% end %}
32
+ target_link_libraries ({= name =}_lib PRIVATE json-c::json-c)
33
+
34
+ find_path (HEDLEY_INCLUDE_DIR hedley.h)
35
+ if (NOT HEDLEY_INCLUDE_DIR)
36
+ message (FATAL_ERROR "Couldn't find hedley.h (${HEDLEY_INCLUDE_DIR} )" )
37
+ endif ()
38
+ target_include_directories (
39
+ {= name =}_lib SYSTEM
40
+ PRIVATE "${HEDLEY_INCLUDE_DIR} "
41
+ ){% end %}
33
42
34
43
# ---- Declare executable ----
35
44
Original file line number Diff line number Diff line change 1
1
#include "lib.h" {% if pm %}
2
2
3
+ #include <hedley.h>
3
4
#include <json-c/json_object.h>
4
5
#include <json-c/json_tokener.h>
5
6
#include <stddef.h>
@@ -57,7 +58,10 @@ library create_library()
57
58
return lib ;
58
59
}{% if pm %}
59
60
61
+ HEDLEY_DIAGNOSTIC_PUSH
62
+ HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
60
63
void destroy_library (library * lib )
61
64
{
62
65
free ((void * )lib -> name );
63
- }{% end %}
66
+ }
67
+ HEDLEY_DIAGNOSTIC_POP {% end %}
Original file line number Diff line number Diff line change 1
1
[requires]
2
- {% if c %}json-c/0.15{% else %}fmt/8.1.1{% end %}
2
+ {% if c %}{% if exe %}hedley/15
3
+ {% end %}json-c/0.15{% else %}fmt/8.1.1{% end %}
3
4
4
5
# Testing only dependencies below
5
6
catch2/2.13.8
Original file line number Diff line number Diff line change 5
5
{
6
6
"name" : " {% if c %}json-c{% else %}fmt{% end %}" ,
7
7
"version>=" : " {% if c %}2019-09-10{% else %}8.1.1{% end %}"
8
- }
8
+ }{% if c and exe % },
9
+ {
10
+ "name" : " hedley" ,
11
+ "version>=" : " 15"
12
+ }{% end % }
9
13
],
10
14
"default-features" : [],
11
15
"features" : {
You can’t perform that action at this time.
0 commit comments