<div class="gmail_quote">On Mon, Feb 16, 2009 at 10:23 PM, Aaron Turner <span dir="ltr"><<a href="mailto:synfinatic@gmail.com">synfinatic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, Feb 16, 2009 at 5:53 PM, Michael Jackson<br>
<<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>> wrote:<br>
> project(Test)<br>
> cmake_minimum_required(VERSION 2.7)<br>
><br>
> INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)<br>
><br>
> set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS})<br>
> set(CMAKE_REQUIRED_DEFINITIONS<br>
> ${CMAKE_REQUIRED_DEFINITIONS};-D__need_wint_t=1)<br>
><br>
> CHECK_TYPE_SIZE(wint_t WINT_T)<br>
> message(STATUS "Size of wint_t: ${WINT_T}")<br>
> message(STATUS "HAVE_WINT_T: ${HAVE_WINT_T}")<br>
><br>
> set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE})<br>
><br>
> Although I am not sure under what circumstances you are supposed to define<br>
> __need_wint_t? Or if there is some other encompassing macro to define.<br>
> Otherwise the above will find the size in bytes of wint_t.<br>
<br>
</div>Not sure I follow what you're trying to accomplish with the above.<br>
Is this cmake 2.7 specific or some trick with the __need_wint_t (which<br>
isn't used in runetype.h)?</blockquote><div><br>Hmm, try it in CMake 2.6, there is a CheckTypeSize.cmake. Also, you shouldn't have to specify the full path to it, just<br><br>INCLUDE(CheckTypeSize.cmake)<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
For now, i'm just hacking around the issue with:<br>
<br>
check_include_file("runetype.h" HAVE_RUNETYPE_H)<br>
IF(APPLE AND HAVE_RUNETYPE_H)<br>
# OS X has wint_t, but check_type_size won't find it<br>
SET(HAVE_WINT_T 1)<br>
ELSE(APPLE AND HAVE_RUNETYPE_H)<br>
check_type_size("wint_t" HAVE_WINT_T)<br>
ENDIF(APPLE AND HAVE_RUNTYPE_H)<br>
<br>
Long term, I'm going to write my own version of check_symbol_exists<br>
which uses a different test which is define/typedef agnostic.</blockquote><div><br>Please consider submitting it via the bugtracker when you're done.<br></div></div><br>-- <br>Philip Lowman<br>