Qore Programming Language
1.12.2
|
Qore comes with its own CMake support files.
The basic step for Qore inclusion in the CMake project is to put following line into CMakeLists.txt
project configuration.
CMake allows to set various CMAKE_BUILD_TYPE
build types. Qore package sets CMAKE_BUILD_TYPE
to debug
if it's not defined on input.
Qore files are located in CMAKE_PREFIX/lib
[LIB_SUFFIX]/cmake/Qore directory.
Argument | Description |
---|---|
package | Qore |
version | A required version of Qore |
EXACT | The EXACT option requests that the version be matched exactly. |
QUIET | The QUIET option disables messages if the package cannot be found |
REQUIRED | The REQUIRED option stops processing with an error message if the package cannot be found. |
COMPONENTS | Unused for Qore |
OPTIONAL_COMPONENTS | Unused for Qore |
Variable | Description |
---|---|
QORE_FOUND | Set if the system has Qore installed |
QORE_INCLUDE_DIR | Path to Qore include files |
QORE_INCLUDE_DIRS | CMake standard alias for QORE_INCLUDE_DIR |
QORE_LIBRARY | Qore library location and name used for linking |
QORE_LIBRARIES | CMake standard alias for QORE_LIBRARY |
QORE_MODULES_DIR | Location of Qore binary modules |
QORE_API_VERSION | Qore binary module API version |
QORE_EXECUTABLE | Qore language interpret binary location, including executable name |
QORE_QPP_EXECUTABLE | Qore QPP binary location, including executable name |
QORE_BUILD_TYPE_LWR | A lower-cased CMAKE_BUILD_TYPE value |
find_package(Qore)
sets some compiler defines automatically.
Variable | Description |
---|---|
DEBUG | Set if is the CMAKE_BUILD_TYPE set as debug |
NDEBUG | Set if is the CMAKE_BUILD_TYPE set as anything alse as debug |
There are more variables set when is the Qore Binary Modules Support for CMake functionality in use
There are some helper macros for Developing Qore Modules located in QoreMacros.cmake
file. Macros expect the module source code in following structure:
Location of rest of files including source code is irrelevant. If there are no Doxyfile.in
or cmake_uninstall.cmake.in
present the appropriate make target will not be created (make docs/make uninstall).
See Qore Binary Module Example for real use.
This macro generated C++ files and documentation headers from Qore Preprocessor (QPP). It takes files from in_files_list
for processing and it sets out_files_list
with values of new C++ files stored in CMAKE_BINARY_DIR
.
This macro sets environment for building binary modules.
Arguments:
target_name
= a base name of the module, the same as specified in add_libary
module_version
= a string with version used in compiler defines laterMacro results:
PACKAGE_VERSION
define is set to module_version
valueQORE_INCLUDE_DIR
and CMAKE_BINARY_DIR
are appended to include_directories
target_name
is set to use proper API and filename maskQORE_MODULES_DIR
make
uninstall
target is created when possiblemake
docs
target is created when posiiblemake docs notes
Macro calls find_package(Doxygen)
in this case. If there is Doxygen tool found and if is the
This macro creates make
dist
target to create distributable tarballs in TBZ2 format
This macro prints configuration label, text lines with information about architecture, build type, compiler flags, etc.