mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-15 20:38:23 +01:00
Add R library file as string to executable
This commit is contained in:
parent
bfe4d0d751
commit
06c63a125b
@ -38,7 +38,9 @@ if (POET_PHT_ADDITIONAL_INFO)
|
||||
target_compile_definitions(poetlib PRIVATE POET_PHT_ADD)
|
||||
endif()
|
||||
|
||||
configure_file(poet.hpp.in poet.hpp)
|
||||
file(READ "${PROJECT_SOURCE_DIR}/R_lib/kin_r_library.R" R_KIN_LIB )
|
||||
|
||||
configure_file(poet.hpp.in poet.hpp @ONLY)
|
||||
|
||||
add_executable(poet poet.cpp)
|
||||
target_link_libraries(poet PRIVATE poetlib MPI::MPI_C RRuntime)
|
||||
|
||||
@ -302,8 +302,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
/*Loading Dependencies*/
|
||||
// TODO: kann raus
|
||||
std::string r_load_dependencies = "source('../R_lib/kin_r_library.R');";
|
||||
R.parseEvalQ(r_load_dependencies);
|
||||
R.parseEvalQ(kin_r_library);
|
||||
|
||||
SimParams params(world_rank, world_size);
|
||||
int pret = params.parseFromCmdl(argv, R);
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
#ifndef POET_H
|
||||
#define POET_H
|
||||
|
||||
#include <string>
|
||||
static const char *poet_version = "@POET_VERSION@";
|
||||
|
||||
static const char *CHEMISTRY_MODULE_NAME = "state_C";
|
||||
// using the Raw string literal to avoid escaping the quotes
|
||||
static inline std::string kin_r_library = R"(@R_KIN_LIB@)";
|
||||
|
||||
#endif // POET_H
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user