Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect capture of the empty macros from CMakeLists.txt setup #276

Closed
alexey-utkin opened this issue Jun 14, 2022 · 2 comments · Fixed by #285
Closed

Incorrect capture of the empty macros from CMakeLists.txt setup #276

alexey-utkin opened this issue Jun 14, 2022 · 2 comments · Fixed by #285
Assignees
Labels
bug Something isn't working customer Issues from customers

Comments

@alexey-utkin
Copy link
Collaborator

alexey-utkin commented Jun 14, 2022

From discussion:
https://github.com/UnitTestBot/UTBotJava/discussions/170

minimal reproducer:
main.cpp

#include <iostream>

int EXPORTS f(int a, int b) {
    return a + b;
}
int main () {
    std::cout << "awa!" << std::endl;
    return 1;
} 

CMakeLists.txt

cmake_minimum_required(VERSION 3.20)
project(example1)

set(CMAKE_CXX_STANDARD 11)

add_executable(example1 main.cpp)
target_compile_definitions(example1 PUBLIC EXPORTS=)
@alexey-utkin alexey-utkin added bug Something isn't working customer Issues from customers labels Jun 14, 2022
@alexey-utkin alexey-utkin moved this to Todo in UTBot C/C++ Jun 14, 2022
@ladisgin ladisgin moved this from Todo to In Progress in UTBot C/C++ Jun 14, 2022
@ladisgin
Copy link
Member

Problem with empty exports in target_compile_definitions(example1 PUBLIC EXPORTS=)
It's work well with bear, but then we use set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
it generate command like "command": "/utbot_distr/install/bin/clang++ -DEXPORTS=\"\" -std=gnu++11 -o CMakeFiles/example1.dir/main.cpp.o -c /home/utbot/emamble/main.cpp"

@ladisgin ladisgin added the top focus Top priority chosen by dev team label Jun 15, 2022
@ladisgin ladisgin linked a pull request Jun 16, 2022 that will close this issue
@ladisgin
Copy link
Member

We use ShellExec with there all arg is string that escape some symbols like " and \

Repository owner moved this from In Progress to Done in UTBot C/C++ Jun 17, 2022
@alexey-utkin alexey-utkin removed the top focus Top priority chosen by dev team label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer Issues from customers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants