From 05c6003187228cbd5f62a65273dd0fe93c679f58 Mon Sep 17 00:00:00 2001 From: Thomas Helfer Date: Mon, 5 Aug 2024 11:43:41 +0200 Subject: [PATCH] Fix Issue #53, #54 and #55 --- cmake/modules/materialproperties-excel.cmake | 8 ++++---- cmake/modules/materialproperties-java.cmake | 4 +--- cmake/modules/materialproperties.cmake | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cmake/modules/materialproperties-excel.cmake b/cmake/modules/materialproperties-excel.cmake index ee54365..e40f037 100644 --- a/cmake/modules/materialproperties-excel.cmake +++ b/cmake/modules/materialproperties-excel.cmake @@ -12,9 +12,9 @@ function(mfront_properties_excel_library mat) endif(EXISTS ${CMAKE_SOURCE_DIR}/materials/${mat}) list(APPEND mfront_search_paths "--search-path=${CMAKE_CURRENT_SOURCE_DIR}") - foreach(source ${mfront_sources}) - add_mfront_property_sources(${lib} ${mat} "excel" ${mfront_search_paths} ${source}) - endforeach(source ${mfront_sources}) + foreach(mfront_source ${mfront_sources}) + add_mfront_property_sources(${lib} ${mat} "excel" "${mfront_search_paths}" ${mfront_source}) + endforeach(mfront_source ${mfront_sources}) _get_mfront_command_line_arguments() set(mfront_args ) list(APPEND mfront_args ${mfront_command_line_arguments}) @@ -34,7 +34,7 @@ function(mfront_properties_excel_library mat) DEPENDS ${${lib}_MFRONT_SOURCES} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/excel" COMMENT "mfront source ${mfront_file}") - add_custom_target(${lib} + add_custom_target(${lib} ALL DEPENDS "${vba_file}") install(FILES ${vba_file} DESTINATION "share/mfm/excel") endfunction(mfront_properties_excel_library mat) diff --git a/cmake/modules/materialproperties-java.cmake b/cmake/modules/materialproperties-java.cmake index b62c49a..70c1c34 100644 --- a/cmake/modules/materialproperties-java.cmake +++ b/cmake/modules/materialproperties-java.cmake @@ -25,8 +25,7 @@ function(mfront_properties_java_library mat) endif(${lib}_SOURCES) set(all_generated_files ${${lib}_SOURCES}) list(APPEND all_generated_files - ${CMAKE_CURRENT_BINARY_DIR}/java/java/${java_file} - ${CMAKE_CURRENT_BINARY_DIR}/java/java/${java_class_file}) + ${CMAKE_CURRENT_BINARY_DIR}/java/java/${java_file}) list(REMOVE_DUPLICATES all_generated_files) _get_mfront_command_line_arguments() set(mfront_args ) @@ -37,7 +36,6 @@ function(mfront_properties_java_library mat) endif(mfront_dsl_options) list(APPEND mfront_args "--interface=java") list(APPEND mfront_args ${${lib}_MFRONT_IMPLEMENTATION_PATHS}) - message(STATUS "mfront_args: ${${lib}_MFRONT_IMPLEMENTATION_PATHS}") if(MFM_PACKAGE) add_custom_command( OUTPUT ${all_generated_files} diff --git a/cmake/modules/materialproperties.cmake b/cmake/modules/materialproperties.cmake index fb9eaa8..16e8694 100644 --- a/cmake/modules/materialproperties.cmake +++ b/cmake/modules/materialproperties.cmake @@ -19,7 +19,7 @@ function(add_mfront_property_sources lib mat interface search_paths file) ${${lib}_OTHER_SOURCES} PARENT_SCOPE) else() if (madnex_file) - if(TFEL_MADNEX_SUPPORT) + if(TFEL_MADNEX_SUPPORT) mfront_query(_impls ${mat} "${search_paths}" ${mfront_path} "--all-material-properties" "--list-implementation-paths=unsorted") if(_impls)