Fix code to handle simulating MSVC case

This commit is contained in:
Daniel Donenfeld 2019-02-07 11:32:39 -08:00
parent 4bb6a2e73e
commit c879ff980c

View File

@ -221,16 +221,17 @@ function(add_gsl_asm_test name)
add_library(${name}_asm ${name}.cpp) add_library(${name}_asm ${name}.cpp)
add_library(${name}_asm_options INTERFACE) add_library(${name}_asm_options INTERFACE)
if(MSVC) # MSVC or simulating MSVC
target_compile_options(${name}_asm_options INTERFACE target_compile_options(${name}_asm_options INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:
/FA /FA
/Fa${ASM_LOCATION}\\${name}.asm /Fa${ASM_LOCATION}\\${name}.asm
> )
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>: else()
target_compile_options(${name}_asm_options INTERFACE
-S -S
-o ${ASM_LOCATION}\\${name}.s -o ${ASM_LOCATION}\\${name}.s
>
) )
endif(MSVC)
target_link_libraries(${name}_asm target_link_libraries(${name}_asm
GSL GSL