Skip to content

CMake error with many project languages #19

@apmanol

Description

@apmanol

Hello all,

in case you set

+++ b/CMakeLists.txt
@@ -33,7 +33,7 @@
 cmake_minimum_required(VERSION 2.8)
 
 # project name
-project("CMake-sanitizers")
+project("CMake-sanitizers" C CXX ASM)

then

mkdir build && cd build && cmake .. 
cmake -DSANITIZE_ADDRESS:BOOL=ON ..
-- Try GNU AddressSanitizer flag = [-g -fsanitize=address -fno-omit-frame-pointer]
-- Try GNU AddressSanitizer flag = [-g -fsanitize=address]
-- Try GNU AddressSanitizer flag = [-g -faddress-sanitizer]
CMake Warning at cmake/sanitize-helpers.cmake:143 (message):
  AddressSanitizer is not available for GNU compiler.  Targets using this
  compiler will be compiled without AddressSanitizer.
Call Stack (most recent call first):
  cmake/FindASan.cmake:46 (sanitizer_check_compiler_flags)
  cmake/FindSanitizers.cmake:37 (find_package)
  CMakeLists.txt:50 (find_package)

Although without the ASM works as it should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions