mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-15 01:53:25 -04:00
dev-cpp/scnlib: new package, add 2.0.0
Signed-off-by: Steffen Winter <steffen.winter@proton.me>
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
|
||||
index ae2832b..c250eff 100644
|
||||
--- a/cmake/dependencies.cmake
|
||||
+++ b/cmake/dependencies.cmake
|
||||
@@ -4,41 +4,10 @@ set(SCN_OPTIONAL_DEPENDENCIES "")
|
||||
|
||||
if (SCN_TESTS)
|
||||
# GTest
|
||||
-
|
||||
- FetchContent_Declare(
|
||||
- googletest
|
||||
- GIT_REPOSITORY https://github.com/google/googletest.git
|
||||
- GIT_TAG main
|
||||
- GIT_SHALLOW TRUE
|
||||
- )
|
||||
-
|
||||
- # gtest CMake does some flag overriding we don't want, and it's also quite heavy
|
||||
- # Do it manually
|
||||
-
|
||||
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
-
|
||||
- FetchContent_GetProperties(googletest)
|
||||
- if (NOT googletest)
|
||||
- FetchContent_Populate(googletest)
|
||||
- endif ()
|
||||
-
|
||||
- find_package(Threads)
|
||||
-
|
||||
- add_library(scn_gtest
|
||||
- "${googletest_SOURCE_DIR}/googletest/src/gtest-all.cc"
|
||||
- "${googletest_SOURCE_DIR}/googlemock/src/gmock-all.cc"
|
||||
- )
|
||||
- target_include_directories(scn_gtest SYSTEM
|
||||
- PUBLIC
|
||||
- "${googletest_SOURCE_DIR}/googletest/include"
|
||||
- "${googletest_SOURCE_DIR}/googlemock/include"
|
||||
- PRIVATE
|
||||
- "${googletest_SOURCE_DIR}/googletest"
|
||||
- "${googletest_SOURCE_DIR}/googlemock"
|
||||
- )
|
||||
- target_link_libraries(scn_gtest PRIVATE Threads::Threads)
|
||||
- target_compile_features(scn_gtest PUBLIC cxx_std_17)
|
||||
- target_compile_options(scn_gtest PRIVATE $<$<CXX_COMPILER_ID:GNU>: -Wno-psabi>)
|
||||
+ find_package(GTest REQUIRED)
|
||||
+ add_library(scn_gtest INTERFACE)
|
||||
+ target_link_libraries(scn_gtest INTERFACE GTest::GTest)
|
||||
+ target_compile_features(scn_gtest INTERFACE cxx_std_17)
|
||||
endif ()
|
||||
|
||||
if (SCN_BENCHMARKS)
|
||||
@@ -158,8 +127,3 @@ if (SCN_REGEX_BACKEND STREQUAL "re2")
|
||||
set(SCN_REGEX_BACKEND_TARGET re2::re2)
|
||||
endif ()
|
||||
|
||||
-# make available
|
||||
-
|
||||
-FetchContent_MakeAvailable(
|
||||
- ${SCN_OPTIONAL_DEPENDENCIES}
|
||||
-)
|
||||
Reference in New Issue
Block a user