Skip to content

Commit

Permalink
Update CMakeLists.txt to use proper ncmat2cpp flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Oct 31, 2024
1 parent 4a71860 commit 0aadc19
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ file( MAKE_DIRECTORY "${ncrystal_core_configured_includedir}" )

#TODO: The trailing "/" on "ncrystal_core/include/" below is crucial. Is this behaviour portable?

file (
file(
COPY "ncrystal_core/include/"
DESTINATION "${ncrystal_core_configured_includedir}"
FILES_MATCHING
Expand Down Expand Up @@ -637,11 +637,14 @@ if ( NCRYSTAL_ENABLE_DATA STREQUAL "EMBED" )
message(FATAL_ERROR "Python3.6+ interpreter not found (required when NCRYSTAL_ENABLE_DATA=EMBED).")
endif()
#Generate C++ code from the .ncmat files:
execute_process(COMMAND "${Python3_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/NCrystal/_ncmat2cpp_impl.py"
"--full"
execute_process(
COMMAND "${Python3_EXECUTABLE}"
"-BI"
"${PROJECT_SOURCE_DIR}/NCrystal/_ncmat2cpp_impl.py"
"-n" "NCrystal::AutoGenNCMAT::registerStdNCMAT"
"--regfctname" "NCrystal::internal::registerEmbeddedNCMAT(const char*,const char*)"
"-o" "${PROJECT_BINARY_DIR}/autogen_ncmat_data.cc" ${DATAFILES} RESULT_VARIABLE status )
"-o" "${PROJECT_BINARY_DIR}/autogen_ncmat_data.cc" ${DATAFILES} RESULT_VARIABLE status
)
if(status AND NOT status EQUAL 0)
message(FATAL_ERROR "Failure while trying to invoke ncmat2cpp (needed since NCRYSTAL_ENABLE_DATA=EMBED).")
endif()
Expand Down Expand Up @@ -843,7 +846,6 @@ if ( NCRYSTAL_ENABLE_TESTING )
endif()

set(all_plugin_names_lc "stdscat;stdabs;stdncmat")

set(NCrystal_builtin_plugin_names "")
set(ncrystal_iplugin 0)
foreach(pluginentry ${NCRYSTAL_BUILTIN_PLUGINS})
Expand Down

0 comments on commit 0aadc19

Please sign in to comment.