Skip to content
Snippets Groups Projects
Commit aef7d369 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

-nopopup for c++ tutos

parent 614aa53f
No related branches found
No related tags found
No related merge requests found
......@@ -2118,7 +2118,7 @@ if(NOT DISABLE_GMSH_TESTS)
endif()
set_target_properties(${TEST} PROPERTIES LINK_FLAGS "${FLAGS}")
endif()
add_test(${TEST}_cpp ${TEST})
add_test(${TEST}_cpp ${TEST} -nopopup)
endforeach()
endif()
# enable this once we have worked out the path issues on the build machines
......
......@@ -6,7 +6,7 @@
//
// -----------------------------------------------------------------------------
#include <algorithm>
#include <set>
#include <math.h>
#include <gmsh.h>
......@@ -168,9 +168,9 @@ int main(int argc, char **argv)
gmsh::write("t4.msh");
// Launch the GUI to see the results:
std::vector<std::string> args(argv + 1, argv + argc);
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::run();
std::set<std::string> args;
for(int i = 1; i < argc; i++) args.insert(argv[i]);
if(args.find("-nopopup") == args.end()) gmsh::fltk::run();
gmsh::finalize();
return 0;
......
......@@ -6,7 +6,7 @@
//
// -----------------------------------------------------------------------------
#include <algorithm>
#include <set>
#include <gmsh.h>
// Mesh sizes can be specified very accurately by providing a background mesh,
......@@ -65,9 +65,9 @@ int main(int argc, char **argv)
gmsh::write("t7.msh");
// Launch the GUI to see the results:
std::vector<std::string> args(argv + 1, argv + argc);
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::run();
std::set<std::string> args;
for(int i = 1; i < argc; i++) args.insert(argv[i]);
if(args.find("-nopopup") == args.end()) gmsh::fltk::run();
gmsh::finalize();
return 0;
......
......@@ -6,7 +6,7 @@
//
// -----------------------------------------------------------------------------
#include <algorithm>
#include <set>
#include <gmsh.h>
// In addition to creating geometries and meshes, the C++ API can also be used
......@@ -73,9 +73,9 @@ int main(int argc, char **argv)
gmsh::option::setNumber("General.SmallAxes", 0);
// Show the GUI
std::vector<std::string> args(argv + 1, argv + argc);
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::initialize();
std::set<std::string> args;
for(int i = 1; i < argc; i++) args.insert(argv[i]);
if(args.find("-nopopup") == args.end()) gmsh::fltk::initialize();
// We also set some options for each post-processing view:
gmsh::option::setNumber("View[0].IntervalsType", 2);
......@@ -164,8 +164,7 @@ int main(int argc, char **argv)
}
}
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::run();
if(args.find("-nopopup") == args.end()) gmsh::fltk::run();
gmsh::finalize();
......
......@@ -15,7 +15,7 @@
// namespace, or from the graphical interface (right click on the view button,
// then `Plugins').
#include <algorithm>
#include <set>
#include <gmsh.h>
int main(int argc, char **argv)
......@@ -76,9 +76,9 @@ int main(int argc, char **argv)
gmsh::option::setNumber("View[2].IntervalsType", 2);
// show the GUI at the end
std::vector<std::string> args(argv + 1, argv + argc);
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::run();
std::set<std::string> args;
for(int i = 1; i < argc; i++) args.insert(argv[i]);
if(args.find("-nopopup") == args.end()) gmsh::fltk::run();
gmsh::finalize();
return 0;
......
......@@ -6,7 +6,7 @@
//
// -----------------------------------------------------------------------------
#include <algorithm>
#include <set>
#include <gmsh.h>
int main(int argc, char **argv)
......@@ -142,9 +142,9 @@ int main(int argc, char **argv)
gmsh::option::setNumber("View[1].MaxRecursionLevel", 5);
// Launch the GUI to see the results:
std::vector<std::string> args(argv + 1, argv + argc);
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::run();
std::set<std::string> args;
for(int i = 1; i < argc; i++) args.insert(argv[i]);
if(args.find("-nopopup") == args.end()) gmsh::fltk::run();
gmsh::finalize();
return 0;
......
......@@ -6,7 +6,7 @@
//
// -----------------------------------------------------------------------------
#include <algorithm>
#include <set>
#include <gmsh.h>
int main(int argc, char **argv)
......@@ -92,9 +92,9 @@ int main(int argc, char **argv)
gmsh::view::write(t2, "x4_t2.msh");
// Launch the GUI to see the results:
std::vector<std::string> args(argv + 1, argv + argc);
if(!std::count(args.begin(), args.end(), "-nopopup"))
gmsh::fltk::run();
std::set<std::string> args;
for(int i = 1; i < argc; i++) args.insert(argv[i]);
if(args.find("-nopopup") == args.end()) gmsh::fltk::run();
gmsh::finalize();
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment