sigrok.org Git - pulseview.git/atom - CMakeLists.txt history Qt based LA/scope/MSO GUI https://sigrok.org/gitweb/?p=pulseview.git sigrok /static/git-favicon.png /static/git-logo.png 2023-09-08T19:27:53Z gitweb Fix CMake CXX_STANDARD handling, part 2 2023-09-08T19:27:53Z Soeren Apel redacted Soeren Apel redacted 2023-09-08T19:27:53Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=a9bead725250026dcd0f46547ffd6ed056ebf6a7
Fix CMake CXX_STANDARD handling, part 2

VERSION_GREATER_EQUAL was introduced with cmake 3.7, so we have to use the older, more verbose expression.

https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal
  • [DB] CMakeLists.txt
Fix CMake CXX_STANDARD handling 2023-09-08T19:15:11Z Soeren Apel redacted Soeren Apel redacted 2023-09-08T19:15:11Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=cb40d40c6c60f2b1bec744ad946253e3d8c56c13
Fix CMake CXX_STANDARD handling

https://sigrok.org/gitweb/?p=pulseview.git;a=commit;f=CMakeLists.txt;h=fa8d0fcb4cff4f19943fe3ff152dc1428b400b01 introduced a CXX_STANDARD value of 17 while still only requiring cmake 2.8.12.

However, https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html#cxx-standard shows that a value of 17 was introduced with cmake 3.8, leading to

"CXX_STANDARD is set to invalid value '17'" when trying to build with cmake < 3.8.

Hence, for versions below 3.8, we only check for up to 14.
  • [DB] CMakeLists.txt
Fix glibmm dependency check 2023-09-08T18:37:13Z Soeren Apel redacted Soeren Apel redacted 2023-09-08T18:37:13Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=e0a90b4c5d6b1163a2cbece13a90f2737f0814d4
Fix glibmm dependency check

https://sigrok.org/gitweb/?p=pulseview.git;a=commit;f=CMakeLists.txt;h=33c5ac28f73aa35c5fc4bbcf69a5ae61c0b50989 introduced the line

pkg_check_modules(GLIBMM_2_4 glibmm-2.4>2.28.0)

but https://cmake.org/cmake/help/v3.0/module/FindPkgConfig.html states

A <MODULE> parameter can have the following formats:

{MODNAME}            ... matches any version
{MODNAME}>={VERSION} ... at least version <VERSION> is required
{MODNAME}={VERSION}  ... exactly version <VERSION> is required
{MODNAME}<={VERSION} ... modules must not be newer than <VERSION>

Hence, ">" is an invalid atom and always makes the check fail. On systems without glibmm-2.68, this leads to glibmm not being found and the build aborting.
  • [DB] CMakeLists.txt
cmake: only optionally modify in-source .ts files (Qt lupdate) 2023-04-22T07:28:12Z Gerhard Sittig redacted Gerhard Sittig redacted 2023-04-22T07:28:12Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=3903edbd71789f8af1c3b133b5702bd1d66f9242
cmake: only optionally modify in-source .ts files (Qt lupdate)

The creation of .qm output files from .ts input data undoubtedly needs
to be an unconditional part of the build process. The modification of
.ts source files in contrast needs to remain an intentional activity
during development. The mere act of compiling sources to binaries shall
never modify the source tree. Move the lupdate(1) invocation out of the
default build process, while lrelease(1) remains in place.

Ideally we could have a "make ts-update" target for developers to invoke
as needed. But that'd be more involved since the qt5_create_translation()
cmake routine is involved, which needs to be passed variables content
that is only available at configure time. A future implementation could
investigate the add_custom_target() approach. This commit introduces the
ENABLE_TS_UPDATE cmake option to quickly address the issue.

How to reproduce:

  $ cd $SRC
  $ cmake --build $OUT
  $ git status -s
  $ cmake -DENABLE_TS_UPDATE=ON $OUT
  $ cmake --build $OUT
  $ git status -s

This commit also happens to bring build steps in closer promixity, while
making development iterations stand out more perceivably.
  • [DB] CMakeLists.txt
CMakeLists.txt: adjust cmake build rules for Qt6 support 2022-11-20T18:33:14Z Vesa-Pekka Palmu redacted Gerhard Sittig redacted 2022-11-20T18:33:14Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=136995b831c50d3261143b1183c73af55c9ba3a5
CMakeLists.txt: adjust cmake build rules for Qt6 support

Check for the availability of Qt5 as well as Qt6. Prefer Qt5 for
backwards compatibility, but accept when only Qt6 is available.
This unbreaks Mac OSX 12 builds with homebrew.

This change is based on work that was submitted by Dominik Sliwa
<redacted>.

It is assumed that failed tests for timestamps to text conversion
(the format_time_minutes() routine) and Qt widgets not being thread
safe are issues that do reproduce more often on the Mac platform
but are independent from Qt6 support. These issues will be dealt with
separately.
  • [DB] CMakeLists.txt
CMakeLists.txt: always use highest available C++17/C++14/C++11 standard 2022-11-24T13:48:00Z Gerhard Sittig redacted Gerhard Sittig redacted 2022-11-24T13:48:00Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=fa8d0fcb4cff4f19943fe3ff152dc1428b400b01
CMakeLists.txt: always use highest available C++17/C++14/C++11 standard

Check for the availability of the C++17, C++14, and C++11 language
standards. Prefer the highest available to build any of the feature
tests or applications. Factor out common conditions into a central spot
in the CMake build rules. Rename variables to avoid special chars in
their name.

Setup both the CMAKE_CXX_STANDARD cmake variable which internally is
used transparently, as well explicitly pass the -std= compile flag in
build instructions for feature checks and application code. It's what
the smuview build does, should also work for pulseview, and is assumed
to not harm either in case it's redundant.

This unbreaks operation in most generic ways on platforms like MacOS 12
(system library), and for external libraries of differing degrees of
aggressivness (boost, glibmm, sig++).
  • [DB] CMakeLists.txt
CMakeLists.txt: Enable use of C++17 on Apple systems 2022-11-20T18:23:40Z Vesa-Pekka Palmu redacted Gerhard Sittig redacted 2022-11-20T18:23:40Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=c303f96d9125f36715340a1ce31643dde86d263a
CMakeLists.txt: Enable use of C++17 on Apple systems

The stdlib on OSX 12 Monteray requires C++17 to compile. This change
tests for and conditionally enables C++17 support on Apple devices.
Other platforms remain unaffected.
  • [DB] CMakeLists.txt
CMakeLists.txt: Detect glibmm-2.68 in addition to glibmm-2.4 2022-11-20T18:20:09Z Vesa-Pekka Palmu redacted Gerhard Sittig redacted 2022-11-20T18:20:09Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=33c5ac28f73aa35c5fc4bbcf69a5ae61c0b50989
CMakeLists.txt: Detect glibmm-2.68 in addition to glibmm-2.4

On OS X with homebrew only glibmm-2.68 series is available. As far
as I can tell there are no breaking changes for PulseView on the
glibmm-2.68 ABI change.

This change still prefers glibmm-2.4 if found, and uses 2.4 if both
2.4 and 2.68 are available.
  • [DB] CMakeLists.txt
CMakeLists.txt: move includes to the top, earlier pkg-config lookup 2018-05-06T09:29:19Z Gerhard Sittig redacted Gerhard Sittig redacted 2018-05-06T09:29:19Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=723ac3f8c56bb5ed0b20f5911f6c449f114d35b6
CMakeLists.txt: move includes to the top, earlier pkg-config lookup

Move some of the common cmake includes to a location near the top of the
file. Lookup the pkg-config(1) utility before the construction of the
list of dependendencies.

Remaining subsequent includes are strictly conditional (backtrace), or
belong to different groups than source compilation (VCS revision, CPack).
  • [DB] CMakeLists.txt
CMakeLists.txt: consistent whitespace in atomics check 2022-11-20T18:45:09Z Vesa-Pekka Palmu redacted Gerhard Sittig redacted 2022-11-20T18:45:09Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=d56edfc6b108b662a49e795b6af8df42ab6fb296
CMakeLists.txt: consistent whitespace in atomics check

Previous CMakeLists.txt rules used to mix TAB and SPACE indentation.
Consistently use TAB instead. This amends commit 4da54b6be6a1 which
introduced the check for the atomics library.

[ no change in behaviour, see whitespace ignoring diff to verify ]
  • [DB] CMakeLists.txt
cmake: check for optional libsigrokdecode features (send EOF) 2021-12-26T06:54:36Z Gerhard Sittig redacted Gerhard Sittig redacted 2021-12-26T06:54:36Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=fe94bf8255145410d1673880932d59573c829b0e
cmake: check for optional libsigrokdecode features (send EOF)

Implement a feature check for the srd_session_send_eof() routine which
depends on the libsigrokdecode version. This test implementation is a
little more redundant than necessary, check_symbol_exists() would be
preferred instead but would not work in my local setup.
  • [DB] CMakeLists.txt
CMakeLists.txt: Only use -Wa,-mbig-obj and -O3 on Windows. 2020-09-23T19:19:38Z Uwe Hermann redacted Uwe Hermann redacted 2020-09-23T19:19:38Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=d8cdab78d434fa575ec3adc61b61cab252a2a8ed
CMakeLists.txt: Only use -Wa,-mbig-obj and -O3 on Windows.

Note: -mbig-obj has been available on 64bit bit builds for a while now, but
on 32bit builds it needs a rather recent binutils version (2.35, 07/2020).
  • [DB] CMakeLists.txt
Fix for cross-compiling for Windows using mingw MXE. 2020-09-09T10:44:59Z xorloser redacted Uwe Hermann redacted 2020-09-09T10:44:59Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=0ac6b18f9e5f20b680915a4771b0da3cc86dca31
Fix for cross-compiling for Windows using mingw MXE.

The -mbig-obj param fixes a 'too many sections for PE file' error.

The -O3 param fixes a 'section or string table size too large for PE file'
error.
  • [DB] CMakeLists.txt
cmake: move project() before other statements 2020-08-20T07:11:20Z Gerhard Sittig redacted Gerhard Sittig redacted 2020-08-20T07:11:20Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=d1125d7d9e5830bc1d17636988e6c72f9deaeaf3
cmake: move project() before other statements

The included GNUInstallDirs logic needs to know about the programming
languages which are used in the project. Without this spec a verbose
developer message gets emitted:

  CMake Warning (dev) at $HOME/share/cmake-3.18/Modules/GNUInstallDirs.cmake:225 (message):
    Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
    target architecture is known.  Please enable at least one language before
    including GNUInstallDirs.
  Call Stack (most recent call first):
    CMakeLists.txt:24 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.

Move the project() statement in CMakeList.txt before the include(), and
specify the C and C++ programming languages (C is needed at configuration
time for feature detection, before the application's C++ sources get built).
  • [DB] CMakeLists.txt
Implement MathSignal 2020-08-11T17:51:15Z Soeren Apel redacted Soeren Apel redacted 2020-08-11T17:51:15Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=4640a84e926ac4b82e2a1b6ef9fc80ef44c2bd3c
Implement MathSignal
  • [DB] CMakeLists.txt
Introduce math signals 2020-08-02T15:48:58Z Soeren Apel redacted Soeren Apel redacted 2020-08-02T15:48:58Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=b0773a8aa01735d7220284ab7a3e8b5d02b48e9e
Introduce math signals
  • [DB] CMakeLists.txt
Add metadata object handling 2020-04-27T09:00:36Z Soeren Apel redacted Uwe Hermann redacted 2020-04-27T09:00:36Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=f2739baea42501f5ad5f503f6ead9374b9253566
Add metadata object handling
  • [DB] CMakeLists.txt
TabularDecView: Make the model/view work 2020-04-10T11:49:52Z Soeren Apel redacted Uwe Hermann redacted 2020-04-10T11:49:52Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=f54e68b03d5d24c7787962fcc701d8d52b0ec8ab
TabularDecView: Make the model/view work
  • [DB] CMakeLists.txt
Add tabular decoder view 2020-04-07T19:12:58Z Soeren Apel redacted Uwe Hermann redacted 2020-04-07T19:12:58Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=24d69d27584c7adec70bc0d6db764a3db04fce3c
Add tabular decoder view
  • [DB] CMakeLists.txt
Add stacktrace support 2020-04-17T13:43:27Z Wolfram Sang redacted Uwe Hermann redacted 2020-04-17T13:43:27Z https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=b409dfdc01ed36b54f5b8a70b3738146a26bf37e
Add stacktrace support

Use backtrace when available, otherwise the basic stacktracer.

This fixes bug #1150.

Signed-off-by: Wolfram Sang <redacted>
  • [DB] CMakeLists.txt