@@ -50,7 +50,7 @@ def test_output_argument(monkeypatch, tmp_path, output_arg):
5050
5151 cmakelists = Path ("CMakeLists.txt" )
5252 txt = cmakelists .read_text ().replace (
53- "# OUTPUT_ARG " , f'OUTPUT "{ output_values [output_arg ]} "'
53+ "# PLACEHOLDER " , f'OUTPUT "{ output_values [output_arg ]} "'
5454 )
5555 cmakelists .write_text (txt )
5656
@@ -133,6 +133,7 @@ def test_multiple_packages(monkeypatch, tmp_path):
133133 package_dir = tmp_path / "pkg5"
134134 shutil .copytree (DIR / "packages/multiple_packages" , package_dir )
135135 monkeypatch .chdir (package_dir )
136+
136137 build_dir = tmp_path / "build"
137138
138139 wheel = build_wheel (
@@ -158,3 +159,39 @@ def test_multiple_packages(monkeypatch, tmp_path):
158159 package3_build_files = {x .name for x in (build_dir / "__" ).iterdir ()}
159160 assert "module.c.dep" in package3_build_files
160161 assert "module.c" in package3_build_files
162+
163+
164+ def test_genex_cython_args (monkeypatch , tmp_path , capfd ):
165+ package_dir = tmp_path / "pkg6"
166+ shutil .copytree (DIR / "packages/simple" , package_dir )
167+ monkeypatch .chdir (package_dir )
168+
169+ build_dir = tmp_path / "build"
170+
171+ cmakelists = Path ("CMakeLists.txt" )
172+ txt = (
173+ cmakelists .read_text ()
174+ .replace ("LANGUAGE C" , "" )
175+ .replace ("LANGUAGES C" , "LANGUAGES CXX" )
176+ .replace ("# PLACEHOLDER" , 'CYTHON_ARGS "$<1:--verbose;--annotate>"' )
177+ )
178+ cmakelists .write_text (txt )
179+
180+ wheel = build_wheel (
181+ str (tmp_path ), {"build-dir" : str (build_dir ), "wheel.license-files" : []}
182+ )
183+
184+ with zipfile .ZipFile (tmp_path / wheel ) as f :
185+ file_names = set (f .namelist ())
186+ assert len (file_names ) == 4
187+
188+ build_files = {x .name for x in build_dir .iterdir ()}
189+ assert "simple.cxx.dep" in build_files
190+ assert "simple.cxx" in build_files
191+
192+ # Check side-effect of "--annotate"
193+ assert "simple.html" in build_files
194+
195+ # Check side-effect of "--verbose"
196+ captured = capfd .readouterr ()
197+ assert "Compiling " in captured .out or "Compiling " in captured .err
0 commit comments