diff --git a/.github/workflows/windows-intelLLVM.yml b/.github/workflows/windows-intelLLVM.yml index 73189a7b..85a0fb40 100644 --- a/.github/workflows/windows-intelLLVM.yml +++ b/.github/workflows/windows-intelLLVM.yml @@ -48,8 +48,8 @@ jobs: - name: Setup ninja uses: seanmiddleditch/gha-setup-ninja@master - # - name: Setup upterm session - # uses: lhotari/action-upterm@v1 + - name: Setup upterm session + uses: lhotari/action-upterm@v1 - name: CMake build run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index a83b75fb..f9de534c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ if (CompileWithMTLN) endif() MESSAGE(STATUS "Using lapack precompiled libraries at: " ${LAPACK_DIR}) + if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(NGSPICE_DIR "${CMAKE_SOURCE_DIR}/precompiled_libraries/linux-gcc-rls/ngspice/") set(NGSPICE_LIB ${NGSPICE_DIR}libngspice.a) @@ -91,11 +92,6 @@ if (CompileWithMTLN) IMPORTED_LOCATION "${NGSPICE_DIR}ngspice.dll" IMPORTED_IMPLIB "${NGSPICE_DIR}ngspice.lib" ) - configure_file( - "${NGSPICE_DIR}ngspice.dll" - "${CMAKE_BINARY_DIR}/bin/ngspice.dll" - COPYONLY - ) else() message(FATAL_ERROR "ngspice precompiled libraries for this platform and/or compiler have not been found.") endif() diff --git a/test/mtln/CMakeLists.txt b/test/mtln/CMakeLists.txt index 4ab5b4fa..2a8553a2 100644 --- a/test/mtln/CMakeLists.txt +++ b/test/mtln/CMakeLists.txt @@ -25,6 +25,27 @@ target_link_libraries(mtln_solver_tests_fortran ) add_executable(mtlnsolver_tests "main_test.cpp") + +message(STATUS "Copying to: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CONFIG}/ngspice.dll") +# configure_file( +# "${NGSPICE_DIR}ngspice.dll" +# "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CONFIG}/ngspice.dll" +# COPYONLY +# ) +message(STATUS "Copying to:" $) +# configure_file( +# "${NGSPICE_DIR}ngspice.dll" +# "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CONFIG}/ngspice.dll" +# COPYONLY +# ) +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + add_custom_command(TARGET mtlnsolver_tests POST_BUILD # Adds a post-build event to MyTest + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${NGSPICE_DIR}ngspice.dll" + $ + ) +endif() + target_link_libraries(mtlnsolver_tests mtln_solver_tests_fortran GTest::gtest_main