string: Add MAKE_C_IDENTIFIER subcommand

This commit is contained in:
Stephen Kelly
2013-03-21 19:34:32 +01:00
committed by Brad King
parent 272431a84f
commit 0ab50aea4c
3 changed files with 33 additions and 1 deletions

View File

@@ -280,3 +280,9 @@ endif()
if(NOT ST_NINE STREQUAL "9")
message(SEND_ERROR "SUBSTRING does not return the tail when selected with -1")
endif()
string(MAKE_C_IDENTIFIER "1one-two$" MCI_1)
if(NOT MCI_1 STREQUAL _1one_two_)
message(SEND_ERROR "MAKE_C_IDENTIFIER did not create expected result.")
endif()