Main  /  Edit version 5  /  Edit version 6  /   /  Users Area

Difference "Howto" ver. 5 versus ver. 6

Content:

<!--toc-->
## Introduction
This is a collection of small howtos. Most experienced C++ developers would find the official documentation enough, but some less experienced developers might find the following useful.
## How to compile the templates with cmake?
First, create your CMakeLists.txt as you would for a simple application (see cmake documentation or see the [cmake file of wikipp](http://cppcms.svn.sourceforge.net/viewvc/cppcms/wikipp/branches/for_cppcms_v100/CMakeLists.txt?view=log)).
In order for cmake to compile the template whenever your .tmpl files have changed and only then, add the following to your CMakeList.txt file:
set(TEMPLATES my_view.tmpl)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/my_view.cpp
COMMAND cppcms_tmpl_cc
${TEMPLATES}
-o ${CMAKE_CURRENT_BINARY_DIR}/my_view.cpp
${TEMPLATES}
DEPENDS ${TEMPLATES})
<!--toc-->
## Introduction
This is a collection of small howtos. Most experienced C++ developers would find the official documentation enough, but some less experienced developers might find the following useful.
## How to compile the templates with cmake?
First, create your CMakeLists.txt as you would for a simple application (see cmake documentation or see the [cmake file of wikipp](http://cppcms.svn.sourceforge.net/viewvc/cppcms/wikipp/branches/for_cppcms_v100/CMakeLists.txt?view=log)).
In order for cmake to compile the template whenever your .tmpl files have changed and only then, add the following to your CMakeList.txt file:
set(TEMPLATES my_view.tmpl)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/my_view.cpp
COMMAND cppcms_tmpl_cc
${TEMPLATES}
-o ${CMAKE_CURRENT_BINARY_DIR}/my_view.cpp
${TEMPLATES}
DEPENDS ${TEMPLATES})
See also the [discussion at Stack overflow](http://stackoverflow.com/questions/4643531).

Sidebar:

← [Reload the application](http://cppcms.com/wikipp/en/page/cppcms_1x_reload_application)
[Plugin Architecture](http://cppcms.com/wikipp/en/page/cppcms_1x_plugin_architecture)→

About

CppCMS is a web development framework for performance demanding applications.

Support This Project

SourceForge.net Logo

Поддержать проект

CppCMS needs You


Navigation

Main Page


Valid CSS | Valid XHTML 1.0