From: Matthias Maier Date: Wed, 21 Aug 2013 20:05:34 +0000 (+0000) Subject: Get the SOURCE_DIR right X-Git-Tag: v8.1.0~570^2~443 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be5dada41be072497791489d9a56a66723b99b85;p=dealii.git Get the SOURCE_DIR right git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30383 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_deal_ii_add_test.cmake b/deal.II/cmake/macros/macro_deal_ii_add_test.cmake index 182472015f..babe0bf63d 100644 --- a/deal.II/cmake/macros/macro_deal_ii_add_test.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_add_test.cmake @@ -70,7 +70,7 @@ MACRO(DEAL_II_ADD_TEST _category _test_name) ) SET_PROPERTY(TARGET ${_test} APPEND PROPERTY COMPILE_DEFINITIONS - SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} + SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" ) TARGET_LINK_LIBRARIES(${_test_name}.${_build_lowercase} ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX} diff --git a/tests/codim_one/bem.cc b/tests/codim_one/bem.cc index d020a959b4..2a5a8b6bef 100644 --- a/tests/codim_one/bem.cc +++ b/tests/codim_one/bem.cc @@ -126,7 +126,7 @@ BEM::run() { - read_grid("SOURCE_DIR/grids/circle_R10.inp"); + read_grid(SOURCE_DIR "/grids/circle_R10.inp"); Point p; HyperBallBoundary boundary(p,10.); diff --git a/tests/codim_one/data_out.cc b/tests/codim_one/data_out.cc index dfb06699cc..94ad28ef19 100644 --- a/tests/codim_one/data_out.cc +++ b/tests/codim_one/data_out.cc @@ -80,10 +80,10 @@ int main () deallog.attach(logfile); deallog.depth_console(0); deallog << "Test<1,2>" << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_2.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp"); deallog << "Test<2,3>" << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_2.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp"); return 0; } diff --git a/tests/codim_one/data_out_02.cc b/tests/codim_one/data_out_02.cc index 8225f5615f..cde3b64134 100644 --- a/tests/codim_one/data_out_02.cc +++ b/tests/codim_one/data_out_02.cc @@ -53,7 +53,7 @@ int main () GridIn grid_in; grid_in.attach_triangulation (triangulation); - std::ifstream fname("square.msh"); + std::ifstream fname("grids/square.msh"); grid_in.read_msh (fname); dof_handler.distribute_dofs (fe); diff --git a/tests/codim_one/fe_values_extractor_01.cc b/tests/codim_one/fe_values_extractor_01.cc index f8fe854ac7..2a894accb8 100644 --- a/tests/codim_one/fe_values_extractor_01.cc +++ b/tests/codim_one/fe_values_extractor_01.cc @@ -57,7 +57,7 @@ int main () GridIn grid_in; grid_in.attach_triangulation (triangulation); - std::ifstream fname("data_out_02/square.msh"); + std::ifstream fname("grids/square.msh"); grid_in.read_msh (fname); dof_handler.distribute_dofs (fe); diff --git a/tests/codim_one/gradients.cc b/tests/codim_one/gradients.cc index 8d100fdd68..693d46091d 100644 --- a/tests/codim_one/gradients.cc +++ b/tests/codim_one/gradients.cc @@ -206,16 +206,16 @@ int main () deallog.threshold_double(1.e-12); deallog<<"Test <1,2>"<("SOURCE_DIR/grids/circle_4.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_4.inp"); deallog<"<("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); -// test<2,3>("SOURCE_DIR/grids/sphere_2.inp"); -// test<2,3>("SOURCE_DIR/grids/sphere_3.inp"); -// test<2,3>("SOURCE_DIR/grids/sphere_4.inp"); +// test<2,3>(SOURCE_DIR "/grids/sphere_2.inp"); +// test<2,3>(SOURCE_DIR "/grids/sphere_3.inp"); +// test<2,3>(SOURCE_DIR "/grids/sphere_4.inp"); return 0; } diff --git a/tests/codim_one/gradients_1.cc b/tests/codim_one/gradients_1.cc index 231c383d5c..2f1bb776ff 100644 --- a/tests/codim_one/gradients_1.cc +++ b/tests/codim_one/gradients_1.cc @@ -122,16 +122,16 @@ int main () deallog.threshold_double(1.e-12); deallog<<"Test <1,2>, Q1, Q2, Q3"<("SOURCE_DIR/grids/circle_4.inp",1); - test<1,2>("SOURCE_DIR/grids/circle_4.inp",2); - test<1,2>("SOURCE_DIR/grids/circle_4.inp",3); + test<1,2>(SOURCE_DIR "/grids/circle_4.inp",1); + test<1,2>(SOURCE_DIR "/grids/circle_4.inp",2); + test<1,2>(SOURCE_DIR "/grids/circle_4.inp",3); deallog<, Q1, Q2, Q3"<("SOURCE_DIR/grids/sphere_1.inp",1); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp",2); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp",3); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp",1); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp",2); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp",3); return 0; diff --git a/tests/codim_one/grid_in_out.cc b/tests/codim_one/grid_in_out.cc index 0692fc2d21..4abeca34ac 100644 --- a/tests/codim_one/grid_in_out.cc +++ b/tests/codim_one/grid_in_out.cc @@ -49,9 +49,9 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<1,2>("SOURCE_DIR/grids/circle_1.inp"); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/grid_in_out_02.cc b/tests/codim_one/grid_in_out_02.cc index 95bd20e56b..7d9af70586 100644 --- a/tests/codim_one/grid_in_out_02.cc +++ b/tests/codim_one/grid_in_out_02.cc @@ -47,8 +47,8 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/grid_in_out_03.cc b/tests/codim_one/grid_in_out_03.cc index ef8bb1f354..9816190e86 100644 --- a/tests/codim_one/grid_in_out_03.cc +++ b/tests/codim_one/grid_in_out_03.cc @@ -62,8 +62,8 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/grid_refinement.cc b/tests/codim_one/grid_refinement.cc index 19b1db0f20..9815e30965 100644 --- a/tests/codim_one/grid_refinement.cc +++ b/tests/codim_one/grid_refinement.cc @@ -60,10 +60,10 @@ int main () deallog.depth_console(0); deallog << "Test<1,2>" << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_1.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp"); deallog << std::endl << "Test<1,2>" << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/interpolate_boundary_values_01.cc b/tests/codim_one/interpolate_boundary_values_01.cc index 9cee218c7f..2c9e20aa6a 100644 --- a/tests/codim_one/interpolate_boundary_values_01.cc +++ b/tests/codim_one/interpolate_boundary_values_01.cc @@ -85,8 +85,8 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc b/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc index 2fe3f145d6..dc4aa7ee67 100644 --- a/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc +++ b/tests/codim_one/interpolate_boundary_values_01_vector_valued.cc @@ -101,8 +101,8 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/interpolation.cc b/tests/codim_one/interpolation.cc index c90f446b46..a771ca8148 100644 --- a/tests/codim_one/interpolation.cc +++ b/tests/codim_one/interpolation.cc @@ -89,10 +89,10 @@ int main () for (unsigned int n=1; n<8; ++n) { deallog << "Test<1,2>, finite element q_" << n << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_2.inp",n); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp",n); deallog << "Test<1,2>, finite element q_" << n << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_2.inp",n); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp",n); } return 0; } diff --git a/tests/codim_one/interpolation_2.cc b/tests/codim_one/interpolation_2.cc index b227a49484..c6f93c49f6 100644 --- a/tests/codim_one/interpolation_2.cc +++ b/tests/codim_one/interpolation_2.cc @@ -84,10 +84,10 @@ int main () deallog.depth_console(0); deallog << "Test<1,2>" << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_2.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp"); deallog << "Test<1,2>" << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_2.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp"); return 0; } diff --git a/tests/codim_one/interpolation_3.cc b/tests/codim_one/interpolation_3.cc index bdda97549f..a695c20b85 100644 --- a/tests/codim_one/interpolation_3.cc +++ b/tests/codim_one/interpolation_3.cc @@ -93,10 +93,10 @@ int main () deallog.depth_console(0); deallog << "Test<1,2>" << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_2.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp"); deallog << "Test<1,2>" << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_2.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp"); return 0; } diff --git a/tests/codim_one/mapping_q1.cc b/tests/codim_one/mapping_q1.cc index 1c050a374c..d218f00eb7 100644 --- a/tests/codim_one/mapping_q1.cc +++ b/tests/codim_one/mapping_q1.cc @@ -78,9 +78,9 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<1,2>("SOURCE_DIR/grids/circle_1.inp"); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/mapping_q1_eulerian.cc b/tests/codim_one/mapping_q1_eulerian.cc index cf8c616de0..31fea594ef 100644 --- a/tests/codim_one/mapping_q1_eulerian.cc +++ b/tests/codim_one/mapping_q1_eulerian.cc @@ -91,9 +91,9 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<1,2>("SOURCE_DIR/grids/circle_1.inp"); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/mapping_q_eulerian.cc b/tests/codim_one/mapping_q_eulerian.cc index 0a7df86893..81c20ea5f7 100644 --- a/tests/codim_one/mapping_q_eulerian.cc +++ b/tests/codim_one/mapping_q_eulerian.cc @@ -92,13 +92,13 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<1,2>("SOURCE_DIR/grids/circle_1.inp",1); - test<1,2>("SOURCE_DIR/grids/circle_1.inp",2); - test<2,3>("SOURCE_DIR/grids/square.inp",1); - test<2,3>("SOURCE_DIR/grids/square.inp",2); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp",1); -// test<2,3>("SOURCE_DIR/grids/problem.inp",1); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp",2); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp",1); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp",2); + test<2,3>(SOURCE_DIR "/grids/square.inp",1); + test<2,3>(SOURCE_DIR "/grids/square.inp",2); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp",1); +// test<2,3>(SOURCE_DIR "/grids/problem.inp",1); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp",2); return 0; } diff --git a/tests/codim_one/projection.cc b/tests/codim_one/projection.cc index 1f76b0c4f8..c2fdac3481 100644 --- a/tests/codim_one/projection.cc +++ b/tests/codim_one/projection.cc @@ -93,10 +93,10 @@ int main () for (unsigned int n=1; n<5; n++) { deallog << "Test<1,2>, continous finite element q_" << n << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_2.inp",n); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp",n); deallog << "Test<2,3>, continous finite element q_" << n << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_2.inp",n); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp",n); } return 0; } diff --git a/tests/codim_one/projection_dgp.cc b/tests/codim_one/projection_dgp.cc index 7e5c353e99..8c571b9c87 100644 --- a/tests/codim_one/projection_dgp.cc +++ b/tests/codim_one/projection_dgp.cc @@ -94,10 +94,10 @@ int main () for (unsigned int n=1; n<5; n++) { deallog << "Test<1,2>, continous finite element q_" << n << std::endl; - test<1,2>("SOURCE_DIR/grids/circle_2.inp",n); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp",n); deallog << "Test<2,3>, continous finite element q_" << n << std::endl; - test<2,3>("SOURCE_DIR/grids/sphere_2.inp",n); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp",n); } return 0; } diff --git a/tests/codim_one/renumber_component_wise_01.cc b/tests/codim_one/renumber_component_wise_01.cc index eb932e0710..c4798b00bf 100644 --- a/tests/codim_one/renumber_component_wise_01.cc +++ b/tests/codim_one/renumber_component_wise_01.cc @@ -71,8 +71,8 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<2,3>("SOURCE_DIR/grids/square.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/square.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); return 0; } diff --git a/tests/codim_one/surface.cc b/tests/codim_one/surface.cc index e04e303557..79125a0932 100644 --- a/tests/codim_one/surface.cc +++ b/tests/codim_one/surface.cc @@ -105,16 +105,16 @@ int main () deallog.depth_console(0); deallog<<"Test <1,2>"<("SOURCE_DIR/grids/circle_1.inp"); - test<1,2>("SOURCE_DIR/grids/circle_2.inp"); - test<1,2>("SOURCE_DIR/grids/circle_3.inp"); - test<1,2>("SOURCE_DIR/grids/circle_4.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_1.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_2.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_3.inp"); + test<1,2>(SOURCE_DIR "/grids/circle_4.inp"); deallog<<"Test <2,3>"<("SOURCE_DIR/grids/sphere_1.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_2.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_3.inp"); - test<2,3>("SOURCE_DIR/grids/sphere_4.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_1.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_2.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_3.inp"); + test<2,3>(SOURCE_DIR "/grids/sphere_4.inp"); return 0; }