Commit Graph
185 Commits
Author SHA1 Message Date
bitbybit3d 28783de62b fix target_compile_definitions misspelling 2022-09-26 23:05:39 +01:00
Clifford Yapp 7dbda20be0 Remove base library from stepcode
Move specific pieces of logic still in use next to the individual parts
of the code that use them, and eliminate base from the code.
2022-09-26 20:52:17 +01:00
Clifford Yapp 97c3d193a1 sc_cf.h -> config.h
Remove unused sc_cf_cmake.h.in, rename sc_cf.h to the more standard name
"config.h", don't call the generator twice
2022-06-11 17:41:58 +01:00
Clifford Yapp 0fd354cb39 Make sure BUFSIZ buffers have room for NULL
In case we do end up with buffers with contents at the BUFSIZ limit,
make sure we leave room to set a null termination char.  Not always
clear where these buffers might get used or re-used, so just bump their
size across the board.
2022-06-11 17:33:24 +01:00
Clifford Yapp e4277656ef Add a sentinel target for perplex generated output
Getting an intermittent failure on Windows where the expscan.h header
apparently isn't present on the file system soon enough for the build to
succeed (a subsequent reinvocation of the build command does succeed.)

Try the standard technique of making another file write depend on the
outputs of the header and src file, then define a target depending on
that sentinel file and make the obj libraries depend on that target.
2021-08-17 13:00:15 -04:00
Clifford Yapp 62be4c90c6 Use CMake 3.12 everywhere. 2021-08-15 09:22:59 +01:00
Clifford Yapp 8adb5e638d Remove no-longer-used CMake files. 2021-08-15 09:22:59 +01:00
Clifford Yapp fceb57390c Until we need the newer re2c, don't insist on it.
BRL-CAD's supporting system for building this will need some updates
once we require a newer re2c - to make testing easier in the meantime,
don't require the newer version.
2021-08-15 09:22:59 +01:00
Clifford Yapp ae18190f69 Make copy more robust for parallel builds
This is a classic problem - the file copy will begin, the file will be
"present" in some sense on the file system, and build steps that need it
will begin - but they won't find what they actually need because the
copy isn't fully executed.  The standard approach for this is to add a
second file which is only created after the first is done, and then make
the target depend on the second file rather than the first.
2021-08-15 09:22:59 +01:00
Clifford Yapp 8c9b3471fb Build again w/ the generator tools. 2021-08-15 09:22:59 +01:00
Chris HORLER 22c437d45e Simplify the Lemon and RE2C modules
Original work adapted from commits:
b1844be9cc
92cb70de2b
2021-08-15 09:22:59 +01:00
Clifford Yapp 5ea56aac02 update build system
(cherry picked from commit b1844be9cc)
2021-08-15 09:22:59 +01:00
Chris HORLER 6cf5d1e860 CMake update
- variable usage, RPATHs, config header generation
 - remove the CMake core target
2021-08-15 09:22:29 +01:00
Chris HORLER e617808be1 simplify SC_VERSION and library versioning 2021-08-14 10:24:35 +01:00
Clifford Yapp 4f20f391c6 Reverting develop back to commit 548fd82ad7 2021-08-04 16:04:32 -04:00
Cliff Yapp a1462e99b0 Simplify header generation. 2020-12-17 23:57:22 -05:00
Cliff Yapp ec35904342 Wignored-qualifiers errors make looking for any other issues difficult - suppress them until we can figure out how not to trigger them. 2020-12-14 16:27:15 -05:00
Cliff Yapp 9bba7d5157 Simplify build options.
This strips down the build options to more vanilla CMake,
removes the uninstall target, and goes back to respecting
CMAKE_INSTALL_PREFIX.
2020-12-14 16:16:56 -05:00
Cliff Yapp 4bf478b6e3 Remove the express-only option 2020-12-14 16:09:26 -05:00
Cliff Yapp 725ec378c7 Remove unused file, line wrap scanner README 2020-12-14 16:00:58 -05:00
Cliff Yapp 5d8c597d8f Simplify BUILD_SHARED_LIBS and BUILD_STATIC_LIBS options. 2020-12-14 15:58:24 -05:00
Cliff Yapp 44fb19669b Simplify relative directory settings 2020-12-14 15:43:54 -05:00
Cliff Yapp 6368ed08f9 Dispense with the separate version header 2020-12-14 15:26:31 -05:00
Cliff Yapp 142edd5698 Go with the simpler version string.
The relatively complicated logic trying to pull in the git sha1 id for
each build is proving fragile in some scenarios.  Just go with a
simpler encoding of the defined library version.
2020-12-02 20:38:55 -05:00
Cliff Yapp 371d498c0a Don't set RPATH settings if they've already been defined. 2020-12-02 19:37:46 -05:00
Cliff Yapp 90de683f5a Adjust versioning of shared libraries.
Simplify - just use the library versions for the shared library links.
Also, accommodate OpenBSD's particular convention for such libraries.
2020-12-01 12:07:13 -05:00
Cliff Yapp 414b8705a2 Remove md5 verification of generated sources.
This has proven to be more trouble than it is worth - changes
to the lexer and parser inputs are relatively rare at this point,
and different versions of re2c/lemon can break the checks.
2020-11-30 21:36:27 -05:00
Cliff Yapp 3f8bde4319 Update Find* modules to the latest from BRL-CAD 2020-11-30 21:15:25 -05:00
Chris HORLER 88e82d8faf reenable lemon / full build for integration test purposes 2020-07-21 23:22:48 +01:00
Chris HORLER a4d1e03f0d ensure when SC_BUILD_EXPRESS_ONLY is set that we do not build the schema scanner 2020-07-21 15:25:38 +01:00
Chris HORLER 5ab50bb68f begin to modernise / simplify CMake code 2019-08-26 18:42:45 +01:00
Chris HORLER 85b76db65a use _WIN32 for Windows and _MSC_VER for compiler checks 2019-08-26 17:38:09 +01:00
Chris HORLER e934fa246c drop the Generic typedef 2019-08-07 20:30:32 +01:00
luz.paz f93abd2991 Misc. typos
Found via `codespell`
2018-07-13 19:12:09 -04:00
Jeff Epler d39fbaf4d7 sc_version_string: Use temporary names resilient against parallel builds
In #359 I identify a race condition between multiple parallel invocations
of cmake, which can arise naturally during ctests.  Now that the file
contents will not change without an intervening git commit, it is
sufficient to ensure that the parallel invocations use distinct temporary
file names with high probability.
2017-08-21 08:31:05 -05:00
Jeff Epler e422262877 sc_version_string: omit the date and time when testing
As analyzed in #359, if the header contains the current time, it will
be updated while running the testsuite; this, in turn, causes multiple
cmake processes to attempt to update targets like lib/libexpress.so.2.0.0
at the same time, causing test failures.
2017-08-21 08:31:00 -05:00
Jeff Epler 0fbc3c0c84 Fix build error with g++ 6.3 (Debian Stretch)
On this platform, TEST_NULLPTR fails, even though nullptr and
nullptr_t are supported:

/home/jepler/src/stepcode/build/CMakeFiles/CMakeTmp/src.cxx:4:23:
    error: converting to 'bool' from 'std::nullptr_t'
    requires direct-initialization [-fpermissive]
 int main() {return !!f();}
                      ~^~

Subsequent to this failure, the workaround definitions in sc_nullptr.h
prevent standard C++ headers (which must refer to real nullptr) to fail.

The failure occurs because the C++ standard apparently does not state
that operator! may be used on nullptr.  Despite this, some compilers
have historically allowed it.  g++ 6.3's behavior appears to be aligned
with the standard.

As requested by @brlcad, ensure that the function 'f' is used from main,
to avoid a clever (but not nullptr-supporting) compiler from somehow
skipping 'f' altogether, creating a false positive for nullptr support.
2017-08-15 06:50:56 -05:00
Cliff Yapp 8627627c5e Add an option to completely bypass the git management of the version header. 2016-08-06 13:53:12 -04:00
Cliff Yapp 9b091756b1 Allow the user to control whether C++11 is used (matters for subbuilds) 2016-08-06 13:02:35 -04:00
Cliff Yapp 5c7e63c75b Fix macro comments. This approach to managing the targets varies from the old EXCLUDE_OR_INSTALL setup in that by default the testable targets are not added to the 'all' build - in other works, 'make' will make just the main stepcode targets. The testable targets are available individually, and if SC_ENABLE_TESTING is enabled they *will* be added to the 'all' target, but by default they are not compiled in the basic build. 2016-08-06 12:32:12 -04:00
Cliff Yapp a243b4d8c8 Separate shared and static generated files for better parallel building safety. 2016-08-06 11:55:38 -04:00
Cliff Yapp daec3e2640 Add option handling to the SC target macros, replacing the EXCLUDE_FROM_INSTALL macro. 2016-08-06 11:43:59 -04:00
Cliff Yapp 06b13bb9af Make a stab at adapting the new, simplier verification to vanilla stepcode 2016-08-06 11:23:34 -04:00
Cliff Yapp e38519a7f1 Update Find cmake scripts 2016-08-06 10:53:19 -04:00
Cliff Yapp 12def15dd2 Start working on merging BRL-CAD changes back into upstream. 2016-08-06 10:46:23 -04:00
Mark Pictor bc5533bda8 test for, and use, nullptr if we have it 2015-08-03 21:37:28 -04:00
Mark Pictor 458b775f41 simplify cmake logic - use set_property(...APPEND...) rather than get/list append/set 2015-08-02 14:30:01 -04:00
Mark Pictor 17b41da525 add std::chrono test, if available use in thread test 2015-07-26 22:22:44 -04:00
Mark Pictor 135adc76c8 fix warning, improve cmake messages 2015-07-26 20:49:04 -04:00
Mark Pictor 017faa942f make schema-specific tests work on cmake 3.x 2015-07-26 20:49:04 -04:00