Skip to content

Commit

Permalink
Merge pull request #203 from dutkalex/cmake-build-examples-flag
Browse files Browse the repository at this point in the history
CMake build examples flag
  • Loading branch information
cburstedde authored Oct 4, 2024
2 parents 74397d3 + f8b7691 commit eda054a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ add_subdirectory(src)

if(SC_BUILD_TESTING)
include(cmake/valgrind.cmake)

if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
add_subdirectory(example)
endif()

add_subdirectory(test)
endif()

if(SC_BUILD_EXAMPLES AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
add_subdirectory(example)
endif()

# --- packaging

include(cmake/pkgconf.cmake)
Expand Down
2 changes: 1 addition & 1 deletion cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ option( SC_USE_INTERNAL_ZLIB "build ZLIB" OFF )
option( SC_USE_INTERNAL_JSON "build Jansson" OFF )

option( SC_BUILD_SHARED_LIBS "build shared libsc" OFF )
option( SC_BUILD_EXAMPLES "build libsc examples" ON )
option( SC_BUILD_TESTING "build libsc self-tests" ON )
option( SC_TEST_WITH_VALGRIND "run self-tests with valgrind" OFF )


set_property(DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED true)

# Necessary for shared library with Visual Studio / Windows oneAPI
Expand Down

0 comments on commit eda054a

Please sign in to comment.