CMAKE build with build examples. On and test OFF fails

11 views
Skip to first unread message

Gonzalo Garramuno

unread,
Nov 18, 2022, 7:34:50 AM11/18/22
to fltkc...@googlegroups.com
Compiling on macOS:

$ cd FLTK_DIR
$ mkdir build
$ cd build
$ cmake .. -D FLTK_BUILD_EXAMPLES=ON -D FLTK_BUILD_TEST=OFF

…etc…

-- Found Threads: TRUE
CMake Error at CMake/fl_create_example.cmake:98 (FLTK_RUN_FLUID):
Unknown CMake command "FLTK_RUN_FLUID".
Call Stack (most recent call first):
examples/CMakeLists.txt:116 (CREATE_EXAMPLE)


Gonzalo Garramuno
ggar...@gmail.com




imacarthur

unread,
Nov 18, 2022, 7:48:29 AM11/18/22
to fltk.coredev
On Friday, 18 November 2022 at 12:34:50 UTC Gonzalo wrote:
Compiling on macOS:

$ cd FLTK_DIR
$ mkdir build
$ cd build
$ cmake .. -D FLTK_BUILD_EXAMPLES=ON -D FLTK_BUILD_TEST=OFF

…etc…

-- Found Threads: TRUE
CMake Error at CMake/fl_create_example.cmake:98 (FLTK_RUN_FLUID):
Unknown CMake command "FLTK_RUN_FLUID".
Call Stack (most recent call first):
examples/CMakeLists.txt:116 (CREATE_EXAMPLE)

Oh, interesting...

I do not think I have *ever* tried that combination.
I guess the crux is that the fluid stuff is typically invoked to build the tests, but if you do not build the tests, that means that fluid is not set up, or something?

TBH, I'd be inclined to remove the ability to inhibit the tests, since they are Very Useful anyway...!

Albrecht Schlosser

unread,
Nov 19, 2022, 5:57:36 AM11/19/22
to fltkc...@googlegroups.com
On 11/18/22 13:34 Gonzalo Garramuno wrote:
> Compiling on macOS:
>
> $ cd FLTK_DIR
> $ mkdir build
> $ cd build
> $ cmake .. -D FLTK_BUILD_EXAMPLES=ON -D FLTK_BUILD_TEST=OFF
>
> …etc…
>
> -- Found Threads: TRUE
> CMake Error at CMake/fl_create_example.cmake:98 (FLTK_RUN_FLUID):
> Unknown CMake command "FLTK_RUN_FLUID".
> Call Stack (most recent call first):
> examples/CMakeLists.txt:116 (CREATE_EXAMPLE)

Thanks for the report.

Fixed in commit f375ff968977300a696422e2e73f59f57a32125c.

Albrecht Schlosser

unread,
Nov 19, 2022, 6:04:22 AM11/19/22
to fltkc...@googlegroups.com
On 11/18/22 13:48 imacarthur wrote:
On Friday, 18 November 2022 at 12:34:50 UTC Gonzalo wrote:
Compiling on macOS:

$ cd FLTK_DIR
$ mkdir build
$ cd build
$ cmake .. -D FLTK_BUILD_EXAMPLES=ON -D FLTK_BUILD_TEST=OFF

…etc…

-- Found Threads: TRUE
CMake Error at CMake/fl_create_example.cmake:98 (FLTK_RUN_FLUID):
Unknown CMake command "FLTK_RUN_FLUID".
Call Stack (most recent call first):
examples/CMakeLists.txt:116 (CREATE_EXAMPLE)

Oh, interesting...

I do not think I have *ever* tried that combination.

Neither did I - otherwise this bug report wouldn't have come up. ;-)


I guess the crux is that the fluid stuff is typically invoked to build the tests, but if you do not build the tests, that means that fluid is not set up, or something?

Yes, something like that. If the tests are built a CMake macro is included and this macro is used in the examples directory w/o explicitly including it, hence the command was unknown.


TBH, I'd be inclined to remove the ability to inhibit the tests, since they are Very Useful anyway...!

There's a legit reason to exclude the tests and examples (and since a few days fluid as well) if you just want to build the bare FLTK library for your own usage. This can for instance be useful if you need the FLTK libs as a prerequisite in your own CMake build.

There's no need to build the tests if you never want to run them.

melcher....@googlemail.com

unread,
Nov 19, 2022, 8:30:43 AM11/19/22
to fltk.coredev
Thanks Albrecht for fixing that. I was afraid I messed up a commit, but didn't;t have the time to look at it.
Reply all
Reply to author
Forward
0 new messages