1
0
Fork 0
Commit graph

76 commits

Author SHA1 Message Date
Torsten Dreyer
7d12c9fe36 Fix broken build due to undef'd ref in test_flightplan 2017-05-12 09:22:41 +02:00
Florent Rougon
4b494a69bd Rename fatalMessageBox() to fatalMessageBoxWithoutExit(), add exiting variant
- Rename fatalMessageBox() to fatalMessageBoxWithoutExit(). This should
  prevent the kind of bug that prompted this set of changes: someone
  calling fatalMessageBox(), assuming the program would stop at that
  point, whereas in reality it did not.

- Add new function fatalMessageBoxThenExit(). This is not vital of
  course, but allows one to spare one line here and there and to apply
  the DRY principle for such fatal exits.

- Replace every existing call to fatalMessageBox() with one or the other
  of the two new functions. Improve formatting along the way. This
  fixes a few bugs of the kind explained above.
2017-04-10 02:29:48 +02:00
Florent Rougon
680f940378 Revert commit "Make fatalMessageBox() end with std::abort() [...]"
This reverts commit 9e6a3ebc6b ("Make
fatalMessageBox() end with std::abort() and declare it [[noreturn]]").

After reflexion, it seems better to let fatalMessageBox() return,
because there is existing code that appears to be relying on this aspect
to do some work after having called fatalMessageBox() (cf. main() in
bootstrap.cxx). Also, the way of exiting from fatalMessageBox() after
commit 9e6a3ebc6b (std::abort()) was probably too brutal for a
controlled exit---as opposed to a terminate handler.
2017-04-10 02:29:48 +02:00
Florent Rougon
9e6a3ebc6b Make fatalMessageBox() end with std::abort() and declare it [[noreturn]]
Many places calling fatalMessageBox() assume it doesn't return, so make
it behave this way. See discussion around:

  https://sourceforge.net/p/flightgear/mailman/message/35766691/

for some context.
2017-04-08 14:34:26 +02:00
Gary Preston
5e5699c4d8 Return reference to non temporary string. 2017-04-06 18:26:26 +09:00
Gary Preston
fd7bea6453 Retain signedness of numLegs to avoid unsigned/signed comparison. 2017-04-06 18:26:09 +09:00
James Turner
58a7f2c5c2 Unit-test for initPosition.
Only basic, but can be expanded incrementally now
2017-03-27 15:38:05 +01:00
James Turner
09fe744de0 Test helper CMake macro.
Also build the test code first, so tests can reside in source tree as
well as the test tree.

Finally, build local Sqlite with -fpic to give consistent linkage when
using either built-in or system sqlite.
2017-03-26 12:15:29 +01:00
Alessandro Menti
7db8ed17c4
Test suite: add GPerfTools and system SQLite linking fixes
If GPerfTools and/or the SYSTEM_SQLITE options are enabled, the test
suite fails to build (GPerfTools is not linked explicitly in CMakeLists.txt,
but becomes required by SimGear, so the linker failes with an "undefined
reference" error; the SQLite library the test suite links against is always
hardcoded to the FG-provided one).

This patch adds the GPerfTools library to the target link libraries
(if the profiler is enabled) and links to the system SQLite library
whenever SYSTEM_SQLITE is enabled.
2017-03-26 12:10:15 +02:00
James Turner
27baca4826 Linux fixes for tests compilation 2017-03-25 17:09:18 +00:00
James Turner
9e122eaf81 Partial testing framework.
Compile a useful subset of FG as a shared library, and add two basic
uses of this to exercise some Flightplan / RoutePath / navaid
functions.

The test framework can/will be expanded incrementally from here, this
is just a starting point.
2017-03-25 15:35:26 +00:00
Bertrand Coconnier
227087b3a8 Automatic detection of the ENABLE_SIMD setting for SG:
* Scrapped the previous code
* Instead use the symbol value imported from SG via the "CONFIG" mode of CMake find_package()
2017-02-07 00:04:56 +01:00
Bertrand Coconnier
80b8a298e1 Fix for when SimGear headers are not installed system wide (as is the case for Jenkins) 2017-02-04 21:53:18 +01:00
Bertrand Coconnier
4ab0b71fa8 The flag ENABLE_SIMD is now automatically carried over from SimGear. Mixed configurations between FG & SG could crash FG so this should not be allowed. 2017-02-04 20:21:19 +01:00
James Turner
c06ab52c55 KIll off ALUT now it's gone from SimGear 2012-08-22 00:10:00 +01:00
ThorstenB
a3e76909ee Christoph Korn/PlayDeb.net: fix typos 2012-08-17 23:51:30 +02:00
James Turner
70b4f38ebc Goodbye automake. 2011-11-01 11:15:53 +00:00
Christian Schmitt
0a5e86f4e6 remove old .cvsignore files 2010-11-11 01:16:29 +01:00
James Turner
239fea1b54 Even more imlicit includes becoming explicit. 2010-08-07 14:07:17 +01:00
James Turner
f6a87ec75c Disable a test built entirely on Point3D and PLIB/SG 2010-07-30 10:49:58 +01:00
Torsten Dreyer
c89b18ddbd Ignore generated files
add generated files to gitignore that has also been in cvsignore
remove generated config.h-msvc* from source control
2010-06-02 11:27:16 +02:00
Tim Moore
b770e22a48 Merge branch 'ehofman/rename' 2010-01-11 09:08:41 +01:00
Tim Moore
b5c46a8d59 Merge branch 'ehofman/sound' 2009-12-20 11:11:16 +01:00
ehofman
0dc35c8d38 John Denker:
Suggestion:  It might be helpful to promote each of
 the .c files to .cxx.

 Rationale:
 -- The configure/makefile system handles CFLAGS
    differently from CXXFLAGS.
 -- It is important for the *info programs to
    compiled and run in exactly the same environment
    as the main fgfs program.  Some users depend on
    compiler or linker flags such as rpath that
    strongly affect the results of the *info programs.
 -- There is no downside;  you code compiles just
    fine as-is under the c++ compiler.

second part of the original commit, for ehofman/sound
2009-12-09 08:15:37 +01:00
ehofman
dea145b921 John Denker:
Suggestion:  It might be helpful to promote each of
 the .c files to .cxx.

 Rationale:
 -- The configure/makefile system handles CFLAGS
    differently from CXXFLAGS.
 -- It is important for the *info programs to
    compiled and run in exactly the same environment
    as the main fgfs program.  Some users depend on
    compiler or linker flags such as rpath that
    strongly affect the results of the *info programs.
 -- There is no downside;  you code compiles just
    fine as-is under the c++ compiler.

timoore split the original patch so that alcinfo.cxx can be commited to
the ehofman/sound branch seperately.
2009-12-09 08:15:09 +01:00
ehofman
64de526267 Fix for older OpenAL versions. 2009-11-30 22:45:07 +01:00
ehofman
b4b3f62717 add alcinfo instead. 2009-11-30 09:38:57 +01:00
torsten
3d34133e1e This is one leftover from Tat's patch from 2009-09-16:
I believe these patches are really important for Mac users since they don't have to wait for my updating xcode project files.
these also saves up to 50% of build time since most of users don't have to make universal binaries.
2009-10-22 23:26:02 +02:00
ehofman
7e07b57d92 test for the presence of alut.h. if it's not found only display a warning message in gl-info and test-env-map. A clean build without glut installed is now possible. 2009-09-09 08:56:32 +02:00
Tim Moore
b1a3d8ba16 more warning fixes
flightgear compiles with gcc -Wall -Werror
2009-08-24 00:01:37 +02:00
ehofman
429f2530de James Turner:
* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
2008-07-29 08:27:48 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00
curt
9a5840f6e7 Type consistency. 2007-05-16 16:47:13 +00:00
daveluff
8bfd913e0c Oops - I think I introduced some dos line endings - this should fix it 2006-02-22 20:27:00 +00:00
daveluff
44a375520a A couple of hacks to fix cygwin compilation. These may not be the correct fix, but they prevent new cygwin users getting an almost instant compile error following make 2006-02-22 19:21:29 +00:00
mfranz
3b3df3cb01 add al-info 2006-02-05 16:41:47 +00:00
ehofman
f2f960f4f4 Add OpenAL 1.0 backwards compatibility and OS-X support. 2006-02-01 13:27:36 +00:00
ehofman
dff558dcec Add a gl-info equivalent for OpenAL. 2006-01-31 18:20:49 +00:00
ehofman
f057fd0d48 Martin Spott: Use standardized Sun directive. 2005-10-06 11:08:26 +00:00
ehofman
62bb2277bc MingW32 fixes. 2005-09-11 09:53:55 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
curt
4214cd6c10 Migrate FlightGear code to use "#include SG_GL*" defined in
"#include <simgear/compiler.h>".
2004-11-18 19:53:00 +00:00
ehofman
a3c8bc99a2 Incorporate some of the changes from the Linspire diff. 2004-06-06 14:28:45 +00:00
ehofman
4cc853e2a2 MIPSpro 7.4 fixes 2003-12-27 22:27:27 +00:00
ehofman
3ba01fa762 New automake, new problems. Add $base_LIBS for programs since $LIBS isn't substituted automatically anymore 2003-08-29 09:03:49 +00:00
ehofman
9c2cc7c309 Rename every instance of GLUT_H to FG_GLUT_H to prevent a freeglut naming clash 2003-08-22 08:03:10 +00:00
ehofman
19d08953e3 Split up into and . Fix a typo for FreeBSD. And do some Makefile cleanups 2003-07-07 13:57:43 +00:00
curt
43e48070fe - Some refactoring of the configure.ac script.
- Better Mac OS X support (they put glut.h in GLUT/glut.h) :-(
2002-12-10 20:50:48 +00:00
curt
1dfb58783c Additional build system tweaks. 2002-09-03 01:12:26 +00:00