Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turning the no_keyword (Qt option) ON in a cmake file to work with boost::signals

Tags:

boost

qt

I'm having problems using Qt4 and boost::signals.

Searching the internet I found about the no_keyword options to put in a .pro file.

CONFIG += no_keywords

Problem is, the project I'm involved uses cmake and not .pro files. So how do I turn this options on in a cmake file ?

like image 941
Diego Wormsbecker Avatar asked Oct 04 '17 18:10

Diego Wormsbecker


People also ask

What is CMake QT?

CMake is a tool to simplify the build process for development projects across different platforms. CMake automatically generates build systems, such as Makefiles and Ninja files. CMake is a third-party tool with its own documentation. This manual focuses on how to use CMake to build Qt applications and libraries.

Does Qt use CMake?

Qt relies on some bundled tools for code generation, such as moc for meta-object code generation, uic for widget layout and population, and rcc for virtual file system content generation. These tools may be automatically invoked by cmake(1) if the appropriate conditions are met.

What is CMake in Qt Creator?

CMake automates the configuration of build systems. It controls the software compilation process by using simple configuration files, called CMakeLists. txt files. CMake generates native build configurations and workspaces that you can use in the compiler environment of your choice.


1 Answers

Try to add ADD_DEFINITIONS(-DQT_NO_KEYWORDS) to your CMakeLists.txt

like image 77
hrantzsch Avatar answered Nov 15 '22 07:11

hrantzsch