Feature #1096
add wt version check to the FindWt.cmake module.
Added by Arjan Vermeij over 10 years ago.
Updated almost 9 years ago.
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)
- Status changed from New to InProgress
- Assignee set to Wim Dumon
- Priority changed from Normal to Low
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;
}
Also available in: Atom
PDF