Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-05-03 18:54:38 +0200
committerMartin Hořeňovský2020-05-03 18:54:38 +0200
commit19ecad6f68154df2ba182c93224bdda8d7527b34 (patch)
tree6ed9ad0b61d00074efd7466ce85eed1cacf8c108 /src
parent33c58dad419ccce92882e9edbe4fc6124bc193ee (diff)
downloadcatch3-19ecad6f68154df2ba182c93224bdda8d7527b34.tar.gz
Rename CMake/pkg-config target Catch2Main to Catch2WithMain
This describes the reality better, as it also links in the rest of Catch2. The on-disk name of the static library remains just `Catch2Main`, as that is what it is -- single main function -- and on-disk artifacts cannot describe link dependencies.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0a4a21f7..4b1c81d0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -269,19 +269,22 @@ target_include_directories(Catch2
)
-add_library(Catch2Main STATIC
+add_library(Catch2WithMain STATIC
${SOURCES_DIR}/internal/catch_main.cpp
)
-add_library(Catch2::Catch2Main ALIAS Catch2Main)
-target_link_libraries(Catch2Main PUBLIC Catch2)
-
+add_library(Catch2::Catch2WithMain ALIAS Catch2WithMain)
+target_link_libraries(Catch2WithMain PUBLIC Catch2)
+set_target_properties(Catch2WithMain
+ PROPERTIES
+ OUTPUT_NAME "Catch2Main"
+)
if (NOT_SUBPROJECT)
# create and install an export set for catch target as Catch2::Catch
install(
TARGETS
Catch2
- Catch2Main
+ Catch2WithMain
EXPORT
Catch2Targets
DESTINATION
@@ -342,5 +345,5 @@ if (CATCH_BUILD_EXAMPLES OR CATCH_BUILD_EXTRA_TESTS)
)
endif()
-list(APPEND CATCH_WARNING_TARGETS Catch2 Catch2Main)
+list(APPEND CATCH_WARNING_TARGETS Catch2 Catch2WithMain)
set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE)