[PATCH] D39445: [clang-fuzzer] Fix incremental builds of the fuzzer
vitalybuka created this revision. Herald added a subscriber: mgorny. Don't use BUILD_IN_SOURCE keep git checkout clean Don't forward CMAKE_GENERATOR as ExternalProject_Add should do it already Reset UPDATE_COMMAND to avoid git checkout updates on each build https://reviews.llvm.org/D39445 Files: clang/cmake/modules/ProtobufMutator.cmake Index: clang/cmake/modules/ProtobufMutator.cmake === --- clang/cmake/modules/ProtobufMutator.cmake +++ clang/cmake/modules/ProtobufMutator.cmake @@ -1,23 +1,18 @@ set(PBM_PREFIX protobuf_mutator) set(PBM_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PBM_PREFIX}/src/${PBM_PREFIX}) -set(PBM_LIB_PATH ${PBM_PATH}/src/libprotobuf-mutator.a) -set(PBM_FUZZ_LIB_PATH ${PBM_PATH}/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) +set(PBM_LIB_PATH ${PBM_PATH}-build/src/libprotobuf-mutator.a) +set(PBM_FUZZ_LIB_PATH ${PBM_PATH}-build/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) ExternalProject_Add(${PBM_PREFIX} PREFIX ${PBM_PREFIX} GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git GIT_TAG master - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} --DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} --DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} --DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} BUILD_BYPRODUCTS ${PBM_LIB_PATH} ${PBM_FUZZ_LIB_PATH} - BUILD_IN_SOURCE 1 + UPDATE_COMMAND "" INSTALL_COMMAND "" - LOG_DOWNLOAD 1 - LOG_CONFIGURE 1 - LOG_BUILD 1 ) set(ProtobufMutator_INCLUDE_DIRS ${PBM_PATH}) Index: clang/cmake/modules/ProtobufMutator.cmake === --- clang/cmake/modules/ProtobufMutator.cmake +++ clang/cmake/modules/ProtobufMutator.cmake @@ -1,23 +1,18 @@ set(PBM_PREFIX protobuf_mutator) set(PBM_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PBM_PREFIX}/src/${PBM_PREFIX}) -set(PBM_LIB_PATH ${PBM_PATH}/src/libprotobuf-mutator.a) -set(PBM_FUZZ_LIB_PATH ${PBM_PATH}/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) +set(PBM_LIB_PATH ${PBM_PATH}-build/src/libprotobuf-mutator.a) +set(PBM_FUZZ_LIB_PATH ${PBM_PATH}-build/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) ExternalProject_Add(${PBM_PREFIX} PREFIX ${PBM_PREFIX} GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git GIT_TAG master - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} --DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} --DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} --DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} BUILD_BYPRODUCTS ${PBM_LIB_PATH} ${PBM_FUZZ_LIB_PATH} - BUILD_IN_SOURCE 1 + UPDATE_COMMAND "" INSTALL_COMMAND "" - LOG_DOWNLOAD 1 - LOG_CONFIGURE 1 - LOG_BUILD 1 ) set(ProtobufMutator_INCLUDE_DIRS ${PBM_PATH}) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39445: [clang-fuzzer] Fix incremental builds of the fuzzer
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39445: [clang-fuzzer] Fix incremental builds of the fuzzer
This revision was automatically updated to reflect the committed changes. Closed by commit rL317035: [clang-fuzzer] Fix incremental builds of the fuzzer (authored by vitalybuka). Changed prior to commit: https://reviews.llvm.org/D39445?vs=120926&id=121045#toc Repository: rL LLVM https://reviews.llvm.org/D39445 Files: cfe/trunk/cmake/modules/ProtobufMutator.cmake Index: cfe/trunk/cmake/modules/ProtobufMutator.cmake === --- cfe/trunk/cmake/modules/ProtobufMutator.cmake +++ cfe/trunk/cmake/modules/ProtobufMutator.cmake @@ -1,23 +1,18 @@ set(PBM_PREFIX protobuf_mutator) set(PBM_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PBM_PREFIX}/src/${PBM_PREFIX}) -set(PBM_LIB_PATH ${PBM_PATH}/src/libprotobuf-mutator.a) -set(PBM_FUZZ_LIB_PATH ${PBM_PATH}/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) +set(PBM_LIB_PATH ${PBM_PATH}-build/src/libprotobuf-mutator.a) +set(PBM_FUZZ_LIB_PATH ${PBM_PATH}-build/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) ExternalProject_Add(${PBM_PREFIX} PREFIX ${PBM_PREFIX} GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git GIT_TAG master - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} --DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} --DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} --DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} BUILD_BYPRODUCTS ${PBM_LIB_PATH} ${PBM_FUZZ_LIB_PATH} - BUILD_IN_SOURCE 1 + UPDATE_COMMAND "" INSTALL_COMMAND "" - LOG_DOWNLOAD 1 - LOG_CONFIGURE 1 - LOG_BUILD 1 ) set(ProtobufMutator_INCLUDE_DIRS ${PBM_PATH}) Index: cfe/trunk/cmake/modules/ProtobufMutator.cmake === --- cfe/trunk/cmake/modules/ProtobufMutator.cmake +++ cfe/trunk/cmake/modules/ProtobufMutator.cmake @@ -1,23 +1,18 @@ set(PBM_PREFIX protobuf_mutator) set(PBM_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PBM_PREFIX}/src/${PBM_PREFIX}) -set(PBM_LIB_PATH ${PBM_PATH}/src/libprotobuf-mutator.a) -set(PBM_FUZZ_LIB_PATH ${PBM_PATH}/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) +set(PBM_LIB_PATH ${PBM_PATH}-build/src/libprotobuf-mutator.a) +set(PBM_FUZZ_LIB_PATH ${PBM_PATH}-build/src/libfuzzer/libprotobuf-mutator-libfuzzer.a) ExternalProject_Add(${PBM_PREFIX} PREFIX ${PBM_PREFIX} GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git GIT_TAG master - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} --DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} --DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} --DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} BUILD_BYPRODUCTS ${PBM_LIB_PATH} ${PBM_FUZZ_LIB_PATH} - BUILD_IN_SOURCE 1 + UPDATE_COMMAND "" INSTALL_COMMAND "" - LOG_DOWNLOAD 1 - LOG_CONFIGURE 1 - LOG_BUILD 1 ) set(ProtobufMutator_INCLUDE_DIRS ${PBM_PATH}) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits