Skip to content

Commit ad0505a

Browse files
committed
Default FORCE_INIT
1 parent 995ba48 commit ad0505a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp-library.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ function(cpp_library_setup)
7575
set(ARG_REQUIRES_CPP_VERSION 17)
7676
endif()
7777

78-
# Check for global FORCE_INIT option (can be set via -DCPP_LIBRARY_FORCE_INIT=ON)
78+
# Set default for FORCE_INIT (can be overridden via -DCPP_LIBRARY_FORCE_INIT=ON)
79+
if(NOT DEFINED ARG_FORCE_INIT)
80+
set(ARG_FORCE_INIT FALSE)
81+
endif()
7982
if(CPP_LIBRARY_FORCE_INIT)
8083
set(ARG_FORCE_INIT TRUE)
8184
endif()

0 commit comments

Comments
 (0)