From 382a5d3c1481a5c1d28afd9922616c84372ce217 Mon Sep 17 00:00:00 2001 From: Felipe Olmos Date: Tue, 3 Oct 2023 19:40:30 +0200 Subject: [PATCH] Put mpi suffix in MODL target_link_libraries --- .github/workflows/pack-rpm.yml | 2 ++ src/Learning/MODL/CMakeLists.txt | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pack-rpm.yml b/.github/workflows/pack-rpm.yml index 9fb9becbd..e7943b54f 100644 --- a/.github/workflows/pack-rpm.yml +++ b/.github/workflows/pack-rpm.yml @@ -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 diff --git a/src/Learning/MODL/CMakeLists.txt b/src/Learning/MODL/CMakeLists.txt index 7cb733f32..8389cf023 100644 --- a/src/Learning/MODL/CMakeLists.txt +++ b/src/Learning/MODL/CMakeLists.txt @@ -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)