mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-29 23:35:26 +08:00
fixed: crypto++ compile errors, linux compiler syntax bugs, and code style (spaces -> tabs)
This commit is contained in:
@@ -7,45 +7,47 @@
|
||||
#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(cpp_dir cryptopp562)
|
||||
|
||||
file(GLOB cpp_src ${cpp_dir}/*.cpp)
|
||||
|
||||
if (WIN32)
|
||||
file(GLOB cpp_hdr ${cpp_dir}/*.h)
|
||||
file(GLOB cpp_hdr ${cpp_dir}/*.h)
|
||||
list(APPEND cpp_src ${cpp_hdr})
|
||||
endif()
|
||||
|
||||
file(GLOB cpp_ignore
|
||||
${cpp_dir}/simple.cpp
|
||||
${cpp_dir}/strciphr.cpp
|
||||
${cpp_dir}/polynomi.cpp
|
||||
${cpp_dir}/eprecomp.cpp
|
||||
${cpp_dir}/eccrypto.cpp
|
||||
${cpp_dir}/algebra.cpp)
|
||||
${cpp_dir}/simple.cpp
|
||||
${cpp_dir}/strciphr.cpp
|
||||
${cpp_dir}/polynomi.cpp
|
||||
${cpp_dir}/eprecomp.cpp
|
||||
${cpp_dir}/eccrypto.cpp
|
||||
${cpp_dir}/algebra.cpp)
|
||||
list(REMOVE_ITEM cpp_src ${cpp_ignore})
|
||||
|
||||
# 64-bit windows - compile asm file.
|
||||
if(CMAKE_CL_64)
|
||||
list(APPEND cpp_src ${cpp_dir}/x64dll.asm ${cpp_dir}/x64masm.asm)
|
||||
|
||||
add_custom_command(OUTPUT $(IntDir)x64dll.obj
|
||||
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${cpp_dir}/x64dll.asm"
|
||||
MAIN_DEPENDENCY ${cpp_dir}/x64dll.asm
|
||||
VERBATIM)
|
||||
|
||||
add_custom_command(OUTPUT $(IntDir)x64masm.obj
|
||||
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${cpp_dir}/x64masm.asm"
|
||||
MAIN_DEPENDENCY ${cpp_dir}/x64masm.asm
|
||||
VERBATIM)
|
||||
# if 64-bit windows, compile asm file.
|
||||
if (CMAKE_CL_64)
|
||||
list(APPEND cpp_src ${cpp_dir}/x64dll.asm ${cpp_dir}/x64masm.asm)
|
||||
|
||||
add_custom_command(OUTPUT $(IntDir)x64dll.obj
|
||||
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${cpp_dir}/x64dll.asm"
|
||||
MAIN_DEPENDENCY ${cpp_dir}/x64dll.asm
|
||||
VERBATIM)
|
||||
|
||||
add_custom_command(OUTPUT $(IntDir)x64masm.obj
|
||||
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${cpp_dir}/x64masm.asm"
|
||||
MAIN_DEPENDENCY ${cpp_dir}/x64masm.asm
|
||||
VERBATIM)
|
||||
else()
|
||||
add_definitions(-DCRYPTOPP_DISABLE_ASM)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
|
||||
Reference in New Issue
Block a user