Project

General

Profile

Actions

Feature #1096

open

add wt version check to the FindWt.cmake module.

Added by Arjan Vermeij over 12 years ago. Updated over 10 years ago.

Status:
InProgress
Priority:
Low
Assignee:
Target version:
-
Start date:
12/13/2011
Due date:
% Done:

0%

Estimated time:

Description

It's be nice to have a way to check the version of wt in cmake. Perhaps something similar to the FindBoost cmake module, which allows you to specify a minimum version number, like

find_package (Boost 1.39)
Actions #1

Updated by Koen Deforche over 10 years ago

  • Status changed from New to InProgress
  • Assignee set to Wim Dumon
  • Priority changed from Normal to Low
Actions #2

Updated by Koen Deforche over 10 years ago

This probably will be needed:

GET_PROPERTY(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)

TRY_RUN(VERSION_RUN_RESULT VERSION_COMPILE_RESULT
           ${CMAKE_CURRENT_BINARY_DIR}
           ${CMAKE_CURRENT_SOURCE_DIR}/wt_version.cpp
           CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${dirs}"
           RUN_OUTPUT_VARIABLE WT_VERSION)

MESSAGE("WT VERSION: ${WT_VERSION}")

with wt_verison.cpp something like:

#include <Wt/WGlobal>
#include <iostream>
int main() {
   std::cout << "Version: " << WT_VERSION_STR << std::endl;
   return 0;
}
Actions

Also available in: Atom PDF