Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Building TheIDE with using CMake
Re: Building TheIDE with using CMake [message #46557 is a reply to message #46556] Thu, 26 May 2016 15:03 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello Radek.

coolman wrote on Thu, 26 May 2016 06:16

Based on this discussion I created bash script to generate CMakeList.txt from the Ultimate++ project - see https://github.com/CoolmanCZ/upp_cmake


Looks like, you did a lot of work to automate CMakeLists.txt files generation. Very nice.

I managed to build TheIDE on FreeBSD 10.2 with using "Ninja" CMake generator (just for example), with some fixes. I added "link_directories(/usr/local/lib)" (because this is where local libraries reside on FreeBSD by default) and some checks for Clang compiler:
Toggle patch

Then I configured upp_cmake/GenerateCMakeFiles.sh file for FreeBSD, used it, generated CMake building files and make a build. Just example for current U++ nightly source files:
% cd upp_cmake
% sed -i '.bak' -e '/^UPP_SRC_DIR/s/=/?&/' -e 's/LINUX/BSD -DflagFREEBSD/' GenerateCMakeFiles.sh
% wget http://www.ultimatepp.org/downloads/upp-x11-src-9886.tar.gz
% tar -xf upp-x11-src-9886.tar.gz
% env UPP_SRC_DIR=upp-x11-src-9886/uppsrc bash GenerateCMakeFiles.sh
% mkdir build && cd build && cmake -G Ninja ../
% ninja

Edit:
Submitted pull request with proposed patch in this message. And it was committed later.

[Updated on: Fri, 27 May 2016 14:24]

Report message to a moderator

Re: Building TheIDE with using CMake [message #46703 is a reply to message #46557] Fri, 15 July 2016 20:55 Go to previous messageGo to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

Bash script to generate CMakeLists.txt for the Ultimate++ project now support MINGW and MSVC compilation and link flags.

BR, Radek

[Updated on: Fri, 22 July 2016 11:34]

Report message to a moderator

Re: Building TheIDE with using CMake [message #46836 is a reply to message #46703] Thu, 25 August 2016 12:44 Go to previous messageGo to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

Some information about the progress with the script:

Support
* New Core with C++11 build (require GCC 4.9+)
* Release or debug build
* Binary resource support (BINARY, BINARY_MASK, BINARY_ARRAY)
* Cross compile support (require MINGW GCC 4.9+)
* (MSYS2) MINGW support
* Generated CMakeLists.txt files can be used to create a MS Visual C++ project
* Generated CMakeLists.txt files are generated only for dependent modules of the processed Ultimate++ project
* Create a distribution package
* Build shared libraries as the target (DLL, SO)

Limitation
* Ultimate++ source tree and directory of the project should be in the same directory as the generator scripts during build (you can use symlinks)
* Some options are not taken into account when generating CMakeLists

TODO
* Support of the pre-compiled headers (PCH)

Best regards, Radek
Re: Building TheIDE with using CMake [message #46858 is a reply to message #32310] Mon, 29 August 2016 12:31 Go to previous messageGo to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

The script now supports precompiled headers for GCC and Clang. Here are some measurements when building the ide:
Results using new PCH refactored code are red marked.

Upp source code:
git-svn-id: svn://ultimatepp.org/upp/trunk@10191 f0d560ea-af0d-0410-9eb7-867de7ffcac7 ( last commit: .doc .ctrlib Change several image in GUI tutorial )

Notebook Dell Latitude E5440:
(cat /proc/cpuinfo | grep 'model name' | uniq)
model name : Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
(cat /proc/cpuinfo | grep processor | wc -l)
4

Ubuntu 14.04 LTS Linux:
(uname -a)
Linux ul001172 4.3.0-040300-generic #201511020949 SMP Mon Nov 2 15:04:56 UTC 2015 i686 i686 i686 GNU/Linux
(cmake --version)
cmake version 2.8.12.2



Using original Makefile
linux, gcc version 4.9.3 (Ubuntu 4.9.3-8ubuntu2~14.04)
00:24:24 - orig Makefile - 1 core (size: 11 872 144)


Using generated CMakeLists.txt
linux, gcc version 4.9.3 (Ubuntu 4.9.3-8ubuntu2~14.04)
00:27:12 - pch disable - 1 core (size: 15 339 076)
00:24:36 - pch enable - 1 core (size: 15 334 980)

00:10:39 - pch disable - 4 core (size: 15 339 076)
00:13:40 - pch disable - 4 core (size: 15 339 076)
00:12:40 - pch disable - 4 core (size: 15 339 076) (refactored code)
00:08:07 - pch enable - 4 core (size: 15 334 980)
00:09:28 - pch enable - 4 core (size: 15 334 980)
00:09:43 - pch enable - 4 core (size: 15 334 980)
00:06:14 - pch enable - 4 core (size: 15 334 980) (refactored code)
00:05:57 - pch enable - 4 core (size: 15 334 980) (refactored code)


linux, clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
00:19:30 - pch disable - 1 core (size: 12 939 896)
00:15:48 - pch disable - 1 core (size: 12 939 896)
00:08:08 - pch enable - 1 core (size: 12 939 896)

00:09:06 - pch disable - 4 core (size: 12 939 896)
00:09:20 - pch disable - 4 core (size: 12 939 896) (refactored code)
00:04:36 - pch enable - 4 core (size: 12 939 896)
00:03:56 - pch enable - 4 core (size: 12 939 896)
00:03:54 - pch enable - 4 core (size: 12 939 896)
00:04:10 - pch enable - 4 core (size: 12 939 896) (refactored code)
00:04:40 - pch enable - 4 core (size: 12 939 896) (refactored code)


linux, cross-compilation, mingw32 gcc version 4.9.2 (GCC)
00:20:13 - pch disable - 1 core (size: 12 535 296)
00:13:02 - pch enable - 1 core (size: 12 513 280)

00:10:05 - pch disable - 4 core (size: 12 535 296)
00:10:11 - pch disable - 4 core (size: 12 535 296) (refactored code)
00:08:22 - pch enable - 4 core (size: 12 513 280)
00:08:19 - pch enable - 4 core (size: 12 513 280)
00:08:14 - pch enable - 4 core (size: 12 513 280)
00:04:30 - pch enable - 4 core (size: 12 513 280) (refactored code)
00:05:10 - pch enable - 4 core (size: 12 513 280) (refactored code)


linux, cross-compilation, mingw64 gcc version 4.9.2 (GCC)
00:20:28 - pch disable - 1 core (size: 13 800 448)
00:09:12 - pch enable - 1 core (size: 13 778 672)

00:11:13 - pch disable - 4 core (size: 13 800 448)
00:10:46 - pch disable - 4 core (size: 13 800 448)
00:10:35 - pch disable - 4 core (size: 13 800 448) (refactored code)
00:04:57 - pch enable - 4 core (size: 13 778 672)
00:04:40 - pch enable - 4 core (size: 13 778 672)
00:04:45 - pch enable - 4 core (size: 13 778 672)
00:05:05 - pch enable - 4 core (size: 13 778 672) (refactored code)
00:04:47 - pch enable - 4 core (size: 13 778 672) (refactored code)


Best regards, Radek

[Updated on: Fri, 02 September 2016 10:55]

Report message to a moderator

Re: Building TheIDE with using CMake [message #49392 is a reply to message #46858] Thu, 01 February 2018 23:03 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Coolman,

I tried to use your script with upp git mirror. But it deosn't work. I called following command:
cd uppmirror
uppbox/Cmake/GenerateCMakeFiles-lib.sh uppsrc/ide/ide.upp "-DflagGUI -DflagGCC -DflagLINUX -DflagPOSIX -DflagSHARED"

# I also copy your CMake generator to uppbox/lpbuild directory
# uppbox/Cmake/


It returns not output and cmake list is not generated either. I believe the minimal error output is needed.

Please provide support, if you can.

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Building TheIDE with using CMake [message #49393 is a reply to message #49392] Fri, 02 February 2018 07:09 Go to previous messageGo to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Klugier wrote on Thu, 01 February 2018 23:03
Hello Coolman,

I tried to use your script with upp git mirror. But it deosn't work. I called following command:
cd uppmirror
uppbox/Cmake/GenerateCMakeFiles-lib.sh uppsrc/ide/ide.upp "-DflagGUI -DflagGCC -DflagLINUX -DflagPOSIX -DflagSHARED"

# I also copy your CMake generator to uppbox/lpbuild directory
# uppbox/Cmake/


It returns not output and cmake list is not generated either. I believe the minimal error output is needed.

Please provide support, if you can.

Sincerely,
Klugier


Hi Klugier,

GenerateCMakeFiles-lib.sh is the source script. Take a look at the example.sh, how to set up the build.

BR, Radek
Re: Building TheIDE with using CMake [message #54488 is a reply to message #49393] Thu, 30 July 2020 12:05 Go to previous message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi all,

I would like to point out that the script is still being developed and expanded. See the upp_cmake repository. I would like to highlight the faster processing of UPP packaging sections and the shorter running of the script itself.

BR, Radek
Previous Topic: plugin/wav does not compile on clang or mingw on windows
Next Topic: New STEM4U package
Goto Forum:
  


Current Time: Thu Mar 28 23:50:51 CET 2024

Total time taken to generate the page: 0.01489 seconds