File: vtkTestBuiltins.cmake

package info (click to toggle)
vtk7 7.1.1%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 127,396 kB
  • sloc: cpp: 1,539,584; ansic: 124,382; python: 78,038; tcl: 47,013; xml: 8,142; yacc: 5,040; java: 4,439; perl: 3,132; lex: 1,926; sh: 1,500; makefile: 126; objc: 83
file content (25 lines) | stat: -rw-r--r-- 1,132 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# check for gcc/clang atomic builtins like __sync_add_and_fetch
IF(NOT WIN32)
  IF(NOT DEFINED VTK_HAVE_SYNC_BUILTINS)
  MESSAGE(STATUS "Checking for builtin __sync_add_and_fetch")
  TRY_COMPILE(VTK_TEST_SYNC_BUILTINS_COMPILED
    ${VTK_BINARY_DIR}/CMakeTmp/Sync
    ${VTK_CMAKE_DIR}/vtkTestSyncBuiltins.cxx
    OUTPUT_VARIABLE OUTPUT)
  IF(VTK_TEST_SYNC_BUILTINS_COMPILED)
    MESSAGE(STATUS "Checking for builtin __sync_add_and_fetch -- success")
    SET(VTK_HAVE_SYNC_BUILTINS 1 CACHE INTERNAL "For __sync atomic builtins.")
    FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
      "Determining if the C++ compiler supports __sync_add_and_fetch builtin "
      "passed with the following output:\n"
      "${OUTPUT}\n")
  ELSE()
    MESSAGE(STATUS "Checking for builtin __sync_add_and_fetch -- failed")
    SET(VTK_HAVE_SYNC_BUILTINS 0 CACHE INTERNAL "For __sync atomic builtins.")
    FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
      "Determining if the C++ compiler supports __sync_add_and_fetch builtin "
      "failed with the following output:\n"
      "${OUTPUT}\n")
  ENDIF()
  ENDIF()
ENDIF()