diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-10-06 18:17:55 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-10-06 18:17:55 +0200 |
| commit | cf20474d7c13aeeb59f0248e86a26143c500b47c (patch) | |
| tree | 3227a4e39c88b0a954acaaaae09dbf66aac5b5c0 /test/CMakeLists.txt | |
| parent | a6f02f86fa444c758dfd15ec0bcfb9415307dbe4 (diff) | |
CMake: Simplify adding test programs for developers
The intention is to make it more convenient for developers to add
one or more test programs for their tests by editing only one
variable (extra_tests).
Diffstat (limited to 'test/CMakeLists.txt')
| -rw-r--r-- | test/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 33df73a62..160efe21a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -47,6 +47,15 @@ include_directories( ) ####################################################################### +# Define additional example programs for testing, for instance: +# set (extra_tests issue-276 str-1895) +# Use the source file test/'name'.cxx for each additional program. +# These test programs will be built with image and GL libraries. +# Leave the variable 'extra_tests' empty to disable extra test programs. + +set (extra_tests) + +####################################################################### # Add the ANDROID_OK option if the example can be compiled for Android # as well as for other platforms. @@ -134,6 +143,15 @@ CREATE_EXAMPLE (valuators valuators.fl fltk) CREATE_EXAMPLE (unittests unittests.cxx fltk) CREATE_EXAMPLE (windowfocus windowfocus.cxx fltk) +# create additional test programs (used by developers for testing) +if (extra_tests) + # message ("") + foreach (name ${extra_tests}) + # message (STATUS "Will build additional test program ${name}") + create_example (${name} ${name}.cxx "fltk_images;fltk_gl;fltk") + endforeach () +endif () + # OpenGL demos... if (OPENGL_FOUND) CREATE_EXAMPLE (CubeView "CubeMain.cxx;CubeView.cxx;CubeViewUI.fl" "fltk_gl;fltk") |
