Skip to content

Commit 71afb6d

Browse files
committed
CMake: Always Install Python Extension
Was limited to testing, but always needed.
1 parent 24fd743 commit 71afb6d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,17 +334,17 @@ add_custom_target(${pyAMReX_CUSTOM_TARGET_PREFIX}pip_install_nodeps
334334
${pyAMReX_CUSTOM_TARGET_PREFIX}pip_wheel
335335
)
336336

337+
# copy Python wrapper library to build directory
338+
add_custom_command(TARGET pyAMReX_${AMReX_SPACEDIM_LAST}d POST_BUILD
339+
COMMAND ${CMAKE_COMMAND} -E copy_directory
340+
${pyAMReX_SOURCE_DIR}/src/amrex
341+
$<TARGET_FILE_DIR:pyAMReX_${AMReX_SPACEDIM_LAST}d>/..
342+
)
343+
337344

338345
# Tests #######################################################################
339346
#
340347
if(pyAMReX_BUILD_TESTING)
341-
# copy Python wrapper library to build directory
342-
add_custom_command(TARGET pyAMReX_${AMReX_SPACEDIM_LAST}d POST_BUILD
343-
COMMAND ${CMAKE_COMMAND} -E copy_directory
344-
${pyAMReX_SOURCE_DIR}/src/amrex
345-
$<TARGET_FILE_DIR:pyAMReX_${AMReX_SPACEDIM_LAST}d>/..
346-
)
347-
348348
add_test(NAME pytest.AMReX
349349
COMMAND ${Python_EXECUTABLE} -m pytest -s -vvvv
350350
${pyAMReX_SOURCE_DIR}/tests

0 commit comments

Comments
 (0)