File: CMakeLists.txt

package info (click to toggle)
rdkit 202009.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 129,624 kB
  • sloc: cpp: 288,030; python: 75,571; java: 6,999; ansic: 5,481; sql: 1,968; yacc: 1,842; lex: 1,254; makefile: 572; javascript: 461; xml: 229; fortran: 183; sh: 134; cs: 93
file content (80 lines) | stat: -rw-r--r-- 2,656 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/versions.cpp.cmake
               ${CMAKE_CURRENT_SOURCE_DIR}/versions.cpp )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/versions.h.cmake
               ${CMAKE_CURRENT_SOURCE_DIR}/versions.h )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/RDConfig.h.cmake
              ${CMAKE_CURRENT_SOURCE_DIR}/RDConfig.h )


rdkit_library(RDGeneral
              Invariant.cpp types.cpp utils.cpp RDLog.cpp 
              LocaleSwitcher.cpp versions.cpp SHARED)
target_compile_definitions(RDGeneral PRIVATE RDKIT_RDGENERAL_BUILD)

if(MINGW)
  set(hasMSVCRuntime "FALSE")
  if(RDK_BUILD_THREADSAFE_SSS)
    set(needMSVCRuntime "TRUE")
  else()
    set(needMSVCRuntime "FALSE")
  endif()
  if(needMSVCRuntime AND MSVC_RUNTIME_DLL)
    if(EXISTS "${MSVC_RUNTIME_DLL}")
      set(hasMSVCRuntime "TRUE")
    endif()
  endif()
  if(needMSVCRuntime AND (NOT hasMSVCRuntime))
    set(systemRootPath "$ENV{SystemRoot}")
    string(REGEX REPLACE "\\\\" "/" systemRootPath "${systemRootPath}")
    message(FATAL_ERROR "Please set MSVC_RUNTIME_DLL to the full path to a msvcrXXX.dll "
      "Microsoft Visual C Runtime DLL appropriate for your system; the most likely path is "
      "${systemRootPath}/System32, or ${systemRootPath}/SysWOW64 in case you are building "
      "32-bit RDKit under a 64-bit Windows OS.")
  endif()
endif(MINGW)

if(RDK_USE_BOOST_STACKTRACE AND UNIX AND NOT APPLE)
set(EXTRA_STACKTRACE_LIBS dl)
endif()

target_link_libraries(RDGeneral PUBLIC ${RDKit_THREAD_LIBS} ${MSVC_RUNTIME_DLL} ${EXTRA_STACKTRACE_LIBS})


rdkit_headers(Exceptions.h
              BadFileException.h
              BoostStartInclude.h
              BoostEndInclude.h
              Dict.h
              FileParseException.h
              Invariant.h
              RDAny.h
              RDValue.h
              RDValue-doublemagic.h
              RDValue-taggedunion.h
              RDLog.h
              RDProps.h
              RDThreads.h
              StreamOps.h
              types.h
              utils.h
              versions.h
              RDConfig.h
              LocaleSwitcher.h
              Ranking.h
              hanoiSort.h
              export.h
              test.h
              ConcurrentQueue.h
              DEST RDGeneral)

if (NOT RDK_INSTALL_INTREE)
  install(DIRECTORY hash DESTINATION ${RDKit_HdrDir}/RDGeneral)
endif (NOT RDK_INSTALL_INTREE)

rdkit_test(testDict testDict.cpp LINK_LIBRARIES RDGeneral)
rdkit_test(testRDValue testRDValue.cpp LINK_LIBRARIES RDGeneral)

if(RDK_BUILD_THREADSAFE_SSS)
rdkit_test(testConcurrentQueue testConcurrentQueue.cpp LINK_LIBRARIES RDGeneral)
endif(RDK_BUILD_THREADSAFE_SSS)