From 44cbdf73642c698f523e9bd35895b0b9bfdb768a Mon Sep 17 00:00:00 2001 From: Lendemor Date: Thu, 2 Jun 2016 19:25:11 +0200 Subject: [PATCH] added example for version in test --- test/CMakeLists.txt | 3 +++ test/test.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7af8046..a98398a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 2.8) set(CMAKE_TEMPLATE_PATH "..") +set(VERSION_MAJOR 0) +set(VERSION_MINOR 1) + #SET(RESOURCE_DIRS /shaders) #SET(RES_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/plop.txt ${CMAKE_CURRENT_SOURCE_DIR}/plop2.txt) diff --git a/test/test.cpp b/test/test.cpp index 86a4a11..3e25a40 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,5 +1,6 @@ #include #include "../resource/resource.h" +#include "Version.h" using namespace std; @@ -10,6 +11,8 @@ int main() Resource::ResourceMap resMap; Resource::getResourcePack_res(resMap); + cout << "Testing program for CMakeTemplate version " << VERSION_MAJOR << "." << VERSION_MINOR << endl; + cout << resMap["hello.txt"] << endl; cout << "resources available : " << endl << endl;