How to add x64 and RelWithDebInfo to a build target
已完成
I have a build target which is a test exe called test_injection_removal but I can only build it as Debug x86.
Before I created this target I have build chains for x86 & x64 and Release, Debug & RelWithDebInfo.
Why can I only see Debug x86? I need RelWithDebInfo x64.
请先登录再写评论。
I am currently using
in the CMakeLists.txt of the test_injection_removal target.
It seems to build a 64bit exe but I also have a 32bit dll dependency will that build as 32bit? Or should I use set(BUILD_ARCH "-m32") in that target's CMakeLists.txt ?
Hello!
In the drop-down list CLion shows only those profiles which are applicable for the selected run/debug configuration. Is there something in your CMakeLists.txt that makes only the "Debug | x86" profile available for the test_injection_removal target?
No the CMakeLists.txt is this:
If you select some other configuration in the drop-down, do other profiles appear there?
And what happens if you do
Tools | CMake | Reset Cache and Reload Project
? Are all profiles loaded correctly? Or do you see errors in any tab?Yes I definitely see the configurations on the other targets:
I performed the reset and reload but it made no difference!
Please send all the `cmake-build-***` folders to clion-support at jetbrains.com. We need them to investigate the situation.
Hi,
Unfortunately the `cmake-build-***` folders are 2.2GB compressed!
Are there specific files that you want?
I could ftp the zip file to you?
We are interested in the ".cmake" subfolder of each `cmake-build-***` folder. BTW you can share files using https://uploads.services.jetbrains.com/ (you will need to share the Upload ID after the upload is completed successfully; you can send it to clion-support at jetbrains.com if you want).
Upload ID: 2022_06_09_afR4KpzEX9oLviBrVwrxKy
In `File | Settings | Build, Execution, Deployment | CMake` > `CMake options` please change -DCMAKE_BUILD_TYPE=*** to -DCMAKE_CONFIGURATION_TYPES=*** (for all CMake profiles) and then do `Tools | CMake | Reset Cache and Reload Project`. Does it help?
Sorry but changing the CMAKE_BUILD_TYPE to CMAKE_CONFIGURATION_TYPES did not make any difference.
According to the provided ".cmake" subfolders, the test_*** targets exist only for Debug | x86 and Debug | x64. We suspect that in your project the Release build type is somehow disabled for the test_*** targets. But we will need your project in order to investigate this. Without the project we won't be able to help you I'm afraid.
Hi Anna
Just let me know what files you want and I will send them.
Thanks Dave
It's hard to choose the specific files. I think we need the entire project (without the `cmake-build-***` folders).
Anna
Just to claify, you want all of our cpp and h files?
Including dependent repos?
Thanks Dave
There are two ways:
Someone from your team can investigate why the Release build type is disabled for the test_*** targets in the project.
Or, if you want us to take a look, then we need at least to take a look at the project structure, logics, settings etc. So please send us all the CMakeLists.txt and *.cmake files, keeping the folder nesting so that the project structure is preserved.
Anna
I can certainly send you the CMakeLists.txt and *.cmake files in a zip.
I will work on that now.
Thanks Dave
Anna
Upload ID: 2022_06_22_dqfzbHbaYz78oNB9WQtBVM (file: Agent.zip)
Thanks Dave
First of all: in bloomberg/CMakeLists.txt you have
It means the entire bloomberg-monitor subdirectory (including the tests you're interested in) is added only in case of x86.
Secondly, the tests are included only if WITH_TEST is enabled, while by default it's disabled
There might be other conditions regarding Release/Debug, for example. Please inspect your project more thoroughly.
Anna
The WITH_TEST is all by design as we do not want production releases to include unit test executables.
The x86 bloomberg-monitor is again by design as we do not want/need a x64 version for those builds under bloomberg-monitor.
Grepping for release and relwithdebinfo in the CMakeLists.txt I can see none that are not valid:
Thanks Dave
Originally you asked:
Now you say that "the x86 bloomberg-monitor is again by design". Then why did you expect a x64 profile to be available for the test_injection_removal configuration which is a part of bloomberg-monitor and therefore is x86 by design?
The project is really huge, it has lots of conditions and switches. We can't thoroughly inspect the entire project for you, it's simply out of scope of CLion support.