Skip to content

Commit 3d69d93

Browse files
authored
Add safe check of architecture to avoid cmake failure when finding cmake_utils (#53)
Signed-off-by: jparisu <javierparis@eprosima.com>
1 parent 86615e7 commit 3d69d93

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cpp_utils/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
###############################################################################
1818
cmake_minimum_required(VERSION 3.5)
1919

20+
# TODO this should not be done as it is not portable to other architectures
21+
# However, this is required as this variable is not set until project() is called.
22+
# In the future configure_project() must change to be called after project() and we must refactor
23+
# the repositories using cmake_utils so they call project() BEFORE find_package().
24+
# Thus this is work for future annapurna team.
25+
if (NOT CMAKE_SIZEOF_VOID_P)
26+
set(CMAKE_SIZEOF_VOID_P 8)
27+
endif()
28+
2029
###############################################################################
2130
# Find package cmake_utils
2231
###############################################################################

0 commit comments

Comments
 (0)