From 4b2e3b708d3fa25d0d1c775ec8912ff02e706226 Mon Sep 17 00:00:00 2001 From: Date: Tue, 30 Jan 2018 17:11:31 +0100 Subject: [PATCH 01/29] add copy dll into lib directory for plugins dll copy --- cmake/RINGMesh.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 33323f9a9..43940a7fe 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -129,6 +129,10 @@ if(RINGMESH_WITH_GRAPHICS) add_ringmesh_library(visualize) endif(RINGMESH_WITH_GRAPHICS) +#copy dll to make it accessible for plugins +copy_for_windows(${PROJECT_BINARY_DIR}/lib) + + #------------------------------------------------------------------------------------------------ # Optional modules configuration From 1d1334467466449f05e10ec21a31ed4a2e638c52 Mon Sep 17 00:00:00 2001 From: Date: Tue, 30 Jan 2018 22:28:18 +0100 Subject: [PATCH 02/29] change path --- cmake/RINGMesh.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 43940a7fe..99ba16c64 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -130,7 +130,7 @@ if(RINGMESH_WITH_GRAPHICS) endif(RINGMESH_WITH_GRAPHICS) #copy dll to make it accessible for plugins -copy_for_windows(${PROJECT_BINARY_DIR}/lib) +copy_for_windows(${PROJECT_BINARY_DIR}) #------------------------------------------------------------------------------------------------ From 4c3daa9a8fc61e036d67c18d61f2f20d4042225e Mon Sep 17 00:00:00 2001 From: Date: Tue, 30 Jan 2018 22:56:12 +0100 Subject: [PATCH 03/29] fix copy dll --- cmake/RINGMesh.cmake | 10 ++++----- cmake/utils.cmake | 50 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 99ba16c64..f650c7b16 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -130,7 +130,7 @@ if(RINGMESH_WITH_GRAPHICS) endif(RINGMESH_WITH_GRAPHICS) #copy dll to make it accessible for plugins -copy_for_windows(${PROJECT_BINARY_DIR}) +copy_for_windows_deps(${PROJECT_BINARY_DIR}) #------------------------------------------------------------------------------------------------ @@ -140,7 +140,7 @@ set(binary_source_dir ${PROJECT_SOURCE_DIR}/src/bin) if(BUILD_RINGMESH_VIEW) message(STATUS "Configure ringmesh-view") add_ringmesh_binary(${binary_source_dir}/ringmesh-view.cpp visualize) - copy_for_windows(${PROJECT_BINARY_DIR}/bin) + copy_for_windows_all(${PROJECT_BINARY_DIR}/bin) endif() if(RINGMESH_WITH_UTILITIES) @@ -150,13 +150,13 @@ if(RINGMESH_WITH_UTILITIES) foreach(utility_src ${utility_sources}) add_ringmesh_binary(${utility_src} geomodel_tools io) endforeach() - copy_for_windows(${PROJECT_BINARY_DIR}/bin) + copy_for_windows_all(${PROJECT_BINARY_DIR}/bin) endif() if(RINGMESH_WITH_TUTORIALS) message(STATUS "Configuring RINGMesh with tutorials") add_subdirectory(doc/tutorials) - copy_for_windows(${PROJECT_BINARY_DIR}/bin/tutorials) + copy_for_windows_all(${PROJECT_BINARY_DIR}/bin/tutorials) endif() if(RINGMESH_WITH_TESTS) @@ -164,7 +164,7 @@ if(RINGMESH_WITH_TESTS) enable_testing() message(STATUS "Configuring RINGMesh with tests") add_subdirectory(tests) - copy_for_windows(${PROJECT_BINARY_DIR}/bin/tests) + copy_for_windows_all(${PROJECT_BINARY_DIR}/bin/tests) endif() #------------------------------------------------------------------------------------------------ diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 3089187f5..4bb4aebc5 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -116,6 +116,56 @@ if(WIN32) endif(WIN32) endmacro() +macro(copy_for_windows_deps directory) + + # On windows, without proper installation steps, we need to + # copy of Geogram dll and pdb information to RINGMesh + # to be able to launch RINGMesh utilities and tests from the debugger + + # The dll and debug info of RINGMesh are in + # build/ringmesh/Debug or build/ringmesh/Release. +if(WIN32) + add_custom_command(TARGET copy_dll POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${GEOGRAM_INSTALL_PREFIX}/bin" + "${directory}/$" + COMMENT "Copy geogram binaries") + add_custom_command(TARGET copy_dll POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${GEOGRAM_INSTALL_PREFIX}/lib" + "${directory}/$" + COMMENT "Copy geogram visualization libraries") + add_custom_command(TARGET copy_dll POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${ZLIB_ROOT}/bin" + "${directory}/$" + COMMENT "Copy zlib binaries") + add_custom_command(TARGET copy_dll POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${TINYXML2_INSTALL_PREFIX}/bin" + "${directory}/$" + COMMENT "Copy tinyxml2 binaries") +endif(WIN32) +endmacro() + + +macro(copy_for_windows_all directory) + + # On windows, without proper installation steps, we need to + # copy of Geogram dll and pdb information to RINGMesh + # to be able to launch RINGMesh utilities and tests from the debugger + + # The dll and debug info of RINGMesh are in + # build/ringmesh/Debug or build/ringmesh/Release. +if(WIN32) + add_custom_command(TARGET copy_dll POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${PROJECT_BINARY_DIR}/$" + "${directory}/$" + COMMENT "Copy RINGMesh dll") +endif(WIN32) +endmacro() + macro(add_ringmesh_executable exe_path folder_name) get_filename_component(exe_name ${exe_path} NAME_WE) From 398463c574fb0370d589a7b27c9d1e3ae19fede4 Mon Sep 17 00:00:00 2001 From: Date: Wed, 31 Jan 2018 11:31:55 +0100 Subject: [PATCH 04/29] improve documentation --- cmake/RINGMesh.cmake | 13 +++++------ cmake/utils.cmake | 55 +++++++++++++++----------------------------- 2 files changed, 24 insertions(+), 44 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index f650c7b16..500287dde 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -129,9 +129,8 @@ if(RINGMESH_WITH_GRAPHICS) add_ringmesh_library(visualize) endif(RINGMESH_WITH_GRAPHICS) -#copy dll to make it accessible for plugins -copy_for_windows_deps(${PROJECT_BINARY_DIR}) - +#Copy dll from RINGMesh third parties to make it accessible for plugins +copy_deps_dll_window() #------------------------------------------------------------------------------------------------ # Optional modules configuration @@ -140,7 +139,7 @@ set(binary_source_dir ${PROJECT_SOURCE_DIR}/src/bin) if(BUILD_RINGMESH_VIEW) message(STATUS "Configure ringmesh-view") add_ringmesh_binary(${binary_source_dir}/ringmesh-view.cpp visualize) - copy_for_windows_all(${PROJECT_BINARY_DIR}/bin) + copy_for_all_ringmesh_dlls(${PROJECT_BINARY_DIR}/bin) endif() if(RINGMESH_WITH_UTILITIES) @@ -150,13 +149,13 @@ if(RINGMESH_WITH_UTILITIES) foreach(utility_src ${utility_sources}) add_ringmesh_binary(${utility_src} geomodel_tools io) endforeach() - copy_for_windows_all(${PROJECT_BINARY_DIR}/bin) + copy_for_all_ringmesh_dlls(${PROJECT_BINARY_DIR}/bin) endif() if(RINGMESH_WITH_TUTORIALS) message(STATUS "Configuring RINGMesh with tutorials") add_subdirectory(doc/tutorials) - copy_for_windows_all(${PROJECT_BINARY_DIR}/bin/tutorials) + copy_for_all_ringmesh_dlls(${PROJECT_BINARY_DIR}/bin/tutorials) endif() if(RINGMESH_WITH_TESTS) @@ -164,7 +163,7 @@ if(RINGMESH_WITH_TESTS) enable_testing() message(STATUS "Configuring RINGMesh with tests") add_subdirectory(tests) - copy_for_windows_all(${PROJECT_BINARY_DIR}/bin/tests) + copy_for_all_ringmesh_dlls(${PROJECT_BINARY_DIR}/bin/tests) endif() #------------------------------------------------------------------------------------------------ diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 4bb4aebc5..e91fab866 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -79,76 +79,57 @@ function(add_ringmesh_library directory) ) endfunction() -macro(copy_for_windows directory) +macro(copy_deps_dll_window) # On windows, without proper installation steps, we need to - # copy of Geogram dll and pdb information to RINGMesh - # to be able to launch RINGMesh utilities and tests from the debugger - - # The dll and debug info of RINGMesh are in + # copy of dlls of all third parties and pdb information. + # This dlls are put in the RINGMesh dll directory: # build/ringmesh/Debug or build/ringmesh/Release. + if(WIN32) - add_custom_command(TARGET copy_dll POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${PROJECT_BINARY_DIR}/$" - "${directory}/$" - COMMENT "Copy RINGMesh dll") add_custom_command(TARGET copy_dll POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${GEOGRAM_INSTALL_PREFIX}/bin" - "${directory}/$" + "${PROJECT_BINARY_DIR}/$" COMMENT "Copy geogram binaries") add_custom_command(TARGET copy_dll POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${GEOGRAM_INSTALL_PREFIX}/lib" - "${directory}/$" + "${PROJECT_BINARY_DIR}/$" COMMENT "Copy geogram visualization libraries") add_custom_command(TARGET copy_dll POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${ZLIB_ROOT}/bin" - "${directory}/$" + "${PROJECT_BINARY_DIR}/$" COMMENT "Copy zlib binaries") add_custom_command(TARGET copy_dll POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${TINYXML2_INSTALL_PREFIX}/bin" - "${directory}/$" + "${PROJECT_BINARY_DIR}/$" COMMENT "Copy tinyxml2 binaries") endif(WIN32) endmacro() -macro(copy_for_windows_deps directory) +macro(copy_for_all_ringmesh_dlls directory) # On windows, without proper installation steps, we need to - # copy of Geogram dll and pdb information to RINGMesh - # to be able to launch RINGMesh utilities and tests from the debugger + # copy of all dlls and pdb information from RINGMesh and its + # third parties to binary folder. + + # All third parties informations + # have already been copied to the RINGMesh dll folder + # (copy_deps_dll_window()). We only need to copy it to + # the needed directory. - # The dll and debug info of RINGMesh are in - # build/ringmesh/Debug or build/ringmesh/Release. if(WIN32) add_custom_command(TARGET copy_dll POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${GEOGRAM_INSTALL_PREFIX}/bin" - "${directory}/$" - COMMENT "Copy geogram binaries") - add_custom_command(TARGET copy_dll POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${GEOGRAM_INSTALL_PREFIX}/lib" - "${directory}/$" - COMMENT "Copy geogram visualization libraries") - add_custom_command(TARGET copy_dll POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${ZLIB_ROOT}/bin" - "${directory}/$" - COMMENT "Copy zlib binaries") - add_custom_command(TARGET copy_dll POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${TINYXML2_INSTALL_PREFIX}/bin" + "${PROJECT_BINARY_DIR}/$" "${directory}/$" - COMMENT "Copy tinyxml2 binaries") + COMMENT "Copy RINGMesh dll") endif(WIN32) endmacro() - macro(copy_for_windows_all directory) # On windows, without proper installation steps, we need to From c7888f095917d97917a5d937662748c993b4dfe3 Mon Sep 17 00:00:00 2001 From: Date: Wed, 31 Jan 2018 11:58:07 +0100 Subject: [PATCH 05/29] change postbuild to prebuild process --- cmake/utils.cmake | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index e91fab866..b80d69f38 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -83,26 +83,26 @@ macro(copy_deps_dll_window) # On windows, without proper installation steps, we need to # copy of dlls of all third parties and pdb information. - # This dlls are put in the RINGMesh dll directory: + # This dlls are put in the RINGMesh dll directory: # build/ringmesh/Debug or build/ringmesh/Release. if(WIN32) - add_custom_command(TARGET copy_dll POST_BUILD + add_custom_command(TARGET copy_dll PRE_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${GEOGRAM_INSTALL_PREFIX}/bin" "${PROJECT_BINARY_DIR}/$" COMMENT "Copy geogram binaries") - add_custom_command(TARGET copy_dll POST_BUILD + add_custom_command(TARGET copy_dll PRE_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${GEOGRAM_INSTALL_PREFIX}/lib" "${PROJECT_BINARY_DIR}/$" COMMENT "Copy geogram visualization libraries") - add_custom_command(TARGET copy_dll POST_BUILD + add_custom_command(TARGET copy_dll PRE_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${ZLIB_ROOT}/bin" "${PROJECT_BINARY_DIR}/$" COMMENT "Copy zlib binaries") - add_custom_command(TARGET copy_dll POST_BUILD + add_custom_command(TARGET copy_dll PRE_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory "${TINYXML2_INSTALL_PREFIX}/bin" "${PROJECT_BINARY_DIR}/$" @@ -114,30 +114,13 @@ macro(copy_for_all_ringmesh_dlls directory) # On windows, without proper installation steps, we need to # copy of all dlls and pdb information from RINGMesh and its - # third parties to binary folder. - - # All third parties informations - # have already been copied to the RINGMesh dll folder - # (copy_deps_dll_window()). We only need to copy it to - # the needed directory. - -if(WIN32) - add_custom_command(TARGET copy_dll POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${PROJECT_BINARY_DIR}/$" - "${directory}/$" - COMMENT "Copy RINGMesh dll") -endif(WIN32) -endmacro() - -macro(copy_for_windows_all directory) - - # On windows, without proper installation steps, we need to - # copy of Geogram dll and pdb information to RINGMesh - # to be able to launch RINGMesh utilities and tests from the debugger + # third parties to binary folder. + + # All third parties informations + # have already been copied to the RINGMesh dll folder + # (copy_deps_dll_window()). We only need to copy it to + # the needed directory. - # The dll and debug info of RINGMesh are in - # build/ringmesh/Debug or build/ringmesh/Release. if(WIN32) add_custom_command(TARGET copy_dll POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory From f45bfdebf4b5665e7e97b4f9e345d401d2d13ca5 Mon Sep 17 00:00:00 2001 From: Date: Fri, 2 Feb 2018 16:14:01 +0100 Subject: [PATCH 06/29] add d for debug dll --- cmake/RINGMesh.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index bb16798cb..1888560d6 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -126,6 +126,8 @@ set(CMAKE_INSTALL_RPATH ".") # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +# to distinguish between debug and release lib +set(CMAKE_DEBUG_POSTFIX "d") #------------------------------------------------------------------------------------------------ # file automatically generated by cmake From 963f274fc4841f5bc0e0e55a935df638b092a5e3 Mon Sep 17 00:00:00 2001 From: Date: Fri, 2 Feb 2018 16:36:37 +0100 Subject: [PATCH 07/29] update dll path --- cmake/utils.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 91397faa3..f17765ed9 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -72,9 +72,9 @@ function(add_ringmesh_library directory) ) install(TARGETS ${target_name} EXPORT ${target_name} - RUNTIME DESTINATION bin/${config} - LIBRARY DESTINATION lib/${config} - ARCHIVE DESTINATION lib/${config} + RUNTIME DESTINATION bin/$ + LIBRARY DESTINATION lib/$ + ARCHIVE DESTINATION lib/$ ) install(EXPORT ${target_name} FILE RINGMesh_${target_name}_target.cmake From f60b55a123eef91df895c92680186aa5a3ff54e2 Mon Sep 17 00:00:00 2001 From: Date: Fri, 2 Feb 2018 17:23:59 +0100 Subject: [PATCH 08/29] upfdate exe path --- cmake/RINGMesh.cmake | 2 +- cmake/utils.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 1888560d6..0866f9a7d 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -68,7 +68,7 @@ if(WIN32) FILES ${GEOGRAM_INSTALL_PREFIX}/lib/glfw3.dll DESTINATION - bin + bin/$ ) endif() diff --git a/cmake/utils.cmake b/cmake/utils.cmake index f17765ed9..f84587279 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,13 +173,13 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../lib" + INSTALL_RPATH "${OS_RPATH}/../lib/" ) endmacro() function(add_ringmesh_binary bin_path) add_ringmesh_executable(${bin_path} "Utilities" ${ARGN}) - install(TARGETS ${exe_name} RUNTIME DESTINATION bin) + install(TARGETS ${exe_name} RUNTIME DESTINATION bin/$) set_target_properties(${exe_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) endfunction() From 96d5496d7df77d12f115fa2dc9d19d59dab57c7e Mon Sep 17 00:00:00 2001 From: Date: Fri, 2 Feb 2018 17:37:26 +0100 Subject: [PATCH 09/29] update third parties path install --- cmake/RINGMesh.cmake | 16 ++++++++++++---- cmake/utils.cmake | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 0866f9a7d..d27098997 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -57,11 +57,19 @@ include(${MINIZIP_INSTALL_PREFIX}/cmake/minizip-exports.cmake) install( DIRECTORY - ${TINYXML2_INSTALL_PREFIX}/ - ${ZLIB_ROOT}/ - ${GEOGRAM_INSTALL_PREFIX}/ + ${TINYXML2_INSTALL_PREFIX}/lib/ + ${ZLIB_ROOT}/lib/ + ${GEOGRAM_INSTALL_PREFIX}/lib/ DESTINATION - . + lib/$ +) +install( + DIRECTORY + ${TINYXML2_INSTALL_PREFIX}/bin/ + ${ZLIB_ROOT}/bin/ + ${GEOGRAM_INSTALL_PREFIX}/bin/ + DESTINATION + bin/$ ) if(WIN32) install( diff --git a/cmake/utils.cmake b/cmake/utils.cmake index f84587279..f4d945757 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,7 +173,7 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../lib/" + INSTALL_RPATH "${OS_RPATH}/../lib" ) endmacro() From 236c5ed05e63b86cc3ac635fe8ed7d886833b81d Mon Sep 17 00:00:00 2001 From: Date: Mon, 5 Feb 2018 14:35:54 +0100 Subject: [PATCH 10/29] fix loading lib for plugins --- src/ringmesh/basic/plugin_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ringmesh/basic/plugin_manager.cpp b/src/ringmesh/basic/plugin_manager.cpp index 88a851528..47506898a 100644 --- a/src/ringmesh/basic/plugin_manager.cpp +++ b/src/ringmesh/basic/plugin_manager.cpp @@ -240,8 +240,11 @@ namespace RINGMesh { throw RINGMeshException( "Plugin", plugin_name, " already loaded" ); } - +#ifdef RINGMESH_DEBUG + impl_->load_library( plugin_name+"d" ); +#else impl_->load_library( plugin_name ); +#endif plugins.push_back( plugin_name ); } catch( RINGMeshException& e ) From 20b941f1d0b70d63acd4a8bcec3e0e2e9be3c35d Mon Sep 17 00:00:00 2001 From: Date: Mon, 5 Feb 2018 15:31:33 +0100 Subject: [PATCH 11/29] fix lib loading debug --- src/ringmesh/basic/plugin_manager.cpp | 5 +---- src/ringmesh/mesh/common.cpp | 8 +++++++ tests/basic/test-plugin-manager.cpp | 21 +++++++++++++++---- .../test-geogram-mesh-factories.cpp | 5 ++++- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/ringmesh/basic/plugin_manager.cpp b/src/ringmesh/basic/plugin_manager.cpp index 47506898a..88a851528 100644 --- a/src/ringmesh/basic/plugin_manager.cpp +++ b/src/ringmesh/basic/plugin_manager.cpp @@ -240,11 +240,8 @@ namespace RINGMesh { throw RINGMeshException( "Plugin", plugin_name, " already loaded" ); } -#ifdef RINGMESH_DEBUG - impl_->load_library( plugin_name+"d" ); -#else + impl_->load_library( plugin_name ); -#endif plugins.push_back( plugin_name ); } catch( RINGMeshException& e ) diff --git a/src/ringmesh/mesh/common.cpp b/src/ringmesh/mesh/common.cpp index ce58e466d..3705bcebb 100755 --- a/src/ringmesh/mesh/common.cpp +++ b/src/ringmesh/mesh/common.cpp @@ -41,9 +41,17 @@ namespace { +#ifdef RINGMESH_DEBUG + RINGMESH_PLUGIN_INITIALIZE( + RINGMesh_mesh, + // Plugin initialization + RINGMesh::PluginManager::load_plugin( "RINGMesh_geogram_extensiond" ); + ); +#else RINGMESH_PLUGIN_INITIALIZE( RINGMesh_mesh, // Plugin initialization RINGMesh::PluginManager::load_plugin( "RINGMesh_geogram_extension" ); ); +#endif } // namespace diff --git a/tests/basic/test-plugin-manager.cpp b/tests/basic/test-plugin-manager.cpp index f62a25215..48cc64688 100644 --- a/tests/basic/test-plugin-manager.cpp +++ b/tests/basic/test-plugin-manager.cpp @@ -60,7 +60,11 @@ void load_plugin_from_command_line() void load_plugin_from_file() { std::ofstream config( PluginManager::configuration_file ); +#ifdef RINGMESH_DEBUG + config << "RINGMesh_iod"; +#else config << "RINGMesh_io"; +#endif config.close(); if( !PluginManager::load_plugins() ) { @@ -71,27 +75,36 @@ void load_plugin_from_file() void load_plugin_from_code() { - auto status = PluginManager::load_plugin( "RINGMesh_geomodel_builder" ); +#ifdef RINGMESH_DEBUG + auto status = PluginManager::load_plugin( "RINGMesh_geomodel_builderd" ); +#else + status = PluginManager::load_plugin( "RINGMesh_geomodel_builder" ); +#endif if( !status ) { throw RINGMeshException( "TEST", "Failed to load RINGMesh_geomodel_builder" ); } - +#ifdef RINGMESH_DEBUG + status = PluginManager::load_plugin( "RINGMesh_geomodel_cored" ); +#else status = PluginManager::load_plugin( "RINGMesh_geomodel_core" ); +#endif if( !status ) { throw RINGMeshException( "TEST", "Failed to load RINGMesh_geomodel_core" ); } - +#ifdef RINGMESH_DEBUG + status = PluginManager::load_plugin( "RINGMesh_geomodel_cored" ); +#else status = PluginManager::load_plugin( "RINGMesh_geomodel_core" ); +#endif if( status ) { throw RINGMeshException( "TEST", "Not supposed to load RINGMesh_geomodel_core twice" ); } - status = PluginManager::load_plugin( "Foo" ); if( status ) { diff --git a/tests/geogram_extension/test-geogram-mesh-factories.cpp b/tests/geogram_extension/test-geogram-mesh-factories.cpp index 9f4d14206..3ce7f3d01 100644 --- a/tests/geogram_extension/test-geogram-mesh-factories.cpp +++ b/tests/geogram_extension/test-geogram-mesh-factories.cpp @@ -112,8 +112,11 @@ int main() { try { +#ifdef RINGMESH_DEBUG PluginManager::load_plugin( "RINGMesh_geogram_extension" ); - +#else + PluginManager::load_plugin( "RINGMesh_geogram_extension" ); +#endif Logger::out( "TEST", "Is geogram plugin well loaded?" ); // Test geogram mesh register test_geogram_factory_2D(); From eaee60f664fa32092711792058a86486c86f6b8d Mon Sep 17 00:00:00 2001 From: Date: Mon, 5 Feb 2018 15:34:24 +0100 Subject: [PATCH 12/29] update test-io --- tests/io/test-io-initialize.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/io/test-io-initialize.cpp b/tests/io/test-io-initialize.cpp index d21402a65..5a780b440 100644 --- a/tests/io/test-io-initialize.cpp +++ b/tests/io/test-io-initialize.cpp @@ -82,7 +82,11 @@ int main() { try { +#ifdef RINGMESH_DEBUG + PluginManager::load_plugin( "RINGMesh_iod" ); +#else PluginManager::load_plugin( "RINGMesh_io" ); +#endif Logger::out( "TEST", "Is io plugin well loaded?" ); // Test mesh initialize From cea2dc1037f8302cdde8137c2f4fbbfe37531913 Mon Sep 17 00:00:00 2001 From: Date: Mon, 5 Feb 2018 16:32:58 +0100 Subject: [PATCH 13/29] update test-tetragen-initilize --- tests/tetrahedralize/test-tetragen-initialize.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tetrahedralize/test-tetragen-initialize.cpp b/tests/tetrahedralize/test-tetragen-initialize.cpp index 8713a1f49..4321032b5 100644 --- a/tests/tetrahedralize/test-tetragen-initialize.cpp +++ b/tests/tetrahedralize/test-tetragen-initialize.cpp @@ -77,7 +77,11 @@ int main() { try { +#ifdef RINGMESH_DEBUG + PluginManager::load_plugin( "RINGMesh_tetrahedralized" ); +#else PluginManager::load_plugin( "RINGMesh_tetrahedralize" ); +#endif Logger::out( "TEST", "Is tetragen initialized?" ); test_tetragen_initialize(); From 8d8aa39c6384507f94dbd366d7112c4b441a7350 Mon Sep 17 00:00:00 2001 From: Date: Mon, 5 Feb 2018 16:36:09 +0100 Subject: [PATCH 14/29] update geogram mesh factory --- tests/geogram_extension/test-geogram-mesh-factories.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/geogram_extension/test-geogram-mesh-factories.cpp b/tests/geogram_extension/test-geogram-mesh-factories.cpp index 3ce7f3d01..d3e8029ae 100644 --- a/tests/geogram_extension/test-geogram-mesh-factories.cpp +++ b/tests/geogram_extension/test-geogram-mesh-factories.cpp @@ -113,7 +113,7 @@ int main() try { #ifdef RINGMESH_DEBUG - PluginManager::load_plugin( "RINGMesh_geogram_extension" ); + PluginManager::load_plugin( "RINGMesh_geogram_extensiond" ); #else PluginManager::load_plugin( "RINGMesh_geogram_extension" ); #endif From 31242b07d591a0ebe187ee50c6bc9416fb8481bc Mon Sep 17 00:00:00 2001 From: Date: Tue, 6 Feb 2018 11:01:01 +0100 Subject: [PATCH 15/29] integrate arnaud's corrections. fix Rpath --- cmake/utils.cmake | 2 +- tests/basic/test-plugin-manager.cpp | 25 ++++++++----------- .../test-geogram-mesh-factories.cpp | 7 +++--- tests/io/test-io-initialize.cpp | 6 ++--- .../test-tetragen-initialize.cpp | 7 +++--- 5 files changed, 22 insertions(+), 25 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index f4d945757..acc9f283d 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,7 +173,7 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../lib" + INSTALL_RPATH "${OS_RPATH}/../lib/$" ) endmacro() diff --git a/tests/basic/test-plugin-manager.cpp b/tests/basic/test-plugin-manager.cpp index 48cc64688..aa9eae0e7 100644 --- a/tests/basic/test-plugin-manager.cpp +++ b/tests/basic/test-plugin-manager.cpp @@ -60,11 +60,11 @@ void load_plugin_from_command_line() void load_plugin_from_file() { std::ofstream config( PluginManager::configuration_file ); + config << "RINGMesh_io"; #ifdef RINGMESH_DEBUG - config << "RINGMesh_iod"; -#else - config << "RINGMesh_io"; + config << "d"; #endif + config.close(); if( !PluginManager::load_plugins() ) { @@ -75,31 +75,28 @@ void load_plugin_from_file() void load_plugin_from_code() { + std::string geomodel_builder = "RINGMesh_geomodel_builder"; #ifdef RINGMESH_DEBUG - auto status = PluginManager::load_plugin( "RINGMesh_geomodel_builderd" ); -#else - status = PluginManager::load_plugin( "RINGMesh_geomodel_builder" ); + geomodel_builder += "d"; #endif + auto status = PluginManager::load_plugin( geomodel_builder ); if( !status ) { throw RINGMeshException( "TEST", "Failed to load RINGMesh_geomodel_builder" ); } + + std::string geomodel_core = "RINGMesh_geomodel_core"; #ifdef RINGMESH_DEBUG - status = PluginManager::load_plugin( "RINGMesh_geomodel_cored" ); -#else - status = PluginManager::load_plugin( "RINGMesh_geomodel_core" ); + geomodel_core += "d"; #endif + status = PluginManager::load_plugin( geomodel_core ); if( !status ) { throw RINGMeshException( "TEST", "Failed to load RINGMesh_geomodel_core" ); } -#ifdef RINGMESH_DEBUG - status = PluginManager::load_plugin( "RINGMesh_geomodel_cored" ); -#else - status = PluginManager::load_plugin( "RINGMesh_geomodel_core" ); -#endif + status = PluginManager::load_plugin( geomodel_core ); if( status ) { throw RINGMeshException( diff --git a/tests/geogram_extension/test-geogram-mesh-factories.cpp b/tests/geogram_extension/test-geogram-mesh-factories.cpp index d3e8029ae..74e513609 100644 --- a/tests/geogram_extension/test-geogram-mesh-factories.cpp +++ b/tests/geogram_extension/test-geogram-mesh-factories.cpp @@ -112,11 +112,12 @@ int main() { try { + std::string geo_ext = "RINGMesh_geogram_extension"; #ifdef RINGMESH_DEBUG - PluginManager::load_plugin( "RINGMesh_geogram_extensiond" ); -#else - PluginManager::load_plugin( "RINGMesh_geogram_extension" ); + geo_ext += "d"; #endif + PluginManager::load_plugin( geo_ext ); + Logger::out( "TEST", "Is geogram plugin well loaded?" ); // Test geogram mesh register test_geogram_factory_2D(); diff --git a/tests/io/test-io-initialize.cpp b/tests/io/test-io-initialize.cpp index 5a780b440..32f9c58a3 100644 --- a/tests/io/test-io-initialize.cpp +++ b/tests/io/test-io-initialize.cpp @@ -82,11 +82,11 @@ int main() { try { + std::string geo_io = "RINGMesh_io"; #ifdef RINGMESH_DEBUG - PluginManager::load_plugin( "RINGMesh_iod" ); -#else - PluginManager::load_plugin( "RINGMesh_io" ); + geo_io += "d"; #endif + PluginManager::load_plugin( geo_io ); Logger::out( "TEST", "Is io plugin well loaded?" ); // Test mesh initialize diff --git a/tests/tetrahedralize/test-tetragen-initialize.cpp b/tests/tetrahedralize/test-tetragen-initialize.cpp index 4321032b5..5f08173ea 100644 --- a/tests/tetrahedralize/test-tetragen-initialize.cpp +++ b/tests/tetrahedralize/test-tetragen-initialize.cpp @@ -77,12 +77,11 @@ int main() { try { + std::string tetrahedralize = "RINGMesh_tetrahedralize"; #ifdef RINGMESH_DEBUG - PluginManager::load_plugin( "RINGMesh_tetrahedralized" ); -#else - PluginManager::load_plugin( "RINGMesh_tetrahedralize" ); + tetrahedralize += "d"; #endif - + PluginManager::load_plugin( tetrahedralize ); Logger::out( "TEST", "Is tetragen initialized?" ); test_tetragen_initialize(); } From 8ed55e7c59f0b5fc56871295b73c5a5c2fe0d113 Mon Sep 17 00:00:00 2001 From: Date: Tue, 6 Feb 2018 11:45:33 +0100 Subject: [PATCH 16/29] fix visual dll path and rpath --- cmake/RINGMesh.cmake | 1 + cmake/utils.cmake | 2 +- tests/geogram_extension/test-geogram-mesh-factories.cpp | 6 +++--- tests/io/test-io-initialize.cpp | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index d27098997..a114e0810 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -153,6 +153,7 @@ install( # Exports RINGMesh target include(CMakePackageConfigHelpers) +set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin/$) include(InstallRequiredSystemLibraries) configure_package_config_file( cmake/RINGMeshConfig.cmake.in diff --git a/cmake/utils.cmake b/cmake/utils.cmake index acc9f283d..1d1ade28b 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,7 +173,7 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../lib/$" + INSTALL_RPATH "${OS_RPATH}/../$/lib" ) endmacro() diff --git a/tests/geogram_extension/test-geogram-mesh-factories.cpp b/tests/geogram_extension/test-geogram-mesh-factories.cpp index 74e513609..dd4ea3c5d 100644 --- a/tests/geogram_extension/test-geogram-mesh-factories.cpp +++ b/tests/geogram_extension/test-geogram-mesh-factories.cpp @@ -112,11 +112,11 @@ int main() { try { - std::string geo_ext = "RINGMesh_geogram_extension"; + std::string geogram_ext = "RINGMesh_geogram_extension"; #ifdef RINGMESH_DEBUG - geo_ext += "d"; + geogram_ext += "d"; #endif - PluginManager::load_plugin( geo_ext ); + PluginManager::load_plugin( geogram_ext ); Logger::out( "TEST", "Is geogram plugin well loaded?" ); // Test geogram mesh register diff --git a/tests/io/test-io-initialize.cpp b/tests/io/test-io-initialize.cpp index 32f9c58a3..5aab5a18f 100644 --- a/tests/io/test-io-initialize.cpp +++ b/tests/io/test-io-initialize.cpp @@ -82,11 +82,11 @@ int main() { try { - std::string geo_io = "RINGMesh_io"; + std::string io = "RINGMesh_io"; #ifdef RINGMESH_DEBUG - geo_io += "d"; + io += "d"; #endif - PluginManager::load_plugin( geo_io ); + PluginManager::load_plugin( io ); Logger::out( "TEST", "Is io plugin well loaded?" ); // Test mesh initialize From f47c12b950b38ec53d4864a329e99dc34d247eeb Mon Sep 17 00:00:00 2001 From: Francois Bonneau Date: Tue, 6 Feb 2018 11:50:31 +0100 Subject: [PATCH 17/29] Update utils.cmake --- cmake/utils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 1d1ade28b..ca40e0792 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,7 +173,7 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../$/lib" + INSTALL_RPATH "${OS_RPATH}/../$/lib" ) endmacro() From 12f73aee1dff8ca3860969c808a3799ef91c5a6d Mon Sep 17 00:00:00 2001 From: Francois Bonneau Date: Tue, 6 Feb 2018 12:10:42 +0100 Subject: [PATCH 18/29] Update utils.cmake --- cmake/utils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index ca40e0792..c915a1bc6 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,7 +173,7 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../$/lib" + INSTALL_RPATH "${OS_RPATH}/../${CMAKE_BUILD_TYPE}/lib" ) endmacro() From cbc951e40fe6a3f36133192add834499f69eab4b Mon Sep 17 00:00:00 2001 From: Francois Bonneau Date: Tue, 6 Feb 2018 12:14:15 +0100 Subject: [PATCH 19/29] Update RINGMesh.cmake --- cmake/RINGMesh.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index a114e0810..2123bd735 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -153,7 +153,7 @@ install( # Exports RINGMesh target include(CMakePackageConfigHelpers) -set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin/$) +set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin/${CMAKE_BUILD_TYPE}) include(InstallRequiredSystemLibraries) configure_package_config_file( cmake/RINGMeshConfig.cmake.in From 177c322df4cdd65d3b995f1d5674065624779591 Mon Sep 17 00:00:00 2001 From: Francois Bonneau Date: Tue, 6 Feb 2018 13:47:18 +0100 Subject: [PATCH 20/29] Update utils.cmake --- cmake/utils.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index c915a1bc6..a6cb78982 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -72,9 +72,9 @@ function(add_ringmesh_library directory) ) install(TARGETS ${target_name} EXPORT ${target_name} - RUNTIME DESTINATION bin/$ - LIBRARY DESTINATION lib/$ - ARCHIVE DESTINATION lib/$ + RUNTIME DESTINATION bin/${CMAKE_BUILD_TYPE} + LIBRARY DESTINATION lib/${CMAKE_BUILD_TYPE} + ARCHIVE DESTINATION lib/${CMAKE_BUILD_TYPE} ) install(EXPORT ${target_name} FILE RINGMesh_${target_name}_target.cmake @@ -179,7 +179,7 @@ endmacro() function(add_ringmesh_binary bin_path) add_ringmesh_executable(${bin_path} "Utilities" ${ARGN}) - install(TARGETS ${exe_name} RUNTIME DESTINATION bin/$) + install(TARGETS ${exe_name} RUNTIME DESTINATION bin/${CMAKE_BUILD_TYPE}) set_target_properties(${exe_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) endfunction() From eb378821457c1833e33df6784b991222132d52a9 Mon Sep 17 00:00:00 2001 From: Francois Bonneau Date: Tue, 6 Feb 2018 13:48:22 +0100 Subject: [PATCH 21/29] Update RINGMesh.cmake --- cmake/RINGMesh.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 2123bd735..adbea3f3c 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -61,7 +61,7 @@ install( ${ZLIB_ROOT}/lib/ ${GEOGRAM_INSTALL_PREFIX}/lib/ DESTINATION - lib/$ + lib/${CMAKE_BUILD_TYPE} ) install( DIRECTORY @@ -69,14 +69,14 @@ install( ${ZLIB_ROOT}/bin/ ${GEOGRAM_INSTALL_PREFIX}/bin/ DESTINATION - bin/$ + bin/${CMAKE_BUILD_TYPE} ) if(WIN32) install( FILES ${GEOGRAM_INSTALL_PREFIX}/lib/glfw3.dll DESTINATION - bin/$ + bin/${CMAKE_BUILD_TYPE} ) endif() From 6a2b1c1a61f9d166bc42c7417b0a63fbd3abe5e3 Mon Sep 17 00:00:00 2001 From: Date: Wed, 7 Feb 2018 17:12:32 +0100 Subject: [PATCH 22/29] test fixing tests for linux --- cmake/utils.cmake | 2 +- src/ringmesh/geomodel/core/common.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index a6cb78982..64840f623 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,7 +173,7 @@ macro(add_ringmesh_executable exe_path folder_name) set_target_properties(${exe_name} PROPERTIES FOLDER ${folder_name} - INSTALL_RPATH "${OS_RPATH}/../${CMAKE_BUILD_TYPE}/lib" + INSTALL_RPATH "${OS_RPATH}/../lib" ) endmacro() diff --git a/src/ringmesh/geomodel/core/common.cpp b/src/ringmesh/geomodel/core/common.cpp index 387812667..6c80c70c2 100755 --- a/src/ringmesh/geomodel/core/common.cpp +++ b/src/ringmesh/geomodel/core/common.cpp @@ -40,11 +40,21 @@ #include namespace -{ +{#ifdef RINGMESH_DEBUG RINGMESH_PLUGIN_INITIALIZE( RINGMesh_geomodel_core, // Plugin initialization + RINGMesh::PluginManager::load_plugin( "RINGMesh_meshd" ); + RINGMesh::GeoModelGeologicalEntity2D::initialize(); + RINGMesh::GeoModelGeologicalEntity3D::initialize(); + ); +#else + RINGMESH_PLUGIN_INITIALIZE( + RINGMesh_geomodel_core, + // Plugin initialization + RINGMesh::PluginManager::load_plugin( "RINGMesh_mesh" ); RINGMesh::GeoModelGeologicalEntity2D::initialize(); RINGMesh::GeoModelGeologicalEntity3D::initialize(); ); +#endif } // namespace From 47156bf6b8180ef61db481c0eee671d542294aca Mon Sep 17 00:00:00 2001 From: Francois Bonneau Date: Wed, 7 Feb 2018 17:25:54 +0100 Subject: [PATCH 23/29] Update common.cpp --- src/ringmesh/geomodel/core/common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ringmesh/geomodel/core/common.cpp b/src/ringmesh/geomodel/core/common.cpp index 6c80c70c2..e8acc3178 100755 --- a/src/ringmesh/geomodel/core/common.cpp +++ b/src/ringmesh/geomodel/core/common.cpp @@ -40,7 +40,8 @@ #include namespace -{#ifdef RINGMESH_DEBUG +{ +#ifdef RINGMESH_DEBUG RINGMESH_PLUGIN_INITIALIZE( RINGMesh_geomodel_core, // Plugin initialization From 840045924f1fab9647502179b16954b15525cec7 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 8 Feb 2018 08:52:21 +0100 Subject: [PATCH 24/29] Update .travis.yml --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0a82cc558..a97c39194 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,9 @@ jobs: - CXX=g++ CC=gcc cmake -DRINGMESH_WITH_GRAPHICS:BOOL=ON -DRINGMESH_WITH_UTILITIES:BOOL=ON -DRINGMESH_WITH_TESTS:BOOL=ON -DRINGMESH_WITH_GUI:BOOL=ON -DRINGMESH_WITH_TUTORIALS:BOOL=ON .. - cd Coverage - build-wrapper-linux-x86-64 --out-dir $TRAVIS_BUILD_DIR/bw-outputs cmake --build . -- -j2 + - ldd ringmesh/bin/test/test-plugin-manager + - objdump -x ringmesh/bin/test/test-plugin-manager | grep RPATH + - ls ringmesh/lib - cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build ringmesh --target coverage -- -j2 - cmake --build ringmesh --target package - cd $TRAVIS_BUILD_DIR From f76c2529704d4203a595f552a3119ed331197a98 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 8 Feb 2018 09:03:45 +0100 Subject: [PATCH 25/29] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a97c39194..07eb62f40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,8 +74,8 @@ jobs: - CXX=g++ CC=gcc cmake -DRINGMESH_WITH_GRAPHICS:BOOL=ON -DRINGMESH_WITH_UTILITIES:BOOL=ON -DRINGMESH_WITH_TESTS:BOOL=ON -DRINGMESH_WITH_GUI:BOOL=ON -DRINGMESH_WITH_TUTORIALS:BOOL=ON .. - cd Coverage - build-wrapper-linux-x86-64 --out-dir $TRAVIS_BUILD_DIR/bw-outputs cmake --build . -- -j2 - - ldd ringmesh/bin/test/test-plugin-manager - - objdump -x ringmesh/bin/test/test-plugin-manager | grep RPATH + - ldd ringmesh/bin/tests/test-plugin-manager + - objdump -x ringmesh/bin/tests/test-plugin-manager | grep RPATH - ls ringmesh/lib - cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build ringmesh --target coverage -- -j2 - cmake --build ringmesh --target package From f4b9406ef3b6e3aed01e5e3c1dc9bbc769dc4949 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 8 Feb 2018 09:48:19 +0100 Subject: [PATCH 26/29] Update Coverage.cmake --- tools/Coverage.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/Coverage.cmake b/tools/Coverage.cmake index f2872abfc..a3a42fa10 100644 --- a/tools/Coverage.cmake +++ b/tools/Coverage.cmake @@ -39,6 +39,8 @@ elseif(NOT CMAKE_COMPILER_IS_GNUCXX) message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...") endif() +set(CMAKE_COVERAGE_POSTFIX "d") + add_compile_options(-g -O0 -fno-elide-constructors -fprofile-arcs -ftest-coverage -fno-inline -fno-inline-small-functions -fno-default-inline) if(CMAKE_C_COMPILER_ID STREQUAL "GNU") link_libraries(gcov) From 99ae274592cec66a33ad307a6b128975ab427a96 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 8 Feb 2018 10:31:33 +0100 Subject: [PATCH 27/29] Update test-geomodel-geological-entity-factories.cpp --- .../core/test-geomodel-geological-entity-factories.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/geomodel/core/test-geomodel-geological-entity-factories.cpp b/tests/geomodel/core/test-geomodel-geological-entity-factories.cpp index 2323fafee..832089744 100644 --- a/tests/geomodel/core/test-geomodel-geological-entity-factories.cpp +++ b/tests/geomodel/core/test-geomodel-geological-entity-factories.cpp @@ -71,8 +71,12 @@ void test_geomodel_geological_entity_factories() int main() { try - { - PluginManager::load_plugin( "RINGMesh_geomodel_core" ); + { + std::string geomodel_core = "RINGMesh_geomodel_core"; +#ifdef RINGMESH_DEBUG + geomodel_core += "d"; +#endif + PluginManager::load_plugin( geomodel_core ); Logger::out( "TEST", "Are geological entity factories initialized?" ); test_geomodel_geological_entity_factories(); From 09f9f765629231b86d01056a78b75ff11e7d3542 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 8 Feb 2018 13:59:48 +0100 Subject: [PATCH 28/29] Update RINGMesh.cmake --- cmake/RINGMesh.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index adbea3f3c..2bfbcc0d9 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -63,20 +63,20 @@ install( DESTINATION lib/${CMAKE_BUILD_TYPE} ) -install( - DIRECTORY - ${TINYXML2_INSTALL_PREFIX}/bin/ - ${ZLIB_ROOT}/bin/ - ${GEOGRAM_INSTALL_PREFIX}/bin/ - DESTINATION - bin/${CMAKE_BUILD_TYPE} -) if(WIN32) + install( + DIRECTORY + ${TINYXML2_INSTALL_PREFIX}/bin/ + ${ZLIB_ROOT}/bin/ + ${GEOGRAM_INSTALL_PREFIX}/bin/ + DESTINATION + bin/${CMAKE_CFG_INTDIR} + ) install( FILES ${GEOGRAM_INSTALL_PREFIX}/lib/glfw3.dll DESTINATION - bin/${CMAKE_BUILD_TYPE} + bin/${CMAKE_CFG_INTDIR} ) endif() From 2c9c2ae0ff6d427afbd622ad72e24ed423badf69 Mon Sep 17 00:00:00 2001 From: Date: Thu, 8 Feb 2018 18:04:59 +0100 Subject: [PATCH 29/29] fixe bug during package generation without graphic for window --- cmake/RINGMesh.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/RINGMesh.cmake b/cmake/RINGMesh.cmake index 2bfbcc0d9..d13d21d95 100644 --- a/cmake/RINGMesh.cmake +++ b/cmake/RINGMesh.cmake @@ -72,12 +72,14 @@ if(WIN32) DESTINATION bin/${CMAKE_CFG_INTDIR} ) + if(RINGMESH_WITH_GRAPHICS) install( FILES ${GEOGRAM_INSTALL_PREFIX}/lib/glfw3.dll DESTINATION bin/${CMAKE_CFG_INTDIR} ) + endif endif() include(GenerateExportHeader)