Skip to content

Commit

Permalink
fix madnex support
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Dec 20, 2024
1 parent a3e25d1 commit 7ab460e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ add_subdirectory(generic-behaviours)
add_subdirectory(materials)
add_subdirectory(mfront-book-examples)
add_subdirectory(unit-tests/mfront-wrappers)
# add_subdirectory(unit-tests/behaviours-without-temperature)
add_subdirectory(unit-tests/behaviours-without-temperature)
if(TFEL_MADNEX_SUPPORT)
add_subdirectory(unit-tests/madnex/material-properties-1)
add_subdirectory(unit-tests/madnex/material-properties-2)
Expand Down
16 changes: 8 additions & 8 deletions cmake/modules/materialproperties.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function(add_mfront_material_property_source lib mat interface search_paths mfro
set(file_OK ON PARENT_SCOPE)
endfunction(add_mfront_material_property_source)

function(add_mfront_property_sources lib mat interface search_paths file)
get_mfront_source_location(${file})
function(add_mfront_property_sources lib mat interface search_paths source)
get_mfront_source_location(${source})
if(NOT mfront_path)
list(APPEND ${lib}_OTHER_SOURCES "${source}")
set(${lib}_OTHER_SOURCES
Expand All @@ -37,7 +37,7 @@ function(add_mfront_property_sources lib mat interface search_paths file)
list(APPEND ${lib}_MFRONT_SOURCES ${mfront_path})
set(${lib}_MFRONT_SOURCES ${${lib}_MFRONT_SOURCES} PARENT_SCOPE)
else(TFEL_MADNEX_SUPPORT)
message(STATUS "file '${file}' has been discarded since "
message(STATUS "source '${source}' has been discarded since "
"madnex support has not been enabled")
endif(TFEL_MADNEX_SUPPORT)
else()
Expand All @@ -55,11 +55,11 @@ function(add_mfront_property_sources lib mat interface search_paths file)
if(NOT _n_path_tokens EQUAL 5)
message(FATAL_ERROR "invalid mdnx path '${source}'")
endif()
list(GET _path_tokens 1 _madnex_source_file)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_madnex_source_file}")
message(FATAL_ERROR "invalide madnex file: "
"no file named '${CMAKE_CURRENT_SOURCE_DIR}/${_madnex_source_file}'")
endif()
list(GET _path_tokens 1 _madnex_source_file)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_madnex_source_file}")
message(FATAL_ERROR "invalide madnex file: "
"no file named '${CMAKE_CURRENT_SOURCE_DIR}/${_madnex_source_file}'")
endif()
list(APPEND ${lib}_MFRONT_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/${_madnex_source_file}")
else("${mdnx_prefix}" EQUAL 0)
Expand Down
4 changes: 2 additions & 2 deletions unit-tests/madnex/material-properties-2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mfront_properties_library(TestMadnexMaterialProperties2
mdnx:MaterialProperty.mdnx:material_property:TestMadnexMaterialProperties2:YoungModulus_SRMA)
mfront_properties_library(TestMadnexMaterialProperties2
mdnx:MaterialProperty.mdnx:material_property:TestMadnexMaterialProperties2:YoungModulus_SRMA)

0 comments on commit 7ab460e

Please sign in to comment.