mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
GenerateExportHeader: Generate only C identifiers as defines
The variables in this module are used to configure a header file with defines whose name depends on the name of the target. As valid names of targets may be invalid for use as defines, convert the names of the defines used to C identifiers first. This is already done in C++ code for the DEFINE_SYMBOL property. This is not as simple as ensuring that the BASE_NAME is a C identifier, because most of the define names are configurable, and because use of a BASE_NAME which is not a C identifier, such as 4square can become a C identifier by specifying a prefix in the generate_export_header macro.
This commit is contained in:
8
Tests/Module/GenerateExportHeader/c_identifier/main.cpp
Normal file
8
Tests/Module/GenerateExportHeader/c_identifier/main.cpp
Normal file
@@ -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