mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 02:19:18 -05:00
Merge topic 'geh-cleanup-identifiers'
7e24997 GenerateExportHeader: Generate only C identifiers as defines
This commit is contained in:
@@ -168,6 +168,9 @@ add_subdirectory(lib_shared_and_statictest)
|
||||
add_subdirectory(override_symbol)
|
||||
add_subdirectory(nodeprecated)
|
||||
add_subdirectory(prefix)
|
||||
if(NOT BORLAND)
|
||||
add_subdirectory(c_identifier)
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))
|
||||
# We deliberately call deprecated methods, and test for that elsewhere.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
project(c_identifier)
|
||||
|
||||
set(c_identifier_lib_SRCS
|
||||
c_identifier_class.cpp
|
||||
)
|
||||
|
||||
add_library(7c-identifier-lib++ SHARED c_identifier_class.cpp)
|
||||
|
||||
generate_export_header(7c-identifier-lib++)
|
||||
|
||||
add_executable(c_identifier_exe main.cpp)
|
||||
|
||||
target_link_libraries(c_identifier_exe 7c-identifier-lib++)
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
#include "c_identifier_class.h"
|
||||
|
||||
int CIdentifierClass::someMethod() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
#ifndef C_IDENTIFIER_CLASS_H
|
||||
#define C_IDENTIFIER_CLASS_H
|
||||
|
||||
#include "7c-identifier-lib++_export.h"
|
||||
|
||||
class _7C_IDENTIFIER_LIB___EXPORT CIdentifierClass
|
||||
{
|
||||
public:
|
||||
int someMethod() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
#include "c_identifier_class.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CIdentifierClass cic;
|
||||
return cic.someMethod();
|
||||
}
|
||||
Reference in New Issue
Block a user