boostorg / context

305 stars 150 forks source link

CMAKE_SIZEOF_VOID_P is empty when trying to build #246

Closed faust403 closed 8 months ago

faust403 commented 12 months ago

When I'm trying to build getting this error:

CMake Error at libs/context/CMakeLists.txt:29 (math): math cannot parse the expression: "*8": syntax error, unexpected exp_TIMES (1).

So, this line is:

math(EXPR _bits "${CMAKE_SIZEOF_VOID_P}*8")

It only means that CMAKE_SIZEOF_VOID_P isn't setted. But it is when project() called - it tries all stuff including compiler and setting appropriate variables. So simple removing LANGUAGES CXX from project() call fix this issue(idk why it depends, one would be safe to assume it's more related with cmake, not with this project)

cmake version 3.27.8

olk commented 8 months ago

no code at line 29 in CMakeLists.txt