This website requires JavaScript.
Explore
Help
Sign In
kolan
/
CMake
Watch
1
Star
0
Fork
You've already forked CMake
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
47dd761379
CMake
/
Tests
/
RunCMake
/
GenerateExportHeader
/
c_identifier
/
main.cpp
9 lines
100 B
C++
Raw
Normal View
History
Unescape
Escape
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.
2013-05-23 09:44:04 +04:00
#
include
"c_identifier_class.h"
Tests: Cleanup RunCMake.GenerateExportHeader somewhat
2016-09-01 22:38:46 +03:00
int
main
(
)
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.
2013-05-23 09:44:04 +04:00
{
CIdentifierClass
cic
;
return
cic
.
someMethod
(
)
;
}