Skip to content

Commit

Permalink
cmake: replace '-' in machine name with '_'
Browse files Browse the repository at this point in the history
We only support '_' in the machine name. If the machine
name contains '-', replace it with '_'.

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
  • Loading branch information
Ben Levinsky authored and wjliang committed May 3, 2018
1 parent 6e4d306 commit 606c314
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ if (NOT DEFINED MACHINE)
endif (NOT DEFINED MACHINE)
message ("-- Machine: ${MACHINE}")

# handle if '-' in machine name
string (REPLACE "-" "_" MACHINE ${MACHINE})

if (NOT DEFINED PROJECT_SYSTEM)
string (TOLOWER ${CMAKE_SYSTEM_NAME} PROJECT_SYSTEM)
string (TOUPPER ${CMAKE_SYSTEM_NAME} PROJECT_SYSTEM_UPPER)
Expand Down

0 comments on commit 606c314

Please sign in to comment.