add_executable(asan-example asan-example.cpp)
> string(REPLACE " " ";" _asan_flags ${ASAN_FLAGS})
> target_compile_options(asan-example
> PUBLIC
> ${CXX_BASIC_FLAGS}
> $<$:${_asan_flags}>
> )
> target_link_libraries(asan-example
> PUBLIC
>
Hello,
I am trying to compile the following code snippet:
int main(int argc, char ** argv) {
int stack_array[100];
stack_array[1] = 0;
return stack_array[argc + 100]; // BOOM
}
The followin CMakeLists.txt works fine, but you can notice that
target_compile_options takes a list, while target_