From addd9fd10529d6f74480ecd0697003af515b8d71 Mon Sep 17 00:00:00 2001 From: Daniel Donenfeld Date: Mon, 11 Feb 2019 14:05:25 -0800 Subject: [PATCH] Allow disabling asm generation via cmake command line. Disable Asm for clang-cl on x86 due to LLVM issue --- appveyor.yml | 3 +++ tests/CMakeLists.txt | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 887a230..e18cd7d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -107,6 +107,9 @@ before_build: if ("$env:PLATFORM" -eq "x86") { $env:CFLAGS = "-m32"; $env:CXXFLAGS = "-m32"; + + #Disable ASM generation for x86, there are errors with the llvm assembler + $env:CMakeGenFlags = $env:CMakeGenFlags' -DASM_TESTS_ENABLED=FALSE' } else { $env:CFLAGS = "-m64"; $env:CXXFLAGS = "-m64"; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0d40885..5afcd12 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -247,5 +247,7 @@ function(add_gsl_asm_test name) set_property(TARGET ${name}_asm PROPERTY FOLDER "GSL_asm_tests") endfunction() -add_gsl_asm_test(span_tests) -add_gsl_asm_test(span_compile_only) \ No newline at end of file +if(ASM_TESTS_ENABLED) + add_gsl_asm_test(span_tests) + add_gsl_asm_test(span_compile_only) +endif() \ No newline at end of file