cpp-best-practices / cmake_template

CMake for C++ Best Practices
The Unlicense
1.09k stars 118 forks source link

myproject_ENABLE_ADDRESS_SANITIZER should be myproject_ENABLE_SANITIZER_ADDRESS #61

Open db-tech opened 1 year ago

db-tech commented 1 year ago

In this piece of code:

if(myproject_BUILD_FUZZ_TESTS)
  message(AUTHOR_WARNING "Building Fuzz Tests, using fuzzing sanitizer https://www.llvm.org/docs/LibFuzzer.html")
  if (NOT myproject_ENABLE_ADDRESS_SANITIZER AND NOT myproject_ENABLE_THREAD_SANITIZER)
    message(WARNING "You need asan or tsan enabled for meaningful fuzz testing")
  endif()
  add_subdirectory(fuzz_test)

endif()

could it be that myproject_ENABLE_ADDRESS_SANITIZER should be myproject_ENABLE_SANITIZER_ADDRESS andmyproject_ENABLE_THREAD_SANITIZERshould bemyproject_ENABLE_SANITIZER_THREAD` ?

TheAlexFuller commented 6 months ago

In ProjectOptions.cmake, it is myproject_ENABLE_SANITIZER_ADDRESS.