fixing cmake - builds should pass now - all cmake projects can be used by themselves and all depend on the assemble_single_header target (as they should - previous commit had changed that)
diff --git a/examples/all_features/CMakeLists.txt b/examples/all_features/CMakeLists.txt
index f8df5a0..069c7f2 100644
--- a/examples/all_features/CMakeLists.txt
+++ b/examples/all_features/CMakeLists.txt
@@ -1,9 +1,15 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(all_features)
+
+include(../../scripts/cmake/common.cmake)
+
+include_directories(../../doctest/)
+
################################################################################
## BUILD ALL EXAMPLE SOURCES INTO A SINGLE BINARY AND EXECUTE TESTS ON EACH FILE
################################################################################
-project(all_features)
-
set(files
main.cpp
doctest_proxy.h
diff --git a/examples/exe_with_static_libs/CMakeLists.txt b/examples/exe_with_static_libs/CMakeLists.txt
index 8441a7f..eda10ef 100644
--- a/examples/exe_with_static_libs/CMakeLists.txt
+++ b/examples/exe_with_static_libs/CMakeLists.txt
@@ -2,17 +2,19 @@
project(exe_with_static_libs)
+include(../../scripts/cmake/common.cmake)
+
include_directories(../../doctest/)
#== create object libraries instead of static libraries
-add_library(lib_1 OBJECT lib_1_src1.cpp lib_1_src2.cpp)
-add_library(lib_2 OBJECT lib_2_src.cpp)
-add_executable(${PROJECT_NAME} main.cpp $<TARGET_OBJECTS:lib_1> $<TARGET_OBJECTS:lib_2>)
+doctest_add_library(lib_1 OBJECT lib_1_src1.cpp lib_1_src2.cpp)
+doctest_add_library(lib_2 OBJECT lib_2_src.cpp)
+doctest_add_executable(${PROJECT_NAME} main.cpp $<TARGET_OBJECTS:lib_1> $<TARGET_OBJECTS:lib_2>)
#== alternatively we could create static libraries and use "doctest_force_link_static_lib_in_target"
-#add_library(lib_1 STATIC lib_1_src1.cpp lib_1_src2.cpp)
-#add_library(lib_2 STATIC lib_2_src.cpp)
-#add_executable(${PROJECT_NAME} main.cpp)
+#doctest_add_library(lib_1 STATIC lib_1_src1.cpp lib_1_src2.cpp)
+#doctest_add_library(lib_2 STATIC lib_2_src.cpp)
+#doctest_add_executable(${PROJECT_NAME} main.cpp)
#target_link_libraries(${PROJECT_NAME} lib_1)
#target_link_libraries(${PROJECT_NAME} lib_2)
#include(doctest_force_link_static_lib_in_target.cmake)
diff --git a/examples/executable_dll_and_plugin/CMakeLists.txt b/examples/executable_dll_and_plugin/CMakeLists.txt
index 7c56123..aa0c5db 100644
--- a/examples/executable_dll_and_plugin/CMakeLists.txt
+++ b/examples/executable_dll_and_plugin/CMakeLists.txt
@@ -2,6 +2,8 @@
project(executable_dll_and_plugin)
+include(../../scripts/cmake/common.cmake)
+
include_directories(../../doctest/)
if(APPLE)
@@ -12,15 +14,15 @@
endif()
endif()
-add_library(implementation SHARED implementation.cpp implementation_2.cpp)
+doctest_add_library(implementation SHARED implementation.cpp implementation_2.cpp)
-add_library(dll SHARED dll.cpp)
+doctest_add_library(dll SHARED dll.cpp)
target_link_libraries(dll implementation)
-add_library(plugin SHARED plugin.cpp)
+doctest_add_library(plugin SHARED plugin.cpp)
target_link_libraries(plugin implementation)
-add_executable(${PROJECT_NAME} main.cpp)
+doctest_add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} dll)
target_link_libraries(${PROJECT_NAME} implementation)