mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 10:37:55 +08:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
|
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"
|