From 3b9a04ae2eeed139717c8b368b2e99c495394706 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 13 Aug 2020 20:32:56 +0200 Subject: CMake: add examples folder to build (optional) - replace misnamed option 'OPTION_BUILD_EXAMPLES' with 'FLTK_BUILD_TEST' - add option 'FLTK_BUILD_EXAMPLES' to build apps in examples folder - move examples/fltk-versions.cxx to test/fltk-versions.cxx - [Travis-CI] enable option 'FLTK_BUILD_EXAMPLES' for automatic builds --- test/fltk-versions.cxx | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 test/fltk-versions.cxx (limited to 'test/fltk-versions.cxx') diff --git a/test/fltk-versions.cxx b/test/fltk-versions.cxx new file mode 100644 index 000000000..ed80c7b1f --- /dev/null +++ b/test/fltk-versions.cxx @@ -0,0 +1,78 @@ +// +// Library version test program for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2017 by Bill Spitzak and others. +// +// This library is free software. Distribution and use rights are outlined in +// the file "COPYING" which should have been included with this file. If this +// file is missing or damaged, see the license at: +// +// https://www.fltk.org/COPYING.php +// +// Please see the following page on how to report bugs and issues: +// +// https://www.fltk.org/bugs.php +// + +#include +#include +#include +#include + +#include + +static char version[8][80] = { "","","","","","","","" }; + +int main(int argc, char **argv) { + + int versions = 0; + + sprintf(version[versions++],"FL_VERSION = %6.4f",FL_VERSION); + sprintf(version[versions++],"Fl::version() = %6.4f %s",Fl::version(), + (FL_VERSION == Fl::version()) ? "" : "***"); + +#ifdef FL_API_VERSION + sprintf(version[versions++],"FL_API_VERSION = %6d",FL_API_VERSION); + sprintf(version[versions++],"Fl::api_version() = %6d %s",Fl::api_version(), + (FL_API_VERSION == Fl::api_version()) ? "" : "***"); +#endif + +#ifdef FL_ABI_VERSION + sprintf(version[versions++],"FL_ABI_VERSION = %6d",FL_ABI_VERSION); + sprintf(version[versions++],"Fl::abi_version() = %6d %s",Fl::abi_version(), + (FL_ABI_VERSION == Fl::abi_version()) ? "" : "***"); +#endif + + for (int i=0; ilabelfont(FL_COURIER); + box[i]->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); + } + + window->end(); + window->show(argc, argv); + return Fl::run(); +} -- cgit v1.2.3