Add Mapfile for CMake on Solaris (Issue 380)

pull/474/head
Jeffrey Walton 2017-08-27 05:47:38 -04:00
parent 67a24ec75a
commit 2d5ed51ca9
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
4 changed files with 7 additions and 5 deletions

View File

@ -649,6 +649,10 @@ if (BUILD_TESTING)
add_custom_target(cryptest.exe) add_custom_target(cryptest.exe)
add_dependencies(cryptest.exe cryptest) add_dependencies(cryptest.exe cryptest)
endif () endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
set_target_properties(cryptest PROPERTIES LINK_FLAGS "-M cryptest.mapfile")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cryptest.mapfile DESTINATION ${PROJECT_BINARY_DIR})
endif ()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/TestData DESTINATION ${PROJECT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/TestData DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors DESTINATION ${PROJECT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors DESTINATION ${PROJECT_BINARY_DIR})

View File

@ -65,6 +65,7 @@ cryptest.sln
cryptest.vcxproj cryptest.vcxproj
cryptest.vcxproj.user cryptest.vcxproj.user
cryptest.vcxproj.filters cryptest.vcxproj.filters
cryptest.mapfile
cryptest.nmake cryptest.nmake
cryptlib.cpp cryptlib.cpp
cryptlib.h cryptlib.h

View File

@ -347,11 +347,7 @@ endif # IS_X86
ifeq ($(IS_SUN)$(SUN_COMPILER),11) ifeq ($(IS_SUN)$(SUN_COMPILER),11)
ifneq ($(IS_X86)$(IS_X32)$(IS_X64),000) ifneq ($(IS_X86)$(IS_X32)$(IS_X64),000)
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),) ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
ifeq ($(wildcard cryptopp.mapfile),) LDFLAGS += -M cryptest.mapfile
$(shell echo "hwcap_1 = SSE SSE2 OVERRIDE;" > cryptopp.mapfile)
$(shell echo "" >> cryptopp.mapfile)
endif # Write mapfile
LDFLAGS += -M cryptopp.mapfile
endif # No CRYPTOPP_DISABLE_ASM endif # No CRYPTOPP_DISABLE_ASM
endif # X86/X32/X64 endif # X86/X32/X64
endif # SunOS endif # SunOS

1
cryptest.mapfile Normal file
View File

@ -0,0 +1 @@
hwcap_1 = SSE SSE2 OVERRIDE;