Tests: Cover fltk_wrap_ui on an executable that links libraries

CMake 3.4 may crash on this case.  The problem seems to have been
fixed since then, but keep it working by adding a test case now.

Reported-by: Gonzalo Garramuño <ggarra13@gmail.com>
This commit is contained in:
Brad King 2016-01-21 13:42:46 -05:00
parent 750ae8d5a8
commit f98ae28e3d
3 changed files with 7 additions and 4 deletions

View File

@ -85,16 +85,18 @@ endif ()
# Since FLTK_FLUID_EXE is supposed to create a .cxx/.h from a .fl/.fld,
# create an empty one so that the dependencies can be met.
#
set (FLTK_SRCS
fltk1.fl
)
add_executable(fakefluid fakefluid.cxx)
set (FLTK_WRAP_UI "On")
set (FLTK_FLUID_EXECUTABLE fakefluid)
fltk_wrap_ui (wraplibFLTK ${FLTK_SRCS})
fltk_wrap_ui (wraplibFLTK fltk1.fl)
add_library(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS})
add_dependencies(wraplibFLTK fakefluid)
add_dependencies(fakefluid Wrap)
fltk_wrap_ui (wrapFLTK fltk2.fl)
add_executable(wrapFLTK wrapFLTK.c ${wrapFLTK_FLTK_UI_SRCS})
target_link_libraries(wrapFLTK wraplibFLTK)
add_dependencies(wrapFLTK fakefluid)
#
# Mangled Mesa
#

0
Tests/Wrapping/fltk2.fl Normal file
View File

View File

@ -0,0 +1 @@
int main(void) { return 0; }