aboutsummaryrefslogtreecommitdiff
path: root/ports/polymorphic-value/001_no_catch_submodule.patch
blob: 8fec58a76a080cdb60a5c247ed8c24ac7a130f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git C:/Users/Charles Barto/Source/vcpkg/buildtrees/polymorphic-value/src/1.3.0-33dc249788/CMakeLists.txt C:/Users/Charles Barto/patched_list.txt
index 2819bf6a4..0ee5fba76 100644
--- a/CMakeLists.txt	
+++ b/CMakeLists.txt	
@@ -9,9 +9,9 @@ set(POLYMOPHIC_VALUE_VERSION "1.3.0") # Revision 3, see paper p0201r3
 project(polymorphic_value VERSION ${POLYMOPHIC_VALUE_VERSION})
 
 option(ENABLE_SANITIZERS "Enable Address Sanitizer and Undefined Behaviour Sanitizer if available" OFF)
-
+if(BUILD_TESTING)
 add_subdirectory(externals/catch)
-
+endif()
 add_library(polymorphic_value INTERFACE)
 target_include_directories(polymorphic_value
     INTERFACE
@@ -45,6 +45,7 @@ target_compile_features(polymorphic_value
 add_library(polymorphic_value::polymorphic_value ALIAS polymorphic_value)
 
 if(POLYMORPHIC_IS_NOT_SUBPROJECT)
+    if(BUILD_TESTING)
     add_executable(test_polymorphic_value test_polymorphic_value.cpp)
     target_link_libraries(test_polymorphic_value
         PRIVATE
@@ -107,7 +108,7 @@ if(POLYMORPHIC_IS_NOT_SUBPROJECT)
     list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/externals/catch/contrib)
     include(Catch)
     catch_discover_tests(test_polymorphic_value)
-
+    endif()
     install(
         FILES
             "${CMAKE_CURRENT_SOURCE_DIR}/polymorphic_value.h"