Skip to content

Commit

Permalink
guard compilation of examples with a cmake variable to make it optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob lovhall authored and mattiasflodin committed Apr 10, 2021
1 parent 7d6c54f commit 1f0d847
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ endif()
project(reckless LANGUAGES CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

################################################################################
# Options
################################################################################

option(RECKLESS_BUILD_EXAMPLES "Build the examples" OFF)

################################################################################
# Add Flags
Expand Down Expand Up @@ -52,5 +57,8 @@ add_library(reckless STATIC ${SRC_LIST})
################################################################################
# Build Examples
################################################################################
message (STATUS "Making example applications")
add_subdirectory(examples)
if (RECKLESS_BUILD_EXAMPLES)
message (STATUS "Making example applications")
add_subdirectory(examples)
endif ()

0 comments on commit 1f0d847

Please sign in to comment.