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-octave.cmake b/cmake/modules/materialproperties-octave.cmake index fe5fa50..01cdbf3 100644 --- a/cmake/modules/materialproperties-octave.cmake +++ b/cmake/modules/materialproperties-octave.cmake @@ -43,7 +43,7 @@ function(mfront_properties_octave_library mat) DEPENDS "${mfront_file}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${interface}" COMMENT "mfront source ${mfront_file} for interface ${interface}") - set(oct_file "octave/${_mfront_law_name}.oct") + set(oct_file "octave/${mat}_${_mfront_law_name}.oct") set(_lib ${mat}_${_mfront_law_name}-octave) list(APPEND octave_targets ${_lib}) add_library(${_lib} SHARED ${mfront_generated_sources}) 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) diff --git a/cmake/modules/octave.cmake b/cmake/modules/octave.cmake index 0de3672..ee59e00 100644 --- a/cmake/modules/octave.cmake +++ b/cmake/modules/octave.cmake @@ -50,21 +50,28 @@ execute_process ( COMMAND ${MKOCTFILE_EXECUTABLE} -p INCFLAGS execute_process ( COMMAND ${MKOCTFILE_EXECUTABLE} -p LIBDIR OUTPUT_VARIABLE OCTAVE_LIBRARY_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ) +execute_process ( COMMAND ${MKOCTFILE_EXECUTABLE} -p OCTAVE_VERSION + OUTPUT_VARIABLE OCTAVE_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE ) # octave libraries macro(find_octave_library name) find_library(${name} NAMES ${name} - HINTS ${OCTAVE_LIBRARY_PATH}) - if(NOT ${name}) - MESSAGE(FATAL_ERROR "${name} library not found") - endif(NOT ${name}) + HINTS ${OCTAVE_LIBRARY_PATH} + ${OCTAVE_LIBRARY_PATH}/octave/${OCTAVE_VERSION}) endmacro(find_octave_library name) find_octave_library(octave) find_octave_library(octinterp) - -set(OCTAVE_LIBRARIES ${octave} ${octinterp}) +if(NOT octave) + MESSAGE(FATAL_ERROR "octave library not found") +endif(NOT octave) +if(octinterp) + set(OCTAVE_LIBRARIES ${octave} ${octinterp}) +else(octinterp) + set(OCTAVE_LIBRARIES ${octave}) +endif(octinterp) # summary if((NOT OCTAVE_CONFIG_EXECUTABLE) OR