Skip to content

Commit ff994d9

Browse files
committed
Improved comment on workaround
1 parent 615380b commit ff994d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ export(EXPORT ${PROJECT_NAME}-targets
7373
configure_package_config_file(${PROJECT_NAME}Config.cmake.in
7474
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
7575
INSTALL_DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR})
76-
# workaround until ARCH_INDEPENDENT flag can be used with cmake 3.14
76+
# Workaround until ARCH_INDEPENDENT flag can be used with cmake 3.14.
77+
# The ConigVersion.cmake file contains checks for the architecture is was
78+
# generated on, which can cause problems for header only libraries
79+
# used with e.g. the Conan package manager. Since it is header only we
80+
# can/should omit those checks.
7781
set(CPPZMQ_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
78-
unset(CMAKE_SIZEOF_VOID_P)
82+
set(CMAKE_SIZEOF_VOID_P "") # a simple unset is not sufficient
7983
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
8084
VERSION ${CPPZMQ_VERSION}
8185
COMPATIBILITY AnyNewerVersion)

0 commit comments

Comments
 (0)