diff options
author | Aditya Mandaleeka <adityam@microsoft.com> | 2016-06-28 15:25:11 -0700 |
---|---|---|
committer | Aditya Mandaleeka <adityam@microsoft.com> | 2016-06-28 15:33:14 -0700 |
commit | ff5bebf77744910b7db1c3f590b178c95314acf3 (patch) | |
tree | 7de52a4281ea0df5abca39118f41658e229155e0 /functions.cmake | |
parent | 1f07b477c2bcc9136eee1aa5112fd8e5e5ccc341 (diff) | |
download | coreclr-ff5bebf77744910b7db1c3f590b178c95314acf3.tar.gz coreclr-ff5bebf77744910b7db1c3f590b178c95314acf3.tar.bz2 coreclr-ff5bebf77744910b7db1c3f590b178c95314acf3.zip |
Fix platform logic in symbol stripping code.
Diffstat (limited to 'functions.cmake')
-rw-r--r-- | functions.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/functions.cmake b/functions.cmake index 9b77ad4308..a61687e7a6 100644 --- a/functions.cmake +++ b/functions.cmake @@ -93,19 +93,19 @@ function(add_precompiled_header header cppFile targetSources) endfunction() function(strip_symbols targetName outputFilename) - if(CLR_CMAKE_PLATFORM_UNIX) - if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE) + if (CLR_CMAKE_PLATFORM_UNIX) + if (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE) # On the older version of cmake (2.8.12) used on Ubuntu 14.04 the TARGET_FILE # generator expression doesn't work correctly returning the wrong path and on # the newer cmake versions the LOCATION property isn't supported anymore. - if(CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0) + if (CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0) set(strip_source_file $<TARGET_FILE:${targetName}>) else() get_property(strip_source_file TARGET ${targetName} PROPERTY LOCATION) endif() - if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + if (CMAKE_SYSTEM_NAME STREQUAL Darwin) set(strip_destination_file ${strip_source_file}.dwarf) add_custom_command( @@ -116,7 +116,7 @@ function(strip_symbols targetName outputFilename) COMMAND ${STRIP} -S ${strip_source_file} COMMENT Stripping symbols from ${strip_source_file} into file ${strip_destination_file} ) - elseif(CMAKE_SYSTEM_NAME STREQUAL Linux) + else (CMAKE_SYSTEM_NAME STREQUAL Darwin) set(strip_destination_file ${strip_source_file}.dbg) add_custom_command( @@ -128,7 +128,7 @@ function(strip_symbols targetName outputFilename) COMMAND ${OBJCOPY} --add-gnu-debuglink=${strip_destination_file} ${strip_source_file} COMMENT Stripping symbols from ${strip_source_file} into file ${strip_destination_file} ) - endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) + endif (CMAKE_SYSTEM_NAME STREQUAL Darwin) set(${outputFilename} ${strip_destination_file} PARENT_SCOPE) endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE) |