Skip to content

Commit

Permalink
Comment out use of -Wthread-safety to prevent a false positive note c…
Browse files Browse the repository at this point in the history
…reated by CRAN.
  • Loading branch information
reedacartwright committed Oct 6, 2023
1 parent 2c93d7d commit a791699
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Submission

- CRAN errors identified on 2023-09-27 have been fixed.
- Resubmission
* False-positive messages about -Wthread-safety have been removed.

## Test environments

Expand Down Expand Up @@ -28,3 +30,6 @@ There were NOTEs.
- installed size is [big]
* The package contains a dependent library (Mojang's fork of leveldb) and on
some systems (linux) this library is large when compiled.

- Compilation used the following non-portable flag(s): '-Wthread-safety'
* CMake checks whether this flag is supported before using it to compile a sub-project.
12 changes: 6 additions & 6 deletions src/leveldb-mcpe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Test whether -Wthread-safety is available. See
# https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wthread-safety HAVE_CLANG_THREAD_SAFETY)
#check_cxx_compiler_flag(-Wthread-safety HAVE_CLANG_THREAD_SAFETY)

# Used by googletest.
check_cxx_compiler_flag(-Wno-missing-field-initializers
Expand Down Expand Up @@ -269,11 +269,11 @@ if(BUILD_SHARED_LIBS)
)
endif(BUILD_SHARED_LIBS)

if(HAVE_CLANG_THREAD_SAFETY)
target_compile_options(leveldb
PUBLIC
-Wthread-safety)
endif(HAVE_CLANG_THREAD_SAFETY)
# if(HAVE_CLANG_THREAD_SAFETY)
# target_compile_options(leveldb
# PUBLIC
# -Wthread-safety)
# endif(HAVE_CLANG_THREAD_SAFETY)

if(HAVE_CRC32C)
target_link_libraries(leveldb crc32c)
Expand Down

0 comments on commit a791699

Please sign in to comment.