File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,12 @@ function(_cppfront_generate_source src out)
34
34
35
35
# assume no SHA256 collisions
36
36
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR} /_cppfront/" )
37
- set (out_file "${CMAKE_BINARY_DIR} /_cppfront/${basename} .cpp" )
37
+ if (src MATCHES [[.*\.h2]] )
38
+ set (ext ".h" )
39
+ else ()
40
+ set (ext ".cpp" )
41
+ endif ()
42
+ set (out_file "${CMAKE_BINARY_DIR} /_cppfront/${basename}${ext} " )
38
43
39
44
add_custom_command (
40
45
OUTPUT "${out_file} "
@@ -61,7 +66,7 @@ function(cppfront_enable)
61
66
62
67
foreach (tgt IN LISTS ARG_TARGETS )
63
68
get_property (sources TARGET "${tgt} " PROPERTY SOURCES )
64
- list (FILTER sources INCLUDE REGEX "\\ .cpp2 $" )
69
+ list (FILTER sources INCLUDE REGEX "\\ .(cpp|h)2 $" )
65
70
66
71
if (sources )
67
72
target_link_libraries ("${tgt} " PRIVATE cppfront::cpp2util )
You can’t perform that action at this time.
0 commit comments