Skip to content

Commit

Permalink
Fix MODL_Coclustering double size in windows
Browse files Browse the repository at this point in the history
The MODL_Coclustering.exe executable in windows had doubled in size
because the MSVC link option `/INCREMENTAL` was activated.

This wasn't the case for the original build with VS projects.
  • Loading branch information
folmos-at-orange committed Nov 27, 2023
1 parent c3c41e3 commit ac429b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions src/Learning/MODL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
file(GLOB cppfiles ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

# MODL executable On Fedora, binaries built with mpi must be suffixed by _mpich (in stored ${MPI_SUFFIX})
# on fedora, binaries built with mpi must ended by _mpich 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)
Expand Down
5 changes: 0 additions & 5 deletions src/Learning/MODL_Coclustering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ file(GLOB cppfiles ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
# on fedora, binaries built with mpi must ended by _mpich suffix
add_executable(MODL_Coclustering${MPI_SUFFIX} ${cppfiles} MODL_Coclustering.rc)
set_khiops_options(MODL_Coclustering${MPI_SUFFIX})

target_link_libraries(MODL_Coclustering${MPI_SUFFIX} PUBLIC KMDRRuleLibrary KWLearningProblem)

if(MSVC)
target_link_options(MODL_Coclustering${MPI_SUFFIX} PUBLIC "/INCREMENTAL")
endif()

add_library(MODL_Coclustering_SO SHARED ${cppfiles})
target_link_libraries(MODL_Coclustering_SO PUBLIC KMDRRuleLibrary KWLearningProblem)
set_target_properties(
Expand Down

0 comments on commit ac429b9

Please sign in to comment.