cmake: Allow to not build the fuzzer
Slight build improvement locally. Still build by the CI anyway. Did the same for the linter.
This commit is contained in:
@@ -308,7 +308,9 @@ if(${PROJECT_NAME}_DEVELOPER_MODE)
|
||||
# Under developer mode since kddw might be a sub-folder of a project setting a different value for QT_DISABLE_DEPRECATED_BEFORE
|
||||
target_compile_definitions(kddockwidgets PRIVATE QT_DISABLE_DEPRECATED_BEFORE=0x060000)
|
||||
|
||||
if (NOT ${PROJECT_NAME}_QTQUICK) # TODO: We can support it
|
||||
option(KDDockWidgets_LINTER "Build the layout linter" ON)
|
||||
|
||||
if (NOT ${PROJECT_NAME}_QTQUICK AND KDDockWidgets_LINTER) # TODO: We can support it
|
||||
add_executable(kddockwidgets_linter layoutlinter_main.cpp)
|
||||
target_link_libraries(kddockwidgets_linter kddockwidgets Qt${QT_MAJOR_VERSION}::Widgets)
|
||||
endif()
|
||||
|
||||
@@ -28,6 +28,8 @@ include_directories(../src/private)
|
||||
|
||||
set(TESTING_SRCS utils.cpp Testing.cpp)
|
||||
|
||||
option(KDDockWidgets_FUZZER "Builds the fuzzer" ON)
|
||||
|
||||
# tst_docks
|
||||
set(TESTING_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/test_resources.qrc)
|
||||
add_executable(tst_docks tst_docks.cpp ${TESTING_SRCS} ${TESTING_RESOURCES})
|
||||
@@ -38,8 +40,9 @@ if (NOT ${PROJECT_NAME}_QTQUICK)
|
||||
add_executable(tst_multisplitter tst_multisplitter.cpp)
|
||||
target_link_libraries(tst_multisplitter kddockwidgets Qt${QT_MAJOR_VERSION}::Test)
|
||||
set_compiler_flags(tst_multisplitter)
|
||||
|
||||
add_subdirectory(fuzzer)
|
||||
if (KDDockWidgets_FUZZER)
|
||||
add_subdirectory(fuzzer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tests_launcher
|
||||
|
||||
Reference in New Issue
Block a user