Skip to content

Commit

Permalink
cmake: export <atomic> availability (fixes #667)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Jun 15, 2021
1 parent c1499f6 commit a4ffd96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ if (HAVE_EXECINFO_H)
set (HAVE_STACKTRACE 1)
endif (HAVE_EXECINFO_H)

if (HAVE_CXX11_ATOMIC)
set (ac_cv_cxx11_atomic 1)
endif (HAVE_CXX11_ATOMIC)

if (WITH_SYMBOLIZE)
if (WIN32 OR CYGWIN)
cmake_push_check_state (RESET)
Expand Down Expand Up @@ -466,7 +470,7 @@ else (WITH_THREADS AND Threads_FOUND)
set (NO_THREADS 1)
endif (WITH_THREADS AND Threads_FOUND)

# fopen/open on Cygwin can not handle unix-type paths like /home/....
# fopen/open on Cygwin can not handle unix-type paths like /home/....
# therefore we translate TEST_SRC_DIR to windows-path.
if (CYGWIN)
execute_process (COMMAND cygpath.exe -m ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/glog/logging.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
#include <gflags/gflags.h>
#endif

#ifdef HAVE_CXX11_ATOMIC
#if @ac_cv_have_cxx11_atomic@
#include <atomic>
#elif defined(OS_WINDOWS)
#include <Windows.h>
Expand Down

0 comments on commit a4ffd96

Please sign in to comment.