diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 65313193d..a0c8af0bc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -48,6 +48,8 @@ jobs: if(!$?) { Exit $LASTEXITCODE } - name: Install run: | + type build\cmake_install.cmake + cmake --build build --config RelWithDebInfo --target install if(!$?) { Exit $LASTEXITCODE } cmake --build build --config RelWithDebInfo --target pip_install @@ -117,15 +119,20 @@ jobs: if errorlevel 1 exit 1 cmake --build build --config Release --parallel 2 if errorlevel 1 exit 1 - - name: Install Python + - name: Install shell: cmd run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + + type build\cmake_install.cmake + + cmake --build build --config Release --target install + if errorlevel 1 exit 1 cmake --build build --config Release --target pip_install if errorlevel 1 exit 1 - name: Test shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - ctest --test-dir build --build-config Release --output-on-failure -E AMReX -R py - if errorlevel 1 exit 1 + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + ctest --test-dir build --build-config Release --output-on-failure -E AMReX -R py + if errorlevel 1 exit 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 31266e64a..68d89cb8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -348,9 +348,12 @@ if(ImpactX_LIB) else() set(ABS_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) endif() + # escape spaces + string(REGEX REPLACE " " "\\\\ " ABS_INSTALL_LIB_DIR ${ABS_INSTALL_LIB_DIR}) + install(CODE "file(CREATE_LINK $ - ${ABS_INSTALL_LIB_DIR}/libImpactX$ + '${ABS_INSTALL_LIB_DIR}/libImpactX$' COPY_ON_ERROR SYMBOLIC)") endif() diff --git a/cmake/ImpactXFunctions.cmake b/cmake/ImpactXFunctions.cmake index dba8fdfd4..e92f9f555 100644 --- a/cmake/ImpactXFunctions.cmake +++ b/cmake/ImpactXFunctions.cmake @@ -140,7 +140,7 @@ function(impactx_test_set_pythonpath test_name) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${WIN_PYTHON_OUTPUT_DIRECTORY}\;${WIN_PYTHONPATH}" - "PATH=$\;${WIN_PATH}$" + "PATH=$\;${WIN_PATH}" ) else() set_property(TEST ${test_name}