Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.0 FATAL_ERROR) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 2 | |
Ed Tanous | cfbe25d | 2017-05-23 16:34:35 -0700 | [diff] [blame] | 3 | cmake_policy(SET CMP0054 NEW) |
| 4 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 5 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 6 | message(CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 7 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 8 | option(BUILD_STATIC_LIBS "Built static libraries" ON) |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 9 | option(YOCTO_DEPENDENCIES "Use YOCTO depedencies system" OFF) |
Ed Tanous | 2d02dcd | 2017-05-15 12:25:30 -0700 | [diff] [blame] | 10 | option(HUNTER_ENABLED "Enable hunter package pulling" OFF) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 11 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 12 | include("cmake/HunterGate.cmake") |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 13 | HunterGate(URL |
| 14 | "https://github.com/ruslo/hunter/archive/v0.18.64.tar.gz" |
| 15 | SHA1 |
| 16 | "baf9c8cc4f65306f0e442b5419967b4c4c04589a") |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 17 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 18 | project(bmc-webserver CXX C) |
| 19 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 20 | include(CTest) |
Ed Tanous | f3d847c | 2017-06-12 16:01:42 -0700 | [diff] [blame] | 21 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 22 | set(CMAKE_CXX_STANDARD 14) |
| 23 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 24 | |
| 25 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) |
| 26 | |
Ed Tanous | c963aa4 | 2017-10-27 16:00:19 -0700 | [diff] [blame] | 27 | SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -Wall") |
Ed Tanous | 0d485ef | 2017-05-23 09:23:53 -0700 | [diff] [blame] | 28 | |
Ed Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 29 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") |
| 30 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti") |
| 31 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 32 | # general |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 33 | option(BMCWEB_BUILD_UT "Enable Unit test" ON) |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 34 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 35 | # security flags |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 36 | SET( |
| 37 | SECURITY_FLAGS |
| 38 | "\ |
| 39 | -fstack-protector-strong \ |
| 40 | -fPIE \ |
| 41 | -fPIC \ |
| 42 | -D_FORTIFY_SOURCE=2 \ |
| 43 | -Wformat \ |
| 44 | -Wformat-security" |
| 45 | ) |
| 46 | SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${SECURITY_FLAGS}") |
| 47 | SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO |
| 48 | "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SECURITY_FLAGS}") |
| 49 | SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${SECURITY_FLAGS}") |
Ed Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 50 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 51 | # Enable link time optimization This is a temporary workaround because |
| 52 | # INTERPROCEDURAL_OPTIMIZATION isn't available until cmake 3.9. gcc-ar and gcc- |
| 53 | # ranlib are wrappers around ar and ranlib which add the lto plugin to the |
| 54 | # command line. |
| 55 | if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
Ed Tanous | ac09331 | 2018-03-16 13:53:05 -0700 | [diff] [blame] | 56 | if(NOT CMAKE_BUILD_TYPE MATCHES Debug) |
Borawski.Lukasz | 109799e | 2018-01-30 15:04:42 +0100 | [diff] [blame] | 57 | STRING(REGEX REPLACE "ar$" "gcc-ar" CMAKE_AR ${CMAKE_AR}) |
| 58 | STRING(REGEX REPLACE "ranlib$" "gcc-ranlib" CMAKE_RANLIB ${CMAKE_RANLIB}) |
| 59 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -fno-fat-lto-objects") |
| 60 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 61 | # Reduce the binary size by removing unnecessary dynamic symbol table |
| 62 | # entries |
| 63 | SET( |
| 64 | CMAKE_CXX_FLAGS |
| 65 | "${CMAKE_CXX_FLAGS} \ |
| 66 | -fvisibility=hidden \ |
| 67 | -fvisibility-inlines-hidden \ |
| 68 | -Wl,--exclude-libs,ALL" |
| 69 | ) |
Ed Tanous | ac09331 | 2018-03-16 13:53:05 -0700 | [diff] [blame] | 70 | endif(NOT CMAKE_BUILD_TYPE MATCHES Debug) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 71 | endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
Borawski.Lukasz | 109799e | 2018-01-30 15:04:42 +0100 | [diff] [blame] | 72 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 73 | # add_definitions(-DBOOST_ASIO_ENABLE_HANDLER_TRACKING) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame] | 74 | add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY) |
| 75 | add_definitions(-DBOOST_SYSTEM_NO_DEPRECATED) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 76 | add_definitions(-DBOOST_ALL_NO_LIB) |
Ed Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 77 | add_definitions(-DBOOST_NO_RTTI) |
| 78 | add_definitions(-DBOOST_NO_TYPEID) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 79 | # set(Boost_USE_STATIC_LIBS ON) |
Ed Tanous | eb1b862 | 2017-04-25 14:11:46 -0700 | [diff] [blame] | 80 | hunter_add_package(Boost) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 81 | find_package(Boost) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 82 | include_directories(${Boost_INCLUDE_DIRS}) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 83 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 84 | # Openssl |
Ed Tanous | 2d02dcd | 2017-05-15 12:25:30 -0700 | [diff] [blame] | 85 | hunter_add_package(OpenSSL) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 86 | find_package(OpenSSL REQUIRED) |
Ed Tanous | f0226cd | 2017-05-16 12:35:38 -0700 | [diff] [blame] | 87 | include_directories(${OPENSSL_INCLUDE_DIR}) |
Ed Tanous | 0d485ef | 2017-05-23 09:23:53 -0700 | [diff] [blame] | 88 | message("OPENSSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR}") |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 89 | |
Ed Tanous | ac09331 | 2018-03-16 13:53:05 -0700 | [diff] [blame] | 90 | # Crow |
| 91 | message("CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") |
| 92 | if(CMAKE_BUILD_TYPE MATCHES Debug) |
| 93 | message("Logging disabled") |
| 94 | add_definitions(-DCROW_ENABLE_LOGGING) |
| 95 | add_definitions(-DCROW_ENABLE_DEBUG) |
| 96 | endif(CMAKE_BUILD_TYPE MATCHES Debug) |
| 97 | |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 98 | add_definitions(-DCROW_ENABLE_SSL) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 99 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/crow/include) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 100 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 101 | # Zlib |
Ed Tanous | 7d3dba4 | 2017-04-05 13:04:39 -0700 | [diff] [blame] | 102 | hunter_add_package(ZLIB) |
| 103 | find_package(ZLIB REQUIRED) |
Ed Tanous | f0226cd | 2017-05-16 12:35:38 -0700 | [diff] [blame] | 104 | include_directories(${ZLIB_INCLUDE_DIRS}) |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 105 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 106 | # tinyxml2 |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 107 | if(NOT ${YOCTO_DEPENDENCIES}) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 108 | add_subdirectory(tinyxml2) |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 109 | else() |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 110 | find_package(tinyxml2 REQUIRED) |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 111 | endif() |
Ed Tanous | 4758d5b | 2017-06-06 15:28:13 -0700 | [diff] [blame] | 112 | # PAM |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 113 | option(WEBSERVER_ENABLE_PAM "enable pam authentication" ON) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 114 | if("${WEBSERVER_ENABLE_PAM}") |
| 115 | find_package(PAM REQUIRED) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 116 | else() |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 117 | add_definitions("-DWEBSERVER_DISABLE_PAM") |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 118 | endif() |
| 119 | |
Ed Tanous | c9b5521 | 2017-06-12 13:25:51 -0700 | [diff] [blame] | 120 | # Boost-dbus |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 121 | set(BOOST_DBUS_BUILD_UT ${BMCWEB_BUILD_UT}) |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 122 | if(NOT ${YOCTO_DEPENDENCIES}) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 123 | add_subdirectory(boost-dbus) |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 124 | else() |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 125 | find_package(boost-dbus REQUIRED) |
Ed Tanous | 465b12a | 2018-02-06 16:30:36 -0800 | [diff] [blame] | 126 | endif() |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 127 | set(WEBSERVER_MAIN src/webserver_main.cpp) |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 128 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 129 | # the webassets file has a non-ideal beahvior, where it loads binary data into a |
| 130 | # std::string due to the way crow is constructed. This causes GCC warnings. |
| 131 | # Filter them out. |
Ed Tanous | b4d29f4 | 2017-03-24 16:39:25 -0700 | [diff] [blame] | 132 | if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 133 | if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9) |
| 134 | set_source_files_properties(${CMAKE_BINARY_DIR}/generated/webassets.cpp |
| 135 | PROPERTIES |
| 136 | COMPILE_FLAGS |
| 137 | -Wno-narrowing) |
| 138 | endif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9) |
Ed Tanous | b4d29f4 | 2017-03-24 16:39:25 -0700 | [diff] [blame] | 139 | endif() |
| 140 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 141 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) |
Borawski.Lukasz | 86e1b66 | 2018-01-19 14:22:14 +0100 | [diff] [blame] | 142 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/redfish-core/include) |
Ed Tanous | b4d29f4 | 2017-03-24 16:39:25 -0700 | [diff] [blame] | 143 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 144 | set(SRC_FILES ${GENERATED_SRC_FILES}) |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 145 | |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 146 | file(COPY src/test_resources DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |
| 147 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 148 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated) |
| 149 | |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 150 | # Unit Tests |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 151 | if(${BMCWEB_BUILD_UT}) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 152 | set(UT_FILES |
| 153 | redfish-core/ut/privileges_test.cpp |
| 154 | src/crow_test.cpp |
| 155 | src/gtest_main.cpp |
| 156 | src/token_authorization_middleware_test.cpp |
| 157 | src/security_headers_middleware_test.cpp |
| 158 | src/webassets_test.cpp |
| 159 | src/crow_getroutes_test.cpp |
| 160 | src/ast_jpeg_decoder_test.cpp |
| 161 | src/kvm_websocket_test.cpp |
| 162 | src/msan_test.cpp |
| 163 | src/ci_map_tests.cpp |
| 164 | src/ast_video_puller_test.cpp |
| 165 | ${CMAKE_BINARY_DIR}/generated/blns.hpp) # big list of naughty strings |
| 166 | add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/generated/blns.hpp |
| 167 | COMMAND |
| 168 | xxd -i |
| 169 | ${CMAKE_CURRENT_SOURCE_DIR}/src/test_resources/blns |
| 170 | ${CMAKE_BINARY_DIR}/generated/blns.hpp) |
Ed Tanous | 4c3cbc6 | 2017-05-16 09:17:42 -0700 | [diff] [blame] | 171 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 172 | set_source_files_properties(${CMAKE_BINARY_DIR}/generated/blns.hpp |
| 173 | PROPERTIES |
| 174 | GENERATED |
| 175 | TRUE) # googletest |
| 176 | enable_testing() |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 177 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 178 | hunter_add_package(GTest) |
| 179 | find_package(GTest REQUIRED) # find_package(GMock CONFIG REQUIRED) |
| 180 | |
| 181 | add_executable(webtest ${SRC_FILES} ${UT_FILES}) |
| 182 | target_link_libraries(webtest gmock gtest) |
| 183 | target_link_libraries(webtest pthread) |
| 184 | target_link_libraries(webtest boost-dbus) |
| 185 | target_link_libraries(webtest ${OPENSSL_LIBRARIES}) |
| 186 | target_link_libraries(webtest ${ZLIB_LIBRARIES}) |
| 187 | target_link_libraries(webtest pam) |
| 188 | target_link_libraries(webtest tinyxml2) |
| 189 | target_link_libraries(webtest -lstdc++fs) |
| 190 | add_test(webtest webtest "--gtest_output=xml:webtest.xml") |
Ed Tanous | c9b5521 | 2017-06-12 13:25:51 -0700 | [diff] [blame] | 191 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 192 | endif(${BMCWEB_BUILD_UT}) |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 193 | |
Ed Tanous | 710adfc | 2017-10-24 17:04:52 -0700 | [diff] [blame] | 194 | install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/static/ DESTINATION share/www) |
| 195 | |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 196 | # bmcweb |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 197 | add_executable(bmcweb ${WEBSERVER_MAIN} ${HDR_FILES} ${SRC_FILES}) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 198 | target_link_libraries(bmcweb boost-dbus) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame] | 199 | target_link_libraries(bmcweb pthread) |
Ed Tanous | f0226cd | 2017-05-16 12:35:38 -0700 | [diff] [blame] | 200 | target_link_libraries(bmcweb ${OPENSSL_LIBRARIES}) |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 201 | target_link_libraries(bmcweb ${ZLIB_LIBRARIES}) |
Ed Tanous | 4758d5b | 2017-06-06 15:28:13 -0700 | [diff] [blame] | 202 | target_link_libraries(bmcweb pam) |
Vernon Mauery | 168792a | 2018-01-26 13:42:54 -0800 | [diff] [blame] | 203 | target_link_libraries(bmcweb -lsystemd) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 204 | target_link_libraries(bmcweb -lstdc++fs) |
Borawski.Lukasz | 109799e | 2018-01-30 15:04:42 +0100 | [diff] [blame] | 205 | target_link_libraries(bmcweb tinyxml2) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 206 | install(TARGETS bmcweb DESTINATION bin) |
Ed Tanous | cc5a37f | 2017-05-11 10:27:23 -0700 | [diff] [blame] | 207 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 208 | add_executable(getvideo src/getvideo_main.cpp) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame] | 209 | target_link_libraries(getvideo pthread) |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 210 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 211 | # Visual Studio Code helper this needs to be at the end to make sure all |
| 212 | # includes are handled correctly |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 213 | include(CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs) |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 214 | get_property(C_INCLUDE_DIRS |
| 215 | DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
| 216 | PROPERTY INCLUDE_DIRECTORIES) |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 217 | |
Ed Tanous | 580f372 | 2018-03-13 16:59:02 -0700 | [diff] [blame] | 218 | execute_process(COMMAND |
| 219 | python3 |
| 220 | ${CMAKE_CURRENT_SOURCE_DIR}/scripts/prime_vscode_compile_db.py |
| 221 | ${C_INCLUDE_DIRS} |
| 222 | ${CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS} |
| 223 | ${CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS}) |