Conversion to the cmake building system.
#2
Merged
SlavekB
merged 5 commits from feat/cmakeConv
into master
4 years ago
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'feat/cmakeConv'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Guys, the sooner I get to know if the build tests over the gpsim version are corrects (for all supported Debian...or FreeBSD), the better. 😁
Rem:
-std=c++11 when building with gpsim-0.31 (if the compiler does not build c++11 turned on by default)
Looks good in bullseyes, but for all other distros we need Slavek's help 😄
@MicheleC, Hello Michele, if you've got some time for that (you seem awfully busy this week), can you send me over the resulting config.h file as well as making a short compile test?
Here is is (and yes, very busy for a few weeks more):
I mistakenly build master branch instead of the cmake conversion :-(
EDIT: I get this error on bullseye
Symbols visibility should have been fixed.
WIP:Conversion to the cmake building system.to Conversion to the cmake building system. 4 years ago@SlavekB, I have removed the WIP status of this PR. I'd like you to test it against all the Debian distros you package, once this is done we shall see what to do with the gpsim-0.31 test build and c++11. 😐
It looks good. However, there are a few comments.
@ -0,0 +45,4 @@
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
option( WITH_GPSIM "Enable gpsim support" ${WITH_ALL_OPTIONS} )
option( WITH_GLIB_1_2 "Enforce glib-1.2 support" OFF )
I'm still not very happy with this option. You notice that this is not used for ktechlab, but for gpsim as such. And here it is not possible to enforce the use of a different glib than the one with which gpsim was built. That is why enforcement looks strange in the ktechlab options, when ktechlab cannot enforce it. The problem is that there is probably no reasonable way to reliably determine which version of glib gpsim is built with.
@ -0,0 +47,4 @@
set( CMAKE_REQUIRED_INCLUDES ${GLIB_INCLUDE_DIRS} ${GPSIM_INCLUDE_DIRS})
else()
pkg_search_module( GLIB glib-2.0 )
tde_save( CMAKE_REQUIRED_INCLUDES )
These two rows can be pulled down bellow the condition because they are identical in both cases.
At the same time, there is missing verification that the glib search was successful.
@ -0,0 +54,4 @@
##### check for gpsim version
check_cxx_source_compiles( "
#include <gpsim/interface.h>
Please, can you indent the test code to make it easier to read, what is the test program code?
@ -0,0 +1 @@
tde_auto_add_subdirectories( )
By the way, here it would be possible to use common cmake rules for documentation – such as in the abakus.
@ -0,0 +92,4 @@
)
install(
FILES x-circuit.desktop x-flowcode.desktop
Note that there is a
Comment
in these desktop files, which could also be translated. So it also seems appropriate to usetde_create_translated_desktop
here.@ -58,3 +58,3 @@
}
void exit_gpsim(int ret)
#ifdef HAVE_CONFIG_H
It is unusual for an include file to be hidden deep in the code instead of being at the beginning of the source file…
Conversion to the cmake building system.to WIP:Conversion to the cmake building system. 4 years agoWIP:Conversion to the cmake building system.to Conversion to the cmake building system. 4 years agoI did a test on FreeBSD and it's not easy.
include "../config.h"
in the gpsim include file.src/electronics/port.cpp
, there are Linux-dependent things that cause FTBFS on non-Linux systems.Either the trouble is brought to mainstream gpsim Devs that they fix It or It is brought to the FreeBSD gpsim packager for him to patch.
Bothering ourself with this config file is not really an option and/or our very concern.
Out of curiosity, can you display the error? Maybe Akio can help too.
I did a workaround for it. At first I was afraid it would be ugly, but it looks acceptable. See recent commit.
First thing – Linux specific include: src/electronics/port.cpp#L17
Other resulting – linux ppdev specific ioctl codes, for example
PPCLAIM
: src/electronics/port.cpp#L438It looks good. The problem with Linux-dependent code goes beyond the scope of this PR, so it is not blocking for merging.
82104ef5be
into master 4 years agoReviewers
82104ef5be
.