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 #44265 is a reply to message #44264] Sat, 14 February 2015 01:05 Go to previous messageGo to previous message
cyrion is currently offline  cyrion
Messages: 15
Registered: May 2006
Location: Grenoble, France
Promising Member
Quote:

What I said might look like as rudeness, but it is not.

No problem, I was not there for a few hours, I just saw your answer now.
Thank you for the updated links!

Quote:

There were many CMake releases (and possible compatibility issues for previous versions) from 2011 year.
Constantly updating the attachments for new versions of U++ and CMake is not productive, in my opinion, especially when done manually.

This topic is open for questions, related to the topic messages. But they might be quite outdated, when used with modern U++ and CMake.

If you have a (new) method or a way how to use CMake and U++, then better to create a new topic about this, in my opinion.

From my side, I'm just happy I found a solution to my problem with your help!
In fact I started creating my CMakeFiles without knowing you already explored that problem, then I found this forum entry when I looked for a solution to my colors bug.
Thought it was the good place to ask - and in fact it was Smile Thanks again!

I really love the UPP way to create nice and small GUI apps without external dependencies, and I just wanted to make this working with QtCreator.
TheIDE is great, fast & smooth ; I like the nested code blocks with the different colors, the << completion and the indispensable statistics and elapsed time Smile but IMHO it lacks some recent functionalities I'm really used to: easy global/local search & replace, simultaneous multiple lines editing (aka "column mode" or "block selection mode"), refactoring, ctrk/k+key stuff, VIM integration, etc. Also JOM for parallel builds is probably as fast as BLITZ at first sight, maybe faster. I'll check that but I first have to add the PCH to be fair Smile

So my goal here was not to automatically create CMakeFiles from upp projects, I'm good with the idea of maintaining my CMakeFiles manually, but of course that's only a workaround.

About my final solution - no competition here Wink - I updated your function add_init_file for this one:
function(create_cpps_from_icpps )
    file( GLOB icpp_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.icpp"   )
    foreach( icppFile ${icpp_files} )
        set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${icppFile}.cpp")
        file(WRITE "${output_file}" "#include \"${CMAKE_CURRENT_SOURCE_DIR}/${icppFile}\"\n")
    endforeach()
endfunction()

It creates the icpp.cpp files in the binary dir. Each one of them having the name of the original icpp it makes easier to catch compile / link errors compared to the multiple init.cpp that had the same name.

So as you may have noticed, I do not rely on Mirek ini files. That's probably not a good idea, but when I tried using them it added a lot of unnecessary (in my case) dependencies, missing symbols and also multiple symbols definitions that broke everything.
I didn't really digged very far to check why, but I think ini files can potentially add the same cpp multiple times.
The way I do makes possible to only link with the required modules, and not the others.

To finish, my main app looks like that :
set( sources
	SQLApp.h
	SQLApp.sch
	query.cpp
	book.cpp
	borrow.cpp
	main.cpp
)

file( GLOB_RECURSE ini_files "${CMAKE_CURRENT_BINARY_DIR}/../*.icpp.cpp"   )

add_executable( SQLApp WIN32 ${sources} ${ini_files} )

The GLOB_RECURSE stuff is not very pretty, but it does the job: it links the icpp to the app the exact same way that fixed my problem at first.

For now its working, but I only use a subset of UPP, namely :
add_subdirectory( "plugin/z"  )
add_subdirectory( Core )
add_subdirectory( Draw )
add_subdirectory( "plugin/bmp"  )
add_subdirectory( "plugin/png"  )
add_subdirectory( RichText )
add_subdirectory( CtrlCore )
add_subdirectory( CtrlLib  )
add_subdirectory( "plugin/sqlite3"  )
add_subdirectory( Sql  )
add_subdirectory( SqlCtrl  )
add_subdirectory( Report  )
add_subdirectory( CodeEditor  )
add_subdirectory( "plugin/pcre" )
add_subdirectory( "plugin/zip" )

So maybe it will break in the future, I don't know!


[Updated on: Sat, 14 February 2015 01:16]

Report message to a moderator

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


Current Time: Sun May 12 07:51:13 CEST 2024

Total time taken to generate the page: 0.03190 seconds