Commit Graph

223 Commits

Author SHA1 Message Date
Stuart Buchanan
8d5428bf77 WS3.0: Initial commit to load and render WS3.0 2020-11-08 22:36:45 +00:00
Julian Smith
510b25f8b8 Allow use of old zlib-1.2.3 on OpenBSD.
As of 2020-08-01, OpenBSD's system zlib is 1.2.3 which doesn't
have gzoffset(). However we can get away with this by making
gzfilebuf::approxOffset() always return zero.
2020-10-31 23:52:23 +00:00
James Turner
83500dd413 CMake: use same 3rdParty logic as FlightGear
Avoids need to specify the 3rd-party dir, in the standard/fgmeta
layout of source directories, and accept more combinations of path,
when the user specifies a value.
2020-10-20 16:51:20 +01:00
James Turner
670460a079 Set GCC RelwtihDebInfo opt flags 2020-09-29 17:40:25 +01:00
James Turner
2ed15eebfd CMake fixes for Linux 2020-08-23 11:27:09 +01:00
James Turner
456c63935c Cmake refresh
Use target objects everywhere, and simplify handling of system vs
local dependencies.
2020-08-18 11:40:27 +01:00
James Turner
84c15f6384 Enable ASan for clang 2020-08-17 10:20:26 +01:00
Julian Smith
fcc5e055ef Renamed version -> simgear-version to avoid breaking clang++ on OpenBSD.
It seems that clang++ headers #include <version>, which found simgear/version
because we need to put singear/ in include path for some code to compile.
2020-07-04 09:04:04 +01:00
James Turner
abb73c566e Update to C++17.
This can be reverted easily, but let’s see if it goes.
2020-06-22 20:39:45 +01:00
James Turner
346344ee09 C++17: use an OBJECT_LIBRARY to build HLA
This allows us to easily have different CXX version for the HLA code,
to the rest of the project.
2020-06-21 19:31:35 +01:00
James Turner
9ccbf539c1 Raise minimum OSG version to 3.4.1 2020-06-18 17:22:55 +01:00
James Turner
720f681e0f Raise Cmake/Compiler versions for Next 2020-06-18 12:58:47 +01:00
James.Hester
259c1314de Allow OSG to recalculate terrain normals. 2020-06-18 09:11:52 +01:00
James Turner
2b2e3ae5c4 Fix CMake value 2020-06-05 13:53:54 +01:00
James Turner
0e3ac7e078 Set CMake OpenGL VND policy 2020-06-05 13:32:43 +01:00
James Turner
11cf87951c SIMD flags: ensure we respect other compiler flags
Ensure we only ever extend the currently set compile flags when
ENABLE_SIMD is requested
2020-05-28 10:46:18 +01:00
James Turner
7c004a4c90 Fix compilation with Boost >= 1.73 2020-05-28 10:45:47 +01:00
James Turner
a48693d273 Kill explicit setting of compiler flags in Debug
Use the CMake defaults for this.
2020-05-24 14:32:13 +01:00
James Turner
12d57a6373 Adjust RelWithDebInfo optimisation for Clang
This should give a bit of speed boost to macOS official builds.
2020-05-13 14:23:00 +01:00
James Turner
c7c8fc7777 Better RelWithDebInfo flags for CL.exe 2020-05-08 14:31:44 +01:00
James Turner
6e054e57ef Windows: ensure RelWithDebInfo is fast
Default CMake RelWithDebInfo pessimizes inlining
2020-05-07 14:13:54 +01:00
James Turner
c83dc79357 Revert to C++11 for now, found an alternative solution. 2020-04-06 10:44:23 +01:00
James Turner
a53c1bfe8b CMake logic to export debug symbols 2020-04-05 14:04:19 +01:00
gallaert
4bab064ad6 - When HLA is enabled in Simgear, HLA is also enabled in Flightgear
making the build between Simgear and Flightgear consistent.
- Fix an issue with lib/lib64 path between CentOS/RedHat distributions
  and Debian derived distributions.
2020-03-15 22:29:43 +00:00
gallaert
e222c0888c Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2019-12-19 11:48:09 +00:00
Mykola Orliuk
65331599ec BoostTestTargets.cmake: support CMake 3.15
Signed-off-by: James Turner <zakalawe@mac.com>
2019-10-17 09:41:35 +01:00
James Turner
ca97b4371b Use alternative name for internal expat_config.h
Avoid clashes when system has expat installed.
2019-10-05 17:19:09 +01:00
Scott Giese
23f378cd93 Support VS 2019 - courtesy of Lars Toenning 2019-09-17 12:51:05 -05:00
Julian Smith
f407785f10 Fixes for building on OpenBSD. 2019-08-22 17:35:13 +01:00
gallaert
40ce45c8e9 Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2019-07-13 18:12:22 +01:00
Florent Rougon
319b59500c Convert obsolete uses of get_filename_component(<var> <FileName> PATH)
In the context of get_filename_component(), PATH is a legacy alias for
DIRECTORY. Replace it with DIRECTORY, which is recommended[1] for
CMake versions > 2.8.11.

[1] https://cmake.org/cmake/help/latest/command/get_filename_component.html
2019-04-25 19:19:19 +02:00
gallaert
72dd45388f Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2019-02-01 12:34:40 +00:00
Erik Hofman
7981809f36 Split up SIMD support in ENABLE_SIMD which enables sse2 support for the compiler and ENABLE_SIMD_CODE which enables the hand crafted SIMD math functions which defaults to OFF now since compilers have catched up on generating optimized vectorized SIMD code. 2019-01-15 10:36:23 +01:00
gallaert
5665403d66 Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2018-10-15 22:29:01 +01:00
James Turner
ff52b55a25 Mac: Set CMake OS-X deployment target correctly
Also raises the OS-X min version to 10.9 for libc++ compat
2018-10-01 22:28:56 +01:00
gallaert
35d1bb1149 Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2018-08-29 21:01:36 +01:00
James Turner
8dd0833993 Fix setting OPENAL_DIR on Windows
We need to set this in all cases, since AeonWave is requested by
default, but may not be available.
2018-08-23 19:11:50 +01:00
gallaert
5921fd19fb Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2018-07-18 20:48:01 +01:00
Scott Giese
05e3c29ee4 Support Visual Studio 2017 2018-06-22 22:19:49 -05:00
Erik Hofman
03156a6d94 Better AeoNWave detection 2018-06-05 09:39:51 +02:00
Erik Hofman
08258ee4b3 Detect AeonWave and if it is installed use it, otherwise fall back to OpenAL. Also let get_available_devices() use C++ strings instead of const char* 2018-06-02 14:06:15 +02:00
gallaert
b01718aae7 Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2018-04-25 21:08:46 +01:00
Florent Rougon
99c1dd8124 Add compiler options for GCC and Clang when CMAKE_BUILD_TYPE is Debug
When CMAKE_BUILD_TYPE is Debug and we are compiling with GCC, add the
following options to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS:

  -O0 -fno-omit-frame-pointer -fno-inline

Ditto for Clang, except that -fno-inline-functions is used instead of
-fno-inline.

cf. thread starting at
https://sourceforge.net/p/flightgear/mailman/message/36295412/
2018-04-18 08:25:10 +02:00
gallaert
8d265a8123 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/simgear into next 2018-01-21 20:06:46 +00:00
Thomas Geymayer
af5833cbc5 cppbind: Refactor to use C++11+ type_traits 2018-01-21 13:21:55 +01:00
Alessandro Menti
e7356223bb
CMakeLists.txt: explicitly enable the CMP0067 (C/C++ standard flags) policy
Explicitly enable the CMP0067 policy to have try_compile use the correct
C/C++ standard flags; otherwise, CMake will default to not honoring those,
causing the C/C++ checks to be compiled with no standard flags and SimGear
to be compiled with them. This causes errors if we try to detect a new
prototype which is only present in C++14 and above).
2018-01-03 11:54:04 +01:00
Florent Rougon
7547ad0391 Improve formatting of the HAVE_WORKING_STD_REGEX test
Indent the test code in a nicer way and shorten it, taking advantage of
this guarantee from the C++ standard:

  If control reaches the end of main without encountering a return
  statement, the effect is that of executing return 0.

-> no need for "#include <cstdlib>" nor for "return EXIT_SUCCESS".
2018-01-03 00:34:52 +01:00
Thomas Geymayer
52b8f60953 Add std::index_sequence for C++11
Will be required for nasal::Ghost
2018-01-02 08:00:49 +01:00
Florent Rougon
ab1e2d49ab Add a CMake check for a working <regex> implementation
Define HAVE_WORKING_STD_REGEX if, and only if <regex> is usable.

Normally, <regex> should be available and working in any compliant C++11
implementation, however at least g++ 4.8[1] lies about its C++11
compliance: its <regex> is utterly unusable, see [2] and [3] for
details.

[1] Which appears to be (precisely 4.8.5) the version shipped in
    CentOS 7, and used on FlightGear's current Jenkins installation.

[2] https://stackoverflow.com/a/12665408/4756009

[3] https://sourceforge.net/p/flightgear/mailman/message/36170781/
2017-12-29 13:46:42 +01:00
gallaert
12bed8e8ad Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/simgear into next 2017-11-17 18:46:21 +00:00