Don't override defines when configuring optional behavior
This commit is contained in:
parent
6b35829ad6
commit
8dde95fc82
|
@ -93,11 +93,11 @@ if(SYNCTHING_CONNECTION_MOCKED)
|
|||
syncthingconnectionmockhelpers.h
|
||||
syncthingconnectionmockhelpers.cpp
|
||||
)
|
||||
set_source_files_properties(
|
||||
syncthingconnection.cpp
|
||||
syncthingconnectionmockhelpers.h
|
||||
syncthingconnectionmockhelpers.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_CONNECTION_MOCKED
|
||||
set_property(
|
||||
SOURCE syncthingconnection.cpp
|
||||
syncthingconnectionmockhelpers.h
|
||||
syncthingconnectionmockhelpers.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_CONNECTION_MOCKED
|
||||
)
|
||||
message(WARNING "SyncthingConnection class will be mocked")
|
||||
endif()
|
||||
|
@ -105,9 +105,9 @@ endif()
|
|||
# configure whether the service should be mocked for test purposes
|
||||
option(SYNCTHING_SERVICE_MOCKED "enables mocking the SyncthingService class so it will provide some fake status" OFF)
|
||||
if(SYNCTHING_SERVICE_MOCKED)
|
||||
set_source_files_properties(
|
||||
syncthingservice.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_SERVICE_MOCKED
|
||||
set_property(
|
||||
SORUCE syncthingservice.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_SERVICE_MOCKED
|
||||
)
|
||||
message(WARNING "SyncthingService class will be mocked")
|
||||
endif()
|
||||
|
@ -115,9 +115,9 @@ endif()
|
|||
# configure whether events should be logged
|
||||
option(SYNCTHING_CONNECTION_LOG_SYNCTHING_EVENTS "enables logging event data to stdout (enable only for debugging!)" OFF)
|
||||
if(SYNCTHING_CONNECTION_LOG_SYNCTHING_EVENTS)
|
||||
set_source_files_properties(
|
||||
syncthingconnection.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_SYNCTHING_EVENTS
|
||||
set_property(
|
||||
SOURCE syncthingconnection.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_SYNCTHING_EVENTS
|
||||
)
|
||||
message(WARNING "SyncthingConnection class will log event data to stdout")
|
||||
endif()
|
||||
|
@ -125,11 +125,11 @@ endif()
|
|||
# configure whether POSTs should be logged
|
||||
option(SYNCTHING_CONNECTION_LOG_API_CALLS "enables logging API calls done by the SyncthingConnector (enable only for debugging!)" OFF)
|
||||
if(SYNCTHING_CONNECTION_LOG_API_CALLS)
|
||||
set_source_files_properties(
|
||||
syncthingconnection.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_API_CALLS
|
||||
set_property(
|
||||
SOURCE syncthingconnection.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_API_CALLS
|
||||
)
|
||||
message(WARNING "SyncthingConnection class will log event data to stdout")
|
||||
message(WARNING "SyncthingConnection class will log API calls data to stdout")
|
||||
endif()
|
||||
|
||||
# include modules to apply configuration
|
||||
|
|
Loading…
Reference in New Issue