mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-14 10:34:29 +01:00
8fee8ed05d
- Move all tests from the top-level directory to tests/. - Move files shared by cefclient and unittests to tests/shared/. - Add a fused (single header/source file) version of gtest in tests/gtest/ with associated CMake configuration. - Test-only headers are now exposed in include/test/. Unit test targets must define UNIT_TEST in order to access them. - Replace usage of USING_CEF_SHARED with WRAPPING_CEF_SHARED for clarity (only the libcef_dll_wrapper target should define it). - Remove the RENAME_DIRECTORY CMake macro which is no longer used. - Remove C++11 usage from unittests sources for compatibility with the binary distribution configuration. - Windows: Fix build errors due to chrome_elf.dll and imm32.lib missing from the CMake configuration.
31 lines
991 B
CMake
31 lines
991 B
CMake
# Copyright 2016 The Chromium Embedded Framework Authors. All rights
|
|
# reserved. Use of this source code is governed by a BSD-style license that
|
|
# can be found in the LICENSE file.
|
|
|
|
set(CEF_TARGET "cef_gtest")
|
|
|
|
set(GTEST_SRCS
|
|
src/gtest-all.cc
|
|
)
|
|
source_group(cef_gtest FILES ${GTEST_SRCS})
|
|
|
|
add_library(${CEF_TARGET} ${GTEST_SRCS})
|
|
|
|
# Start with CEF default properties.
|
|
SET_LIBRARY_TARGET_PROPERTIES(${CEF_TARGET})
|
|
|
|
# The gtest-all.cc file uses #include "gtest/gtest.h"
|
|
target_include_directories(${CEF_TARGET} PRIVATE "include")
|
|
|
|
# In order to allow regex matches in gtest to be shared between Windows
|
|
# and other systems we tell gtest to always use it's internal engine.
|
|
target_compile_definitions(${CEF_TARGET} PRIVATE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1)
|
|
|
|
# All dependent targets are unit tests.
|
|
target_compile_definitions(${CEF_TARGET} PUBLIC -DUNIT_TEST)
|
|
|
|
if(OS_WINDOWS)
|
|
# Disable unused variable warning.
|
|
target_compile_options(${CEF_TARGET} PRIVATE "/wd4800")
|
|
endif()
|