[Development] Proposing CMake as build tool for Qt 6

Jean-Michaël Celerier jeanmichael.celerier at gmail.com
Wed Jun 19 09:44:08 CEST 2019


Here's a basic one, with which I managed to compile & link simple stuff -
disclaimer : based on the ideas found in a google search for "keil"
"cmake".
I only tested on linux with wine. God is that compiler invocation ugly :)

Example project I used (with dummy foo.c/bar.c/"space out" subfolder not
attached) :

cmake_minimum_required(VERSION 3.14)
project(foo C)

add_executable(foo
    foo.c
    "space out/bar.c"
)

target_include_directories(foo
    PRIVATE
      "${CMAKE_CURRENT_SOURCE_DIR}"
      "${CMAKE_CURRENT_BINARY_DIR}"
      "space out"
)
target_compile_options(foo
    PRIVATE
      COMPACT
)
target_compile_definitions(foo
    PRIVATE
      hello
      toto="1"
)

Best,
Jean-Michaël

On Tue, Jun 18, 2019 at 1:44 PM Denis Shienkov <denis.shienkov at gmail.com>
wrote:

> > Matthew Woehlke
>
> > The difference between QBS and CMake is like the difference between a
> > bright-eyed recruit just out of school and a grizzled veteran.
>
> Ok, then, please, provide a simple toolchain file to use e.g. a bare-metal KEIL C51 [1] compiler. And then, we will to see, how it does in QBS and in CMake. Who will win then?
>
> PS: Of course, my question does not related to Qt build tool, it is a common question. :)
>
> [1] http://www.keil.com/support/man/docs/c51/c51_cm_cmdprompt.htm
>
> BR,
>
> Denis
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190619/7c1c698d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Keil.cmake
Type: application/octet-stream
Size: 1102 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190619/7c1c698d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KeilLink.cmake
Type: application/octet-stream
Size: 112 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190619/7c1c698d/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KeilCompile.cmake
Type: application/octet-stream
Size: 736 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190619/7c1c698d/attachment-0002.obj>


More information about the Development mailing list