Skip to content

Commit

Permalink
Compile examples and tests only when compiling library directly. Skip…
Browse files Browse the repository at this point in the history
… otherwise.
  • Loading branch information
przemek83 committed Dec 8, 2024
1 parent 545eb5a commit 053e986
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ else()
target_link_libraries(${PROJECT_NAME} PUBLIC qwt)
endif()

add_subdirectory(examples)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(examples)
endif()

enable_testing()
add_subdirectory(tests)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
enable_testing()
add_subdirectory(tests)
endif()

0 comments on commit 053e986

Please sign in to comment.