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)