Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bugfix/windows-fortran-builds' i…
Browse files Browse the repository at this point in the history
…nto bugfix/windows-fortran-builds
  • Loading branch information
balos1 committed Jun 17, 2024
2 parents b6b4303 + ae39cd7 commit 7ae952e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/windows-latest-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ jobs:
working-directory: ${{github.workspace}}/build_static
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

- name: Configure CMake (Static + MPI)
run: cmake -G "Ninja" -B ${{github.workspace}}/build_static_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90

- name: Build (Static + MPI)
run: cmake --build ${{github.workspace}}/build_static_mpi

- name: Test (Static + MPI)
working-directory: ${{github.workspace}}/build_static_mpi
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

- name: Configure CMake (Shared)
run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON

Expand All @@ -58,13 +48,3 @@ jobs:
- name: Test (Shared)
working-directory: ${{github.workspace}}/build_shared
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

- name: Configure CMake (Shared + MPI)
run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared_mpi -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_UNITTESTS=OFF -DEXAMPLES_ENABLE_CXX=ON -DENABLE_MPI=ON -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -DMPI_Fortran_COMPILER=mpif90

- name: Build (Shared + MPI)
run: cmake --build ${{github.workspace}}/build_shared_mpi --output-on-failure

- name: Test (Shared + MPI)
working-directory: ${{github.workspace}}/build_shared_mpi
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
8 changes: 4 additions & 4 deletions cmake/macros/SundialsAddLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ macro(sundials_add_library target)
# --------------------------------------------------------------------------

# create the target for the object library
add_library(${obj_target} OBJECT ${sources})
add_library(${obj_target} OBJECT ${sources} ${sundials_add_library_UNPARSED_ARGUMENTS})

set_target_properties(${obj_target} PROPERTIES FOLDER "obj")

Expand Down Expand Up @@ -239,7 +239,7 @@ macro(sundials_add_library target)
# set target name
set(_actual_target_name ${target}${_lib_suffix})

add_library(${_actual_target_name} ${_libtype} $<TARGET_OBJECTS:${obj_target}>)
add_library(${_actual_target_name} ${_libtype} $<TARGET_OBJECTS:${obj_target}> ${sundials_add_library_UNPARSED_ARGUMENTS})

set_target_properties(${_actual_target_name} PROPERTIES FOLDER "src")

Expand Down Expand Up @@ -433,7 +433,8 @@ macro(sundials_add_f2003_library target)
$<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
$<INSTALL_INTERFACE:${Fortran_INSTALL_MODDIR}>
)
set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}")
set(_properties PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}"
WINDOWS_EXPORT_ALL_SYMBOLS ON)

# get the name of the C library which the fortran library interfaces to
string(REPLACE "sundials_f" "sundials_" _clib_name "${target}")
Expand All @@ -457,7 +458,6 @@ macro(sundials_add_f2003_library target)
SOVERSION ${sundials_add_f2003_library_SOVERSION}
${sundials_add_f2003_library_UNPARSED_ARGUMENTS}
)

endmacro()


Expand Down

0 comments on commit 7ae952e

Please sign in to comment.