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