|
|
@ -58,29 +58,34 @@ list(APPEND ABSL_COMMON_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}) |
|
|
|
set(CMAKE_CXX_FLAGS "${ABSL_STD_CXX_FLAG} ${CMAKE_CXX_FLAGS}") |
|
|
|
set(CMAKE_CXX_FLAGS "${ABSL_STD_CXX_FLAG} ${CMAKE_CXX_FLAGS}") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_WARNING_VLA} ${CMAKE_CXX_FLAGS} ") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_WARNING_VLA} ${CMAKE_CXX_FLAGS} ") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# -fexceptions |
|
|
|
|
|
|
|
set(ABSL_EXCEPTIONS_FLAG "${CMAKE_CXX_EXCEPTIONS}") |
|
|
|
|
|
|
|
|
|
|
|
# find dependencies |
|
|
|
# find dependencies |
|
|
|
## pthread |
|
|
|
## pthread |
|
|
|
find_package(Threads REQUIRED) |
|
|
|
find_package(Threads REQUIRED) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(NOT ABSL_CCTZ_TARGET) |
|
|
|
|
|
|
|
set(ABSL_CCTZ_TARGET cctz) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
# commented: used only for standalone test |
|
|
|
# commented: used only for standalone test |
|
|
|
#add_subdirectory(cctz) |
|
|
|
#add_subdirectory(cctz) |
|
|
|
#add_subdirectory(googletest) |
|
|
|
#add_subdirectory(googletest) |
|
|
|
|
|
|
|
check_target(${ABSL_CCTZ_TARGET}) |
|
|
|
|
|
|
|
|
|
|
|
## check targets |
|
|
|
## check targets |
|
|
|
check_target(cctz) |
|
|
|
if(BUILD_TESTING) |
|
|
|
check_target(gtest) |
|
|
|
check_target(gtest) |
|
|
|
check_target(gtest_main) |
|
|
|
check_target(gtest_main) |
|
|
|
check_target(gmock) |
|
|
|
check_target(gmock) |
|
|
|
|
|
|
|
|
|
|
|
# -fexceptions |
|
|
|
list(APPEND ABSL_TEST_COMMON_LIBRARIES |
|
|
|
set(ABSL_EXCEPTIONS_FLAG "${CMAKE_CXX_EXCEPTIONS}") |
|
|
|
gtest_main |
|
|
|
|
|
|
|
gtest |
|
|
|
list(APPEND ABSL_TEST_COMMON_LIBRARIES |
|
|
|
gmock |
|
|
|
gtest_main |
|
|
|
${CMAKE_THREAD_LIBS_INIT} |
|
|
|
gtest |
|
|
|
) |
|
|
|
gmock |
|
|
|
endif() |
|
|
|
${CMAKE_THREAD_LIBS_INIT} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_subdirectory(absl) |
|
|
|
add_subdirectory(absl) |
|
|
|