配置源代码和编译选项
配置 Polyspace 以紧密模拟您的编译,从而提高结果精度
如果您使用 make 或 cmake 等编译命令来编译源代码,或者您能够使用编译系统生成 JSON 编译数据库,则可以通过编译命令或编译数据库来创建 Polyspace® 平台工程。Polyspace 平台工程中的源文件和编译选项由编译命令或编译数据库中的编译器调用决定。
否则,请在编译配置中显式设置选项。通过为编译工具链(静态分析) 选项指定编译器,可使分析器识别编译器特定的关键字。使用预处理器定义 (-D) 或要应用于预处理文件的命令/脚本 (-post-preprocessing-command) 等选项来解决任何其他错误。
函数
polyspace-configure | (System Command) Create Polyspace Platform project, workspace, or options file from build command or compilation database |
Polyspace 选项
主题
快速入门
- 指定目标环境和编译器行为
了解指定目标和编译器选项的工作流。 - Information Gathered From Build Systems for Polyspace Analysis and Testing
Learn what information is extracted when you trace your build command to create a Polyspace Platform project.
使用编译命令配置选项
- Create Polyspace Platform Project From Build Command in User Interface
Create a project in the Polyspace Platform user interface from a working build command or compilation database. - 从编译系统创建 Polyspace 工程的要求
了解为什么自动创建 Polyspace 工程可能不适用于您的编译系统,以及如何解决一些原因。 - 使用模式匹配选择用于 Polyspace 工程的文件
使用带有 glob 模式的表达式选择要包含在 Polyspace 工程或选项文件中的文件。 - 从使用联编文件的编译创建 Polyspace 平台工程
将联编文件中的编译信息重用于 Polyspace 分析和测试。 - Modularize Polyspace Projects by Using Makefile Builds
Create a separate Polyspace project or options file for each binary in makefile build. - Create Polyspace Platform Projects From IDE Builds
Specify source files and configuration options by tracing your Visual Studio® build. - Create Polyspace Platform Projects from CMake Builds
Reuse build information in CMakeLists files for Polyspace analysis and testing.
手动配置选项
- 指定目标环境和编译器行为
了解指定目标和编译器选项的工作流。 - 为 Polyspace 分析提供标准库头文件
从编译器中找到 C 或 C++ 标准库头文件的路径,并在 Polyspace 工程中指定这些路径。 - Remove or Replace Keywords Before Compilation
Replace or remove keywords from preprocessed code to avoid compilation errors. - Gather Compilation Options Efficiently for Polyspace Analysis
Put workarounds for compilation errors into a single file and include that file in analysis. - Static Analysis Target Specification for Common Processors
This topic lists the target configurations for Polyspace static analysis of C/C++ code tailored for common processor families.
对 C/C++ 语言标准和扩展的支持
- C/C++ Language Standard Used in Polyspace Analysis
See supported language standards and the default standard used in Polyspace analysis. - C11 Language Elements Supported in Polyspace
Find which C11 language elements are supported for verification. - C++11 Language Elements Supported in Polyspace
Find which C++11 language elements are supported for verification. - C++14 Language Elements Supported in Polyspace
Find which C++14 language elements are supported for verification. - C++17 Language Elements Supported in Polyspace
Find which C++17 language elements are supported for verification. - C++20 Language Elements Supported in Polyspace
Find which C++20 language elements are supported for verification. - Keil or IAR Language Extensions Supported with Polyspace
Find which Keil or IAR-specific extensions of the C language standard are supported for verification.
疑难解答
Troubleshoot Compilation and Linking Errors
Learn why Polyspace compilation can fail even if your compiler build succeeds and how to work around the failures.