mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
Autogen: Tests: Separate StaticLibraryCycle test
This commit is contained in:
@@ -59,10 +59,6 @@ if(NON_ASCII_BDIR AND WIN32)
|
||||
set(ALLOW_WRAP_CPP FALSE)
|
||||
endif()
|
||||
|
||||
# -- Test
|
||||
# Tests static library cycles
|
||||
add_subdirectory(staticLibraryCycle)
|
||||
|
||||
# -- Test
|
||||
# Complex test case
|
||||
add_subdirectory(complex)
|
||||
|
||||
@@ -29,3 +29,4 @@ if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4))
|
||||
ADD_AUTOGEN_TEST(MacOsFW)
|
||||
endif()
|
||||
ADD_AUTOGEN_TEST(SameName sameName)
|
||||
ADD_AUTOGEN_TEST(StaticLibraryCycle slc)
|
||||
|
||||
+5
-2
@@ -1,5 +1,8 @@
|
||||
# Test AUTOMOC and AUTORCC on source files with the same name
|
||||
# but in different subdirectories
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(StaticLibraryCycle)
|
||||
include("../AutogenTest.cmake")
|
||||
|
||||
# Test AUTOMOC on cyclic static libraries
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "a.h"
|
||||
#include "b.h"
|
||||
|
||||
bool A::recursed = false;
|
||||
|
||||
A::A()
|
||||
{
|
||||
if (!A::recursed) {
|
||||
A::recursed = true;
|
||||
B b;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@
|
||||
class A : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
static bool recursed;
|
||||
|
||||
public:
|
||||
A();
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "a.h"
|
||||
#include "b.h"
|
||||
|
||||
A::A()
|
||||
{
|
||||
B b;
|
||||
}
|
||||
Reference in New Issue
Block a user