Skip to content

Commit bb49959

Browse files
jcfrvyasr
andcommitted
wip(UseCython): Remove explicit option for passing --embed
This may be passed on need-by-need basis by explicitly setting flags. Co-authored-by: Vyas Ramasubramani <[email protected]>
1 parent 1c4e96f commit bb49959

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/cython_cmake/cmake/UseCython.cmake

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# using cython.
99
#
1010
# add_cython_target(<Name> [<CythonInput>]
11-
# [EMBED_MAIN]
1211
# [C | CXX]
1312
# [PY2 | PY3]
1413
# [OUTPUT_VAR <OutputVar>])
@@ -31,10 +30,6 @@
3130
#
3231
# Options:
3332
#
34-
# ``EMBED_MAIN``
35-
# Embed a main() function in the generated output (for stand-alone
36-
# applications that initialize their own Python runtime).
37-
#
3833
# ``C | CXX``
3934
# Force the generation of either a C or C++ file. By default, a C file is
4035
# generated, unless the C language is not enabled for the project; in this
@@ -108,7 +103,7 @@ set(CYTHON_C_EXTENSION "c")
108103
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
109104

110105
function(add_cython_target _name)
111-
set(_options EMBED_MAIN C CXX PY2 PY3)
106+
set(_options C CXX PY2 PY3)
112107
set(_one_value OUTPUT_VAR)
113108
set(_multi_value )
114109

@@ -140,7 +135,6 @@ function(add_cython_target _name)
140135
endif()
141136
endif()
142137

143-
set(_embed_main FALSE)
144138

145139
if("C" IN_LIST languages)
146140
set(target_language "C")
@@ -150,10 +144,6 @@ function(add_cython_target _name)
150144
message(FATAL_ERROR "Either C or CXX must be enabled to use Cython")
151145
endif()
152146

153-
if(_args_EMBED_MAIN)
154-
set(_embed_main TRUE)
155-
endif()
156-
157147
if(_args_C)
158148
set(target_language "C")
159149
endif()
@@ -174,11 +164,6 @@ function(add_cython_target _name)
174164
set(_input_syntax "PY3")
175165
endif()
176166

177-
set(embed_arg "")
178-
if(_embed_main)
179-
set(embed_arg "--embed")
180-
endif()
181-
182167
set(cxx_arg "")
183168
set(extension "c")
184169
if(target_language STREQUAL "CXX")
@@ -372,7 +357,6 @@ function(add_cython_target _name)
372357
${cxx_arg}
373358
${include_directory_arg}
374359
${language_level_arg}
375-
${embed_arg}
376360
${annotate_arg}
377361
${cython_debug_arg}
378362
${line_directives_arg}

0 commit comments

Comments
 (0)