Skip to content
Snippets Groups Projects
Commit 8fe139fe authored by Stefan Girke's avatar Stefan Girke
Browse files

improved autegenerated code for cmake

parent 42934d10
No related branches found
No related tags found
No related merge requests found
message( "${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none fem.ode.order:1 ${RUN_GENERATE_CODE_PARAMFILE} " )
message( "${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none ${RUN_GENERATE_CODE_PARAMFILE} " )
execute_process(COMMAND
${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none fem.ode.order:1 ${RUN_GENERATE_CODE_PARAMFILE} )
${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none ${RUN_GENERATE_CODE_PARAMFILE} )
message("COMMAND ${RUN_GENERATE_CODE_EXEC}" )
execute_process(COMMAND make ${RUN_GENERATE_CODE_EXEC} )
message( "${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none fem.ode.order:1 ${RUN_GENERATE_CODE_PARAMFILE} " )
message( "${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none ${RUN_GENERATE_CODE_PARAMFILE} " )
execute_process(COMMAND
${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none fem.ode.order:1 ${RUN_GENERATE_CODE_PARAMFILE} )
${RUN_GENERATE_CODE_PROGRAM} fem.eoc.steps:1 femdg.stepper.maximaltimesteps:1 fem.io.outputformat:none ${RUN_GENERATE_CODE_PARAMFILE} )
......@@ -35,7 +35,7 @@
std::string autoFilename(const int dim, const int polynomialOrder )
{
std::stringstream name;
name << Dune::Fem::Parameter::commonInputPath() << "/autogeneratedcode_" << dim << "d_k" << polynomialOrder << ".hh";
name << "autogeneratedcode_" << dim << "d_k" << polynomialOrder << ".hh";
return name.str();
}
......
......@@ -29,46 +29,16 @@ set_property(TARGET advdiff APPEND PROPERTY
set( PROG "advdiff" )
add_executable( ${PROG}_generatecode "${MAININCLUDE_PATH}/main.cc"
"${MAININCLUDE_PATH}/main_0.cc"
"${MAININCLUDE_PATH}/main_1.cc"
"${MAININCLUDE_PATH}/main_2.cc"
"${MAININCLUDE_PATH}/main_3.cc")
add_executable( ${PROG}_generatecode "${MAININCLUDE_PATH}/main.cc" "${MAININCLUDE_PATH}/main_pol.cc" )
set_property(TARGET ${PROG}_generatecode APPEND PROPERTY
COMPILE_DEFINITIONS "NDEBUG;BASEFUNCTIONSET_CODEGEN_GENERATE")
COMPILE_DEFINITIONS "ONLY_ONE_P;POLORDER=2;NDEBUG;BASEFUNCTIONSET_CODEGEN_GENERATE")
dune_target_link_libraries( ${PROG}_generatecode "${DUNE_LIBS}")
add_executable( ${PROG}_compilecode "${MAININCLUDE_PATH}/main.cc"
"${MAININCLUDE_PATH}/main_0.cc"
"${MAININCLUDE_PATH}/main_1.cc"
"${MAININCLUDE_PATH}/main_2.cc"
"${MAININCLUDE_PATH}/main_3.cc")
add_executable( ${PROG}_compilecode "${MAININCLUDE_PATH}/main.cc" "${MAININCLUDE_PATH}/main_pol.cc")
set_property(TARGET ${PROG}_compilecode APPEND PROPERTY
COMPILE_DEFINITIONS "USE_BASEFUNCTIONSET_CODEGEN")
COMPILE_DEFINITIONS "ONLY_ONE_P;POLORDER=2;NUSE_BASEFUNCTIONSET_CODEGEN")
dune_target_link_libraries( ${PROG}_compilecode "${DUNE_LIBS}" )
#add_custom_command( OUTPUT generate_command
# COMMAND ${CMAKE_COMMAND} -D RUN_GENERATE_CODE_PROGRAM=${CMAKE_CURRENT_BINARY_DIR}/${PROG}_generatecode -D RUN_GENERATE_CODE_PARAMFILE="" -P ${CMAKE_SOURCE_DIR}/cmake/scripts/RunGenerateCode.cmake )
# add_custom_command( OUTPUT generate_code_command
# COMMAND ${PROG}_generatecode
# COMMAND generate_command )
#add_custom_target( generate_code DEPENDS generate_code_command )
#
#
#add_custom_command( OUTPUT compile_code_command
# COMMAND ${PROG}_compilecode )
#add_custom_target( compile_code DEPENDS compile_code_command )
#
#
#add_custom_command( OUTPUT codegen_command
# COMMAND generate_code_command
# COMMAND compile_code_command )
#add_custom_target( codegen DEPENDS codegen_command )
add_custom_target( generate
${CMAKE_COMMAND} -D RUN_GENERATE_CODE_PROGRAM=${CMAKE_CURRENT_BINARY_DIR}/${PROG}_generatecode -D RUN_GENERATE_CODE_PARAMFILE="" -P ${CMAKE_SOURCE_DIR}/cmake/scripts/RunGenerate.cmake )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment