"Fossies" - the Fresh Open Source Software Archive

Member "cppcheck-1.89/lib/CMakeLists.txt" (1 Sep 2019, 1287 Bytes) of package /windows/misc/cppcheck-1.89.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 1.87_vs_1.88.

    1 include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/)
    2 include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
    3 include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
    4 
    5 file(GLOB_RECURSE hdrs "*.h")
    6 file(GLOB_RECURSE srcs "*.cpp")
    7 
    8 function(build_src output filename)
    9     get_filename_component(file ${filename} NAME)
   10     set(outfile ${CMAKE_CURRENT_BINARY_DIR}/build/mc_${file})
   11     set(${output} ${${output}} ${outfile} PARENT_SCOPE)
   12     if (${USE_MATCHCOMPILER} STREQUAL "Verify")
   13         set(verify_option "--verify")
   14     endif()
   15     add_custom_command(
   16         OUTPUT ${outfile}
   17         COMMAND ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tools/matchcompiler.py" 
   18                 --read-dir="${CMAKE_CURRENT_SOURCE_DIR}" 
   19                 --prefix="mc_" 
   20                 --line 
   21                 ${verify_option} 
   22                 ${file}
   23         DEPENDS ${file} 
   24         DEPENDS ${PROJECT_SOURCE_DIR}/tools/matchcompiler.py
   25     )
   26     set_source_files_properties(${outfile} PROPERTIES GENERATED TRUE)
   27 endfunction()
   28 
   29 foreach(file ${srcs})
   30     build_src(srcs_build ${file})
   31 endforeach()
   32 
   33 if (NOT ${USE_MATCHCOMPILER_OPT} STREQUAL "Off")
   34     set(srcs_lib ${srcs_build})
   35 else()
   36     set(srcs_lib ${srcs})
   37 endif()
   38 
   39 add_library(lib_objs OBJECT ${srcs_lib} ${hdrs})
   40