Skip to content

Commit d67e0ab

Browse files
authored
CMake: Fix warning when building runtime libs stand-alone (#3898)
E.g., via ldc-build-runtime.
1 parent 37cbf7b commit d67e0ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

runtime/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ if(${BUILD_SHARED_LIBS} STREQUAL "AUTO")
103103
set(BUILD_SHARED_LIBS OFF)
104104
endif()
105105
endif()
106-
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} PARENT_SCOPE) # e.g., for tests/d2/CMakeLists.txt and forwarding to dmd-testsuite
106+
if(LDC_EXE)
107+
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} PARENT_SCOPE) # e.g., for tests/d2/CMakeLists.txt and forwarding to dmd-testsuite
108+
endif()
107109

108110
set(SHARED_LIB_SUFFIX "")
109111
if(NOT ${BUILD_SHARED_LIBS} STREQUAL "OFF")

0 commit comments

Comments
 (0)