Merge topic 'geh-failure-tests'
612d6f29
Tests: Refactor GenerateExportHeader test codece76abb4
Tests: Add data symbols to GenerateExportHeader test8f95b93b
Tests: Add failure test for GenerateExportHeader
This commit is contained in:
commit
a7305ef00a
|
@ -0,0 +1,67 @@
|
||||||
|
set(failure_test_executables
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/failure_test_targets)
|
||||||
|
file(WRITE ${failure_test_executables} "")
|
||||||
|
|
||||||
|
# Check if we should do anything. If the compiler doesn't support hidden
|
||||||
|
# visibility, the failure tests won't fail, so just write an empty targets
|
||||||
|
# list and punt.
|
||||||
|
if(NOT WIN32 AND NOT CYGWIN AND NOT COMPILER_HAS_HIDDEN_VISIBILITY)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Read the input source file
|
||||||
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/exportheader_test.cpp content_post)
|
||||||
|
set(content_pre "")
|
||||||
|
|
||||||
|
# Generate source files for failure test executables
|
||||||
|
set(counter 0)
|
||||||
|
while(1)
|
||||||
|
# Find first occurrence of link error marker in remaining content
|
||||||
|
string(REGEX MATCH "//([^;\n]+;) LINK ERROR( [(][^)]+[)])?\n(.*)"
|
||||||
|
match "${content_post}")
|
||||||
|
if(match STREQUAL "")
|
||||||
|
# No more matches
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Shift content buffers and extract failing statement
|
||||||
|
string(LENGTH "${content_post}" content_post_length)
|
||||||
|
string(LENGTH "${match}" matched_length)
|
||||||
|
math(EXPR shift_length "${content_post_length} - ${matched_length}")
|
||||||
|
|
||||||
|
string(SUBSTRING "${content_post}" 0 ${shift_length} shift)
|
||||||
|
set(content_pre "${content_pre}${shift}")
|
||||||
|
set(content_post "${CMAKE_MATCH_3}")
|
||||||
|
set(content_active "//${CMAKE_MATCH_1} LINK ERROR${CMAKE_MATCH_2}")
|
||||||
|
set(statement "${CMAKE_MATCH_1}")
|
||||||
|
|
||||||
|
# Check if potential error is conditional, and evaluate condition if so
|
||||||
|
string(REGEX REPLACE " [(]([^)]+)[)]" "\\1" condition "${CMAKE_MATCH_2}")
|
||||||
|
if(NOT condition STREQUAL "")
|
||||||
|
string(REGEX REPLACE " +" ";" condition "${condition}")
|
||||||
|
if(${condition})
|
||||||
|
else()
|
||||||
|
message(STATUS "Not testing '${statement}'; "
|
||||||
|
"condition (${condition}) is FALSE")
|
||||||
|
set(content_pre "${content_pre}// link error removed\n")
|
||||||
|
continue()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT skip)
|
||||||
|
message(STATUS "Creating failure test for '${statement}'")
|
||||||
|
math(EXPR counter "${counter} + 1")
|
||||||
|
|
||||||
|
# Write new source file
|
||||||
|
set(out ${CMAKE_CURRENT_BINARY_DIR}/exportheader_failtest-${counter}.cpp)
|
||||||
|
file(WRITE ${out} "${content_pre}${statement}\n${content_post}")
|
||||||
|
|
||||||
|
# Add executable for failure test
|
||||||
|
add_executable(GEH-fail-${counter} EXCLUDE_FROM_ALL ${out})
|
||||||
|
target_link_libraries(GEH-fail-${counter} ${link_libraries})
|
||||||
|
file(APPEND ${failure_test_executables} "GEH-fail-${counter}\n")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Add placeholder where failing statement was removed
|
||||||
|
set(content_pre "${content_pre}${content_active}\n")
|
||||||
|
endwhile()
|
|
@ -0,0 +1 @@
|
||||||
|
[^0]
|
|
@ -0,0 +1 @@
|
||||||
|
.*
|
|
@ -123,3 +123,5 @@ target_compile_definitions(GenerateExportHeader
|
||||||
"SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\""
|
"SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\""
|
||||||
"BIN_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\""
|
"BIN_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/GEH-failures.cmake)
|
||||||
|
|
|
@ -12,6 +12,16 @@ function(run_GEH)
|
||||||
run_cmake(GEH)
|
run_cmake(GEH)
|
||||||
run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug)
|
run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug)
|
||||||
run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader)
|
run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader)
|
||||||
|
|
||||||
|
file(STRINGS "${RunCMake_TEST_BINARY_DIR}/failure_test_targets"
|
||||||
|
failure_test_targets)
|
||||||
|
|
||||||
|
foreach(failure_test_target ${failure_test_targets})
|
||||||
|
run_cmake_command(GEH-link-error ${CMAKE_COMMAND}
|
||||||
|
--build .
|
||||||
|
--config Debug
|
||||||
|
--target ${failure_test_target})
|
||||||
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
run_GEH()
|
run_GEH()
|
||||||
|
|
|
@ -3,14 +3,6 @@
|
||||||
|
|
||||||
#include "libstatic.h"
|
#include "libstatic.h"
|
||||||
|
|
||||||
// #define BUILD_FAIL
|
|
||||||
|
|
||||||
#ifndef BUILD_FAIL
|
|
||||||
#define DOES_NOT_BUILD(function)
|
|
||||||
#else
|
|
||||||
#define DOES_NOT_BUILD(function) function
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -64,74 +56,114 @@ void compare(const char* refName, const char* testName)
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
Libshared l;
|
libshared::Class l;
|
||||||
l.libshared();
|
// l.method(); LINK ERROR
|
||||||
l.libshared_exported();
|
l.method_exported();
|
||||||
l.libshared_deprecated();
|
// l.method_deprecated(); LINK ERROR
|
||||||
l.libshared_not_exported();
|
l.method_deprecated_exported();
|
||||||
|
// l.method_excluded(); LINK ERROR
|
||||||
|
|
||||||
DOES_NOT_BUILD(l.libshared_excluded();)
|
// use_int(l.data); LINK ERROR
|
||||||
|
use_int(l.data_exported);
|
||||||
|
// use_int(l.data_excluded); LINK ERROR
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
LibsharedNotExported l;
|
libshared::ExportedClass l;
|
||||||
DOES_NOT_BUILD(l.libshared();)
|
l.method();
|
||||||
l.libshared_exported();
|
l.method_deprecated();
|
||||||
l.libshared_deprecated();
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
DOES_NOT_BUILD(l.libshared_not_exported();)
|
l.method_excluded();
|
||||||
DOES_NOT_BUILD(l.libshared_excluded();)
|
#else
|
||||||
|
// l.method_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
use_int(l.data);
|
||||||
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
use_int(l.data_excluded);
|
||||||
|
#else
|
||||||
|
// use_int(l.data_excluded); LINK ERROR (NOT WIN32 AND NOT CYGWIN)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
LibsharedExcluded l;
|
libshared::ExcludedClass l;
|
||||||
DOES_NOT_BUILD(l.libshared();)
|
// l.method(); LINK ERROR
|
||||||
l.libshared_exported();
|
l.method_exported();
|
||||||
l.libshared_deprecated();
|
// l.method_deprecated(); LINK ERROR
|
||||||
DOES_NOT_BUILD(l.libshared_not_exported();)
|
l.method_deprecated_exported();
|
||||||
DOES_NOT_BUILD(l.libshared_excluded();)
|
// l.method_excluded(); LINK ERROR
|
||||||
|
|
||||||
|
// use_int(l.data); LINK ERROR
|
||||||
|
use_int(l.data_exported);
|
||||||
|
// use_int(l.data_excluded); LINK ERROR
|
||||||
}
|
}
|
||||||
|
|
||||||
libshared_exported();
|
// libshared::function(); LINK ERROR
|
||||||
libshared_deprecated();
|
libshared::function_exported();
|
||||||
DOES_NOT_BUILD(libshared_not_exported();)
|
// libshared::function_deprecated(); LINK ERROR
|
||||||
DOES_NOT_BUILD(libshared_excluded();)
|
libshared::function_deprecated_exported();
|
||||||
|
// libshared::function_excluded(); LINK ERROR
|
||||||
|
|
||||||
|
// use_int(libshared::data); LINK ERROR
|
||||||
|
use_int(libshared::data_exported);
|
||||||
|
// use_int(libshared::data_excluded); LINK ERROR
|
||||||
|
|
||||||
{
|
{
|
||||||
Libstatic l;
|
libstatic::Class l;
|
||||||
l.libstatic();
|
l.method();
|
||||||
l.libstatic_exported();
|
l.method_exported();
|
||||||
l.libstatic_deprecated();
|
l.method_deprecated();
|
||||||
l.libstatic_not_exported();
|
l.method_deprecated_exported();
|
||||||
l.libstatic_excluded();
|
l.method_excluded();
|
||||||
|
|
||||||
|
use_int(l.data);
|
||||||
|
use_int(l.data_exported);
|
||||||
|
use_int(l.data_excluded);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
LibstaticNotExported l;
|
libstatic::ExportedClass l;
|
||||||
l.libstatic();
|
l.method();
|
||||||
l.libstatic_exported();
|
l.method_exported();
|
||||||
l.libstatic_deprecated();
|
l.method_deprecated();
|
||||||
l.libstatic_not_exported();
|
l.method_deprecated_exported();
|
||||||
l.libstatic_excluded();
|
l.method_excluded();
|
||||||
|
|
||||||
|
use_int(l.data);
|
||||||
|
use_int(l.data_exported);
|
||||||
|
use_int(l.data_excluded);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
LibstaticExcluded l;
|
libstatic::ExcludedClass l;
|
||||||
l.libstatic();
|
l.method();
|
||||||
l.libstatic_exported();
|
l.method_exported();
|
||||||
l.libstatic_deprecated();
|
l.method_deprecated();
|
||||||
l.libstatic_not_exported();
|
l.method_deprecated_exported();
|
||||||
l.libstatic_excluded();
|
l.method_excluded();
|
||||||
|
|
||||||
|
use_int(l.data);
|
||||||
|
use_int(l.data_exported);
|
||||||
|
use_int(l.data_excluded);
|
||||||
}
|
}
|
||||||
|
|
||||||
libstatic_exported();
|
libstatic::function();
|
||||||
libstatic_deprecated();
|
libstatic::function_exported();
|
||||||
libstatic_not_exported();
|
libstatic::function_deprecated();
|
||||||
libstatic_excluded();
|
libstatic::function_deprecated_exported();
|
||||||
|
libstatic::function_excluded();
|
||||||
|
|
||||||
|
use_int(libstatic::data);
|
||||||
|
use_int(libstatic::data_exported);
|
||||||
|
use_int(libstatic::data_excluded);
|
||||||
|
|
||||||
|
#if defined(SRC_DIR) && defined(BIN_DIR)
|
||||||
compare(SRC_DIR "/libshared_export.h",
|
compare(SRC_DIR "/libshared_export.h",
|
||||||
BIN_DIR "/libshared/libshared_export.h");
|
BIN_DIR "/libshared/libshared_export.h");
|
||||||
compare(SRC_DIR "/libstatic_export.h",
|
compare(SRC_DIR "/libstatic_export.h",
|
||||||
BIN_DIR "/libstatic/libstatic_export.h");
|
BIN_DIR "/libstatic/libstatic_export.h");
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,106 +1,121 @@
|
||||||
|
|
||||||
#include "libshared_and_static.h"
|
#include "libshared_and_static.h"
|
||||||
|
|
||||||
#ifndef MY_CUSTOM_CONTENT_ADDED
|
#ifndef MY_CUSTOM_CONTENT_ADDED
|
||||||
#error "MY_CUSTOM_CONTENT_ADDED not defined!"
|
#error "MY_CUSTOM_CONTENT_ADDED not defined!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int LibsharedAndStatic::libshared_and_static() const
|
int libshared_and_static::Class::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStatic::libshared_and_static_exported() const
|
int libshared_and_static::Class::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStatic::libshared_and_static_deprecated() const
|
int libshared_and_static::Class::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStatic::libshared_and_static_not_exported() const
|
int libshared_and_static::Class::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStatic::libshared_and_static_excluded() const
|
int libshared_and_static::Class::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticNotExported::libshared_and_static() const
|
int const libshared_and_static::Class::data = 1;
|
||||||
|
|
||||||
|
int const libshared_and_static::Class::data_exported = 1;
|
||||||
|
|
||||||
|
int const libshared_and_static::Class::data_excluded = 1;
|
||||||
|
|
||||||
|
int libshared_and_static::ExportedClass::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticNotExported::libshared_and_static_exported() const
|
int libshared_and_static::ExportedClass::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticNotExported::libshared_and_static_deprecated() const
|
int libshared_and_static::ExportedClass::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticNotExported::libshared_and_static_not_exported() const
|
int const libshared_and_static::ExportedClass::data = 1;
|
||||||
|
|
||||||
|
int const libshared_and_static::ExportedClass::data_excluded = 1;
|
||||||
|
|
||||||
|
int libshared_and_static::ExcludedClass::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticNotExported::libshared_and_static_excluded() const
|
int libshared_and_static::ExcludedClass::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticExcluded::libshared_and_static() const
|
int libshared_and_static::ExcludedClass::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticExcluded::libshared_and_static_exported() const
|
int libshared_and_static::ExcludedClass::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticExcluded::libshared_and_static_deprecated() const
|
int libshared_and_static::ExcludedClass::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticExcluded::libshared_and_static_not_exported() const
|
int const libshared_and_static::ExcludedClass::data = 1;
|
||||||
|
|
||||||
|
int const libshared_and_static::ExcludedClass::data_exported = 1;
|
||||||
|
|
||||||
|
int const libshared_and_static::ExcludedClass::data_excluded = 1;
|
||||||
|
|
||||||
|
int libshared_and_static::function()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedAndStaticExcluded::libshared_and_static_excluded() const
|
int libshared_and_static::function_exported()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_and_static()
|
int libshared_and_static::function_deprecated()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_and_static_exported()
|
int libshared_and_static::function_deprecated_exported()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_and_static_deprecated()
|
int libshared_and_static::function_excluded()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_and_static_not_exported()
|
int const libshared_and_static::data = 1;
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int libshared_and_static_excluded()
|
int const libshared_and_static::data_exported = 1;
|
||||||
|
|
||||||
|
int const libshared_and_static::data_excluded = 1;
|
||||||
|
|
||||||
|
void use_int(int)
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,66 +1,83 @@
|
||||||
|
#ifndef LIBSHARED_AND_STATIC_H
|
||||||
#ifndef SHARED_AND_STATIC_H
|
#define LIBSHARED_AND_STATIC_H
|
||||||
#define SHARED_AND_STATIC_H
|
|
||||||
|
|
||||||
#include "libshared_and_static_export.h"
|
#include "libshared_and_static_export.h"
|
||||||
|
|
||||||
class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT LibsharedAndStatic
|
namespace libshared_and_static {
|
||||||
|
|
||||||
|
class Class
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libshared_and_static() const;
|
int method() const;
|
||||||
|
|
||||||
int libshared_and_static_exported() const;
|
int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const;
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const;
|
||||||
libshared_and_static_deprecated() const;
|
|
||||||
|
|
||||||
int libshared_and_static_not_exported() const;
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT
|
||||||
|
method_deprecated_exported() const;
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
|
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const;
|
||||||
libshared_and_static_excluded() const;
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LibsharedAndStaticNotExported
|
class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT ExportedClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libshared_and_static() const;
|
int method() const;
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const;
|
||||||
libshared_and_static_exported() const;
|
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
|
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const;
|
||||||
libshared_and_static_deprecated() const;
|
|
||||||
|
|
||||||
int libshared_and_static_not_exported() const;
|
static int const data;
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
|
static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
|
||||||
libshared_and_static_excluded() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT LibsharedAndStaticExcluded
|
class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT ExcludedClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libshared_and_static() const;
|
int method() const;
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT
|
int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const;
|
||||||
libshared_and_static_exported() const;
|
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const;
|
||||||
libshared_and_static_deprecated() const;
|
|
||||||
|
|
||||||
int libshared_and_static_not_exported() const;
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT
|
||||||
|
method_deprecated_exported() const;
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
|
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const;
|
||||||
libshared_and_static_excluded() const;
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
MYPREFIX_LIBSHARED_AND_STATIC_EXPORT int libshared_and_static_exported();
|
int function();
|
||||||
|
|
||||||
MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT int
|
int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT function_exported();
|
||||||
libshared_and_static_deprecated();
|
|
||||||
|
|
||||||
int libshared_and_static_not_exported();
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED function_deprecated();
|
||||||
|
|
||||||
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded();
|
int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT
|
||||||
|
function_deprecated_exported();
|
||||||
|
|
||||||
|
int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT function_excluded();
|
||||||
|
|
||||||
|
extern int const data;
|
||||||
|
|
||||||
|
extern int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
extern int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
|
||||||
|
|
||||||
|
} // namespace libshared_and_static
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,102 +1,117 @@
|
||||||
|
|
||||||
#include "libshared.h"
|
#include "libshared.h"
|
||||||
|
|
||||||
int Libshared::libshared() const
|
int libshared::Class::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libshared::libshared_exported() const
|
int libshared::Class::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libshared::libshared_deprecated() const
|
int libshared::Class::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libshared::libshared_not_exported() const
|
int libshared::Class::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libshared::libshared_excluded() const
|
int libshared::Class::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedNotExported::libshared() const
|
int const libshared::Class::data = 1;
|
||||||
|
|
||||||
|
int const libshared::Class::data_exported = 1;
|
||||||
|
|
||||||
|
int const libshared::Class::data_excluded = 1;
|
||||||
|
|
||||||
|
int libshared::ExportedClass::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedNotExported::libshared_exported() const
|
int libshared::ExportedClass::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedNotExported::libshared_deprecated() const
|
int libshared::ExportedClass::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedNotExported::libshared_not_exported() const
|
int const libshared::ExportedClass::data = 1;
|
||||||
|
|
||||||
|
int const libshared::ExportedClass::data_excluded = 1;
|
||||||
|
|
||||||
|
int libshared::ExcludedClass::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedNotExported::libshared_excluded() const
|
int libshared::ExcludedClass::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedExcluded::libshared() const
|
int libshared::ExcludedClass::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedExcluded::libshared_exported() const
|
int libshared::ExcludedClass::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedExcluded::libshared_deprecated() const
|
int libshared::ExcludedClass::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedExcluded::libshared_not_exported() const
|
int const libshared::ExcludedClass::data = 1;
|
||||||
|
|
||||||
|
int const libshared::ExcludedClass::data_exported = 1;
|
||||||
|
|
||||||
|
int const libshared::ExcludedClass::data_excluded = 1;
|
||||||
|
|
||||||
|
int libshared::function()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibsharedExcluded::libshared_excluded() const
|
int libshared::function_exported()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared()
|
int libshared::function_deprecated()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_exported()
|
int libshared::function_deprecated_exported()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_deprecated()
|
int libshared::function_excluded()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libshared_not_exported()
|
int const libshared::data = 1;
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int libshared_excluded()
|
int const libshared::data_exported = 1;
|
||||||
|
|
||||||
|
int const libshared::data_excluded = 1;
|
||||||
|
|
||||||
|
void use_int(int)
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,57 +1,82 @@
|
||||||
|
|
||||||
#ifndef LIBSHARED_H
|
#ifndef LIBSHARED_H
|
||||||
#define LIBSHARED_H
|
#define LIBSHARED_H
|
||||||
|
|
||||||
#include "libshared_export.h"
|
#include "libshared_export.h"
|
||||||
|
|
||||||
class LIBSHARED_EXPORT Libshared
|
namespace libshared {
|
||||||
|
|
||||||
|
class Class
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libshared() const;
|
int method() const;
|
||||||
|
|
||||||
int libshared_exported() const;
|
int LIBSHARED_EXPORT method_exported() const;
|
||||||
|
|
||||||
int LIBSHARED_DEPRECATED libshared_deprecated() const;
|
int LIBSHARED_DEPRECATED method_deprecated() const;
|
||||||
|
|
||||||
int libshared_not_exported() const;
|
int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const;
|
||||||
|
|
||||||
int LIBSHARED_NO_EXPORT libshared_excluded() const;
|
int LIBSHARED_NO_EXPORT method_excluded() const;
|
||||||
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const LIBSHARED_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const LIBSHARED_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LibsharedNotExported
|
class LIBSHARED_EXPORT ExportedClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libshared() const;
|
int method() const;
|
||||||
|
|
||||||
int LIBSHARED_EXPORT libshared_exported() const;
|
int LIBSHARED_DEPRECATED method_deprecated() const;
|
||||||
|
|
||||||
int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const;
|
int LIBSHARED_NO_EXPORT method_excluded() const;
|
||||||
|
|
||||||
int libshared_not_exported() const;
|
static int const data;
|
||||||
|
|
||||||
int LIBSHARED_NO_EXPORT libshared_excluded() const;
|
static int const LIBSHARED_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LIBSHARED_NO_EXPORT LibsharedExcluded
|
class LIBSHARED_NO_EXPORT ExcludedClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libshared() const;
|
int method() const;
|
||||||
|
|
||||||
int LIBSHARED_EXPORT libshared_exported() const;
|
int LIBSHARED_EXPORT method_exported() const;
|
||||||
|
|
||||||
int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const;
|
int LIBSHARED_DEPRECATED method_deprecated() const;
|
||||||
|
|
||||||
int libshared_not_exported() const;
|
int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const;
|
||||||
|
|
||||||
int LIBSHARED_NO_EXPORT libshared_excluded() const;
|
int LIBSHARED_NO_EXPORT method_excluded() const;
|
||||||
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const LIBSHARED_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const LIBSHARED_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
LIBSHARED_EXPORT int libshared_exported();
|
int function();
|
||||||
|
|
||||||
LIBSHARED_DEPRECATED_EXPORT int libshared_deprecated();
|
int LIBSHARED_EXPORT function_exported();
|
||||||
|
|
||||||
int libshared_not_exported();
|
int LIBSHARED_DEPRECATED function_deprecated();
|
||||||
|
|
||||||
int LIBSHARED_NO_EXPORT libshared_excluded();
|
int LIBSHARED_DEPRECATED_EXPORT function_deprecated_exported();
|
||||||
|
|
||||||
|
int LIBSHARED_NO_EXPORT function_excluded();
|
||||||
|
|
||||||
|
extern int const data;
|
||||||
|
|
||||||
|
extern int const LIBSHARED_EXPORT data_exported;
|
||||||
|
|
||||||
|
extern int const LIBSHARED_NO_EXPORT data_excluded;
|
||||||
|
|
||||||
|
} // namespace libshared
|
||||||
|
|
||||||
|
LIBSHARED_EXPORT void use_int(int);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,97 +1,125 @@
|
||||||
|
|
||||||
#include "libstatic.h"
|
#include "libstatic.h"
|
||||||
|
|
||||||
int Libstatic::libstatic() const
|
int libstatic::Class::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libstatic::libstatic_exported() const
|
int libstatic::Class::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libstatic::libstatic_deprecated() const
|
int libstatic::Class::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libstatic::libstatic_not_exported() const
|
int libstatic::Class::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Libstatic::libstatic_excluded() const
|
int libstatic::Class::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticNotExported::libstatic() const
|
int const libstatic::Class::data = 1;
|
||||||
|
|
||||||
|
int const libstatic::Class::data_exported = 1;
|
||||||
|
|
||||||
|
int const libstatic::Class::data_excluded = 1;
|
||||||
|
|
||||||
|
int libstatic::ExportedClass::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticNotExported::libstatic_exported() const
|
int libstatic::ExportedClass::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticNotExported::libstatic_deprecated() const
|
int libstatic::ExportedClass::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticNotExported::libstatic_not_exported() const
|
int libstatic::ExportedClass::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticNotExported::libstatic_excluded() const
|
int libstatic::ExportedClass::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticExcluded::libstatic() const
|
int const libstatic::ExportedClass::data = 1;
|
||||||
|
|
||||||
|
int const libstatic::ExportedClass::data_exported = 1;
|
||||||
|
|
||||||
|
int const libstatic::ExportedClass::data_excluded = 1;
|
||||||
|
|
||||||
|
int libstatic::ExcludedClass::method() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticExcluded::libstatic_exported() const
|
int libstatic::ExcludedClass::method_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticExcluded::libstatic_deprecated() const
|
int libstatic::ExcludedClass::method_deprecated() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticExcluded::libstatic_not_exported() const
|
int libstatic::ExcludedClass::method_deprecated_exported() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibstaticExcluded::libstatic_excluded() const
|
int libstatic::ExcludedClass::method_excluded() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libstatic_exported()
|
int const libstatic::ExcludedClass::data = 1;
|
||||||
|
|
||||||
|
int const libstatic::ExcludedClass::data_exported = 1;
|
||||||
|
|
||||||
|
int const libstatic::ExcludedClass::data_excluded = 1;
|
||||||
|
|
||||||
|
int libstatic::function()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libstatic_deprecated()
|
int libstatic::function_exported()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libstatic_not_exported()
|
int libstatic::function_deprecated()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libstatic_excluded()
|
int libstatic::function_deprecated_exported()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int libstatic::function_excluded()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int const libstatic::data = 1;
|
||||||
|
|
||||||
|
int const libstatic::data_exported = 1;
|
||||||
|
|
||||||
|
int const libstatic::data_excluded = 1;
|
||||||
|
|
|
@ -1,57 +1,86 @@
|
||||||
|
|
||||||
#ifndef LIBSTATIC_H
|
#ifndef LIBSTATIC_H
|
||||||
#define LIBSTATIC_H
|
#define LIBSTATIC_H
|
||||||
|
|
||||||
#include "libstatic_export.h"
|
#include "libstatic_export.h"
|
||||||
|
|
||||||
class LIBSTATIC_EXPORT Libstatic
|
namespace libstatic {
|
||||||
|
|
||||||
|
class Class
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libstatic() const;
|
int method() const;
|
||||||
|
|
||||||
int libstatic_exported() const;
|
int LIBSTATIC_EXPORT method_exported() const;
|
||||||
|
|
||||||
int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
|
int LIBSTATIC_DEPRECATED method_deprecated() const;
|
||||||
|
|
||||||
int libstatic_not_exported() const;
|
int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const;
|
||||||
|
|
||||||
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
|
int LIBSTATIC_NO_EXPORT method_excluded() const;
|
||||||
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const LIBSTATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const LIBSTATIC_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LibstaticNotExported
|
class LIBSTATIC_EXPORT ExportedClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libstatic() const;
|
int method() const;
|
||||||
|
|
||||||
int LIBSTATIC_EXPORT libstatic_exported() const;
|
int LIBSTATIC_EXPORT method_exported() const;
|
||||||
|
|
||||||
int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
|
int LIBSTATIC_DEPRECATED method_deprecated() const;
|
||||||
|
|
||||||
int libstatic_not_exported() const;
|
int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const;
|
||||||
|
|
||||||
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
|
int LIBSTATIC_NO_EXPORT method_excluded() const;
|
||||||
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const LIBSTATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const LIBSTATIC_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LIBSTATIC_NO_EXPORT LibstaticExcluded
|
class LIBSTATIC_NO_EXPORT ExcludedClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int libstatic() const;
|
int method() const;
|
||||||
|
|
||||||
int LIBSTATIC_EXPORT libstatic_exported() const;
|
int LIBSTATIC_EXPORT method_exported() const;
|
||||||
|
|
||||||
int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
|
int LIBSTATIC_DEPRECATED method_deprecated() const;
|
||||||
|
|
||||||
int libstatic_not_exported() const;
|
int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const;
|
||||||
|
|
||||||
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
|
int LIBSTATIC_NO_EXPORT method_excluded() const;
|
||||||
|
|
||||||
|
static int const data;
|
||||||
|
|
||||||
|
static int const LIBSTATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
static int const LIBSTATIC_NO_EXPORT data_excluded;
|
||||||
};
|
};
|
||||||
|
|
||||||
LIBSTATIC_EXPORT int libstatic_exported();
|
int function();
|
||||||
|
|
||||||
LIBSTATIC_DEPRECATED_EXPORT int libstatic_deprecated();
|
int LIBSTATIC_EXPORT function_exported();
|
||||||
|
|
||||||
int libstatic_not_exported();
|
int LIBSTATIC_DEPRECATED function_deprecated();
|
||||||
|
|
||||||
int LIBSTATIC_NO_EXPORT libstatic_excluded();
|
int LIBSTATIC_DEPRECATED_EXPORT function_deprecated_exported();
|
||||||
|
|
||||||
|
int LIBSTATIC_NO_EXPORT function_excluded();
|
||||||
|
|
||||||
|
extern int const data;
|
||||||
|
|
||||||
|
extern int const LIBSTATIC_EXPORT data_exported;
|
||||||
|
|
||||||
|
extern int const LIBSTATIC_NO_EXPORT data_excluded;
|
||||||
|
|
||||||
|
} // namespace libstatic
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue