Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) |
| 2 | |
| 3 | cmake_policy(SET CMP0054 OLD) |
| 4 | |
| 5 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) |
| 6 | |
| 7 | message("${CMAKE_MODULE_PATH}") |
| 8 | |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 9 | SET(BUILD_SHARED_LIBRARIES OFF) |
| 10 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 11 | #set(HUNTER_ROOT /home/ed/hunter) |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 12 | #SET(HUNTER_STATUS_DEBUG ON) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 13 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 14 | |
| 15 | #SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls") |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 16 | #-fsanitize-memory-track-origins=2 -fno-omit-frame-pointer |
| 17 | SET(MSAN_CXX_FLAGS "-fsanitize=memory -stdlib=libc++ -I/home/ed/libcxx_msan/include -I/home/ed/libcxx_msan/include/c++/v1") |
| 18 | SET(MSAN_LINKER_EXE_FLAGS "${MSAN_CXX_FLAGS} -lc++abi -L/home/ed/libcxx_msan/lib -Wl,-rpath,I/home/ed/libcxx_msan/lib") |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 19 | |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 20 | #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSAN_CXX_FLAGS}") |
| 21 | #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSAN_LINKER_EXE_FLAGS}") |
| 22 | |
| 23 | |
| 24 | message("CMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}") |
| 25 | message("MSAN_CXX_FLAGS=${MSAN_CXX_FLAGS}") |
| 26 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 27 | include("cmake/HunterGate.cmake") |
| 28 | #HunterGate( |
| 29 | # URL "https://github.com/ruslo/hunter/archive/v0.16.31.tar.gz" |
| 30 | # SHA1 "8fcc0a2d6206e1f2c6fc011e3e694e388d030b53" |
| 31 | #) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 32 | HunterGate( |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 33 | URL "https://github.com/ruslo/hunter/archive/v0.18.16.tar.gz" |
| 34 | SHA1 "6cbca2b0e7605ad8ea22ee3527850996436f71b8" |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 35 | ) |
| 36 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 37 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 38 | option(BUILD_FOR_EMBEDDED "Build for device target" ON) |
| 39 | |
| 40 | project(bmc-webserver CXX C) |
| 41 | |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 42 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 43 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 44 | set(CMAKE_CXX_STANDARD 14) |
| 45 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 46 | |
| 47 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) |
| 48 | |
| 49 | if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} ) |
| 50 | message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (usually called build) and run CMake from there. You may need to remove CMakeCache.txt." ) |
| 51 | endif() |
| 52 | |
| 53 | # general |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 54 | option(BUILD_SHARED_LIBS "Build as shared library" OFF) |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 55 | option(BUILD_UT "Enable Unit test" ON) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 56 | |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 57 | # This needs to be before the crow and other module includes so headers get overriden correctly |
| 58 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) |
| 59 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 60 | # security flags |
| 61 | #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong -fPIE -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security" ) |
| 62 | #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack -z relro -z now") |
| 63 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 64 | # Boost |
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) |
| 69 | set(Boost_USE_STATIC_LIBS ON) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 70 | hunter_add_package(Boost) |
| 71 | find_package(Boost) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 72 | |
| 73 | #Openssl |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 74 | hunter_add_package(OpenSSL) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 75 | find_package(OpenSSL REQUIRED) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 76 | |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 77 | |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 78 | |
| 79 | #g3 logging |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 80 | # G3logger does some unfortunate compile options, so cheat a little bit and copy/paste |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 81 | set(LOG_SRC ${CMAKE_CURRENT_SOURCE_DIR}/g3log/src) |
| 82 | |
| 83 | file(GLOB_RECURSE SRC_FILES ${LOG_SRC}/*.cpp ${LOG_SRC}/*.ipp) |
| 84 | file(GLOB_RECURSE HEADER_FILES ${LOG_SRC}/*.hpp) |
| 85 | |
| 86 | IF (MSVC OR MINGW) |
| 87 | list(REMOVE_ITEM SRC_FILES ${LOG_SRC}/crashhandler_unix.cpp) |
| 88 | ELSE() |
| 89 | list(REMOVE_ITEM SRC_FILES ${LOG_SRC}/crashhandler_windows.cpp ${LOG_SRC}/g3log/stacktrace_windows.hpp ${LOG_SRC}/stacktrace_windows.cpp) |
| 90 | ENDIF (MSVC OR MINGW) |
| 91 | |
| 92 | # Create the g3log library |
| 93 | include_directories(${LOG_SRC}) |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 94 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 95 | add_library(g3logger ${SRC_FILES}) |
Ed Tanous | 7d3dba4 | 2017-04-05 13:04:39 -0700 | [diff] [blame] | 96 | if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")) |
| 97 | set_source_files_properties(g3log/src/logcapture.cpp PROPERTIES COMPILE_FLAGS -Wno-braced-scalar-init) |
| 98 | set_source_files_properties(g3log/src/filesink.cpp PROPERTIES COMPILE_FLAGS -Wno-braced-scalar-init) |
| 99 | set_source_files_properties(g3log/src/logworker.cpp PROPERTIES COMPILE_FLAGS -Wno-braced-scalar-init) |
| 100 | endif() |
| 101 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 102 | set_target_properties(g3logger PROPERTIES |
| 103 | LINKER_LANGUAGE CXX |
| 104 | OUTPUT_NAME g3logger |
| 105 | CLEAN_DIRECT_OUTPUT 1) |
| 106 | target_link_libraries(g3logger ${PLATFORM_LINK_LIBRIES}) |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 107 | |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 108 | #lib jpeg |
| 109 | set(BUILD_STATIC ON) |
| 110 | #include_directories(libjpeg) |
| 111 | #include_directories(${CMAKE_CURRENT_BINARY_DIR}/libjpeg) |
| 112 | #add_subdirectory(libjpeg) |
| 113 | |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 114 | |
| 115 | # Crow |
| 116 | add_definitions(-DCROW_ENABLE_SSL) |
| 117 | include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/crow/include) |
Ed Tanous | 0fdddb1 | 2017-02-28 11:06:34 -0800 | [diff] [blame] | 118 | |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 119 | #Zlib |
Ed Tanous | 7d3dba4 | 2017-04-05 13:04:39 -0700 | [diff] [blame] | 120 | hunter_add_package(ZLIB) |
| 121 | find_package(ZLIB REQUIRED) |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 122 | |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 123 | # C++ GSL (Guideline support libraries) |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 124 | include_directories(gsl-lite/include) |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 125 | |
| 126 | set(WEBSERVER_MAIN src/webserver_main.cpp) |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 127 | |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 128 | set(HDR_FILES |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 129 | include/crow/g3_logger.hpp |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 130 | include/ssl_key_handler.hpp |
| 131 | include/color_cout_g3_sink.hpp |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 132 | ) |
| 133 | |
| 134 | set(GENERATED_SRC_FILES |
| 135 | ${CMAKE_BINARY_DIR}/generated/webassets.cpp |
Ed Tanous | b4a7bfa | 2017-04-04 17:23:00 -0700 | [diff] [blame] | 136 | ${CMAKE_BINARY_DIR}/generated/webassets.hpp |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 137 | ) |
| 138 | |
Ed Tanous | b4a7bfa | 2017-04-04 17:23:00 -0700 | [diff] [blame] | 139 | include_directories(${CMAKE_BINARY_DIR}/generated) |
| 140 | |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 141 | set_source_files_properties(${GENERATED_SRC_FILES} PROPERTIES GENERATED TRUE) |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 142 | |
Ed Tanous | b4d29f4 | 2017-03-24 16:39:25 -0700 | [diff] [blame] | 143 | if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
| 144 | if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) |
| 145 | set_source_files_properties(${CMAKE_BINARY_DIR}/generated/webassets.cpp PROPERTIES COMPILE_FLAGS -Wno-narrowing) |
| 146 | endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) |
| 147 | endif() |
| 148 | |
| 149 | |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 150 | set(SRC_FILES |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 151 | src/token_authorization_middleware.cpp |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 152 | src/security_headers_middleware.cpp |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 153 | src/base64.cpp |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 154 | ${GENERATED_SRC_FILES} |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 155 | ) |
| 156 | |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 157 | set(UT_FILES |
Ed Tanous | 7d3dba4 | 2017-04-05 13:04:39 -0700 | [diff] [blame] | 158 | g3log/test_unit/test_cpp_future_concepts.cpp |
| 159 | g3log/test_unit/tester_sharedlib.cpp |
| 160 | # TODO(ed) figure out why this unit test has a main function in it |
| 161 | #g3log/test_unit/test_filechange.cpp |
| 162 | g3log/test_unit/testing_helpers.h |
| 163 | #TODO(ed) |
| 164 | #g3log/test_unit/test_linux_dynamic_loaded_sharedlib.cpp |
| 165 | #g3log/test_unit/test_sink.cpp |
| 166 | g3log/test_unit/test_concept_sink.cpp |
| 167 | g3log/test_unit/test_crashhandler_windows.cpp |
| 168 | g3log/test_unit/tester_sharedlib.h |
| 169 | g3log/test_unit/testing_helpers.cpp |
| 170 | g3log/test_unit/test_io.cpp |
| 171 | g3log/test_unit/test_message.cpp |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 172 | src/crowtest/crow_unittest.cpp |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 173 | src/gtest_main.cpp |
| 174 | src/base64_test.cpp |
| 175 | src/token_authorization_middleware_test.cpp |
Ed Tanous | b4a7bfa | 2017-04-04 17:23:00 -0700 | [diff] [blame] | 176 | src/security_headers_middleware_test.cpp |
| 177 | src/webassets_test.cpp |
| 178 | src/crow_getroutes_test.cpp |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 179 | src/ast_jpeg_decoder_test.cpp |
Ed Tanous | 7d3dba4 | 2017-04-05 13:04:39 -0700 | [diff] [blame] | 180 | |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 181 | src/msan_test.cpp |
| 182 | |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 183 | ${CMAKE_BINARY_DIR}/generated/blns.hpp |
| 184 | ) |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 185 | |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 186 | |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 187 | file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/generated") |
| 188 | |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 189 | file(COPY src/test_resources DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |
| 190 | |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 191 | # Unit Tests |
| 192 | if(${BUILD_UT}) |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 193 | # big list of naughty strings |
| 194 | add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/generated/blns.hpp |
| 195 | COMMAND xxd -i ${CMAKE_CURRENT_SOURCE_DIR}/src/blns.txt ${CMAKE_BINARY_DIR}/generated/blns.hpp) |
| 196 | |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 197 | # googletest |
| 198 | enable_testing() |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 199 | #hunter_add_package(GTest) |
| 200 | add_subdirectory(googletest) |
| 201 | #find_package(GMock CONFIG REQUIRED) |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 202 | |
| 203 | add_executable(unittest ${HDR_FILES} ${SRC_FILES} ${UT_FILES}) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 204 | target_link_libraries(unittest gmock gtest) |
| 205 | target_link_libraries(unittest pthread) |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 206 | target_link_libraries(unittest OpenSSL::SSL OpenSSL::Crypto) |
| 207 | target_link_libraries(unittest g3logger) |
Ed Tanous | 7d3dba4 | 2017-04-05 13:04:39 -0700 | [diff] [blame] | 208 | target_link_libraries(unittest ${ZLIB_LIBRARIES}) |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 209 | add_dependencies(unittest packagestaticcpp) |
| 210 | endif(${BUILD_UT}) |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 211 | |
| 212 | # web static assets |
| 213 | add_subdirectory(static) |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 214 | |
| 215 | # bmcweb |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 216 | add_executable(bmcweb ${WEBSERVER_MAIN} ${HDR_FILES} ${SRC_FILES}) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 217 | target_link_libraries(bmcweb pthread) |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 218 | target_link_libraries(bmcweb OpenSSL::SSL OpenSSL::Crypto) |
| 219 | target_link_libraries(bmcweb g3logger) |
Ed Tanous | 9b65f1f | 2017-03-07 15:17:13 -0800 | [diff] [blame] | 220 | target_link_libraries(bmcweb ${ZLIB_LIBRARIES}) |
Ed Tanous | 904063f | 2017-03-02 16:48:24 -0800 | [diff] [blame] | 221 | add_dependencies(bmcweb packagestaticcpp) |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 222 | |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 223 | # udpclient |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 224 | add_executable(udpclient src/udpclient.cpp) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 225 | target_link_libraries(udpclient pthread) |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 226 | |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 227 | add_executable(getvideo src/getvideo_main.cpp) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 228 | target_link_libraries(getvideo pthread) |
Ed Tanous | d5f3999 | 2017-04-18 13:41:22 -0700 | [diff] [blame] | 229 | target_link_libraries(getvideo g3logger) |
Ed Tanous | 1ccd57c | 2017-03-21 13:15:58 -0700 | [diff] [blame] | 230 | |
Ed Tanous | 38bdb98 | 2017-03-03 14:19:33 -0800 | [diff] [blame] | 231 | # Visual Studio Code helper |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 232 | # this needs to be at the end to make sure all includes are handled correctly |
Ed Tanous | 93f987d | 2017-04-17 17:52:36 -0700 | [diff] [blame] | 233 | |
Ed Tanous | 5f34a9c | 2017-02-28 12:35:13 -0800 | [diff] [blame] | 234 | get_property(C_INCLUDE_DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) |
Ed Tanous | 01250f2 | 2017-04-18 17:49:51 -0700 | [diff] [blame^] | 235 | execute_process(COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/prime_vscode_compile_db.py ${C_INCLUDE_DIRS}) |