Skip to content

Commit

Permalink
Put mpi suffix in MODL target_link_libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
folmos-at-orange committed Oct 4, 2023
1 parent d260a14 commit 382a5d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pack-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name: Create RPM package
on:
workflow_dispatch:
pull_request:
paths: ['**CMakeLists.txt', '**.cmake']
jobs:
build-rpm-package:
runs-on: ubuntu-latest
Expand Down
14 changes: 6 additions & 8 deletions src/Learning/MODL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# on fedora, binaries built with mpi must ended by _mpich suffix
file(GLOB cppfiles ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
add_executable(MODL${MPI_SUFFIX} ${cppfiles} MODL.rc)

# MODL executable On Fedora, binaries built with mpi must be suffixed by _mpich (in stored ${MPI_SUFFIX})
add_executable(MODL${MPI_SUFFIX} ${cppfiles} MODL.rc)
target_link_libraries(MODL${MPI_SUFFIX} PUBLIC DTForest KMDRRuleLibrary KWLearningProblem)

set_khiops_options(MODL${MPI_SUFFIX})
if(MPI)
target_link_libraries(MODL${MPI_SUFFIX} PUBLIC PLMPI)
endif()

# MODL_SO (shared library)
add_library(MODL_SO SHARED ${cppfiles})

target_link_libraries(MODL_SO PUBLIC DTForest KMDRRuleLibrary KWLearningProblem)

if(MPI)
target_link_libraries(MODL PUBLIC PLMPI)
target_link_libraries(MODL_SO PUBLIC PLMPI)
endif()

set_target_properties(
MODL_SO
PROPERTIES PUBLIC_HEADER MODL_dll.h
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION})

set_khiops_options(MODL_SO)

0 comments on commit 382a5d3

Please sign in to comment.