Skip to content

Commit 34e5b98

Browse files
committed
Problem: Draft build not enabled for git cloned cppzmq.
When cppzmq is build out of source e.g. ${CMAKE_SOURCE_DIR}/build: mkdir build cd build cmake .. then .git is not found properly, DRAFT build not enabled and poller test not added to pool of tests.
1 parent 5ebc7fe commit 34e5b98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static))
1919
message(FATAL_ERROR "ZeroMQ version not supported!")
2020
endif()
2121

22-
if (EXISTS "${SOURCE_DIR}/.git")
22+
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
2323
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)
2424
else ()
2525
OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" OFF)
2626
endif ()
27-
IF (ENABLE_DRAFTS)
27+
if (ENABLE_DRAFTS)
2828
ADD_DEFINITIONS (-DZMQ_BUILD_DRAFT_API)
2929
set (pkg_config_defines "-DZMQ_BUILD_DRAFT_API=1")
30-
ELSE (ENABLE_DRAFTS)
30+
else (ENABLE_DRAFTS)
3131
set (pkg_config_defines "")
32-
ENDIF (ENABLE_DRAFTS)
32+
endif (ENABLE_DRAFTS)
3333

3434
message(STATUS "cppzmq v${CPPZMQ_VERSION}")
3535

0 commit comments

Comments
 (0)