Conversation
|
@oontvoo i think this solves the problem you were trying to solve with not generating the export header. |
|
Thanks! The windows CI failed? (not clear to me why it's failing tho - the logs dont have much info) |
the windows release CI is quite flaky... i don't have a windows machine to test on but i think it's due to the benchmark running at a very different speed to what's expected and the regex test fails. |
| endif() | ||
|
|
||
| if (NOT BUILD_SHARED_LIBS) | ||
| add_definitions(-DBENCHMARK_STATIC_DEFINE) |
There was a problem hiding this comment.
not sure about this one as there's multiple targets all of which need the definition.
LebedevRI
left a comment
There was a problem hiding this comment.
No particular opinion.
If CMake was the only build system, this would probably not make sense,
but since a workaround for non-CMake is needed, i suppose this is better.
The reason is separation of concerns. In particular, it does not make sense to check-in artifacts that can be generated. Additionally, CMake users can profit from improvements to Now there's an automatically generated header file which is part of the code base that will either never be updated or will be patched manually. This approach does not sound very convincing. |
|
|
|
|
|
not CMake ones. if we want to bring back generating the header then it needs to work across all the systems we need to support. unfortunately some of these systems are not available to be tested by CI bots and only show up on integration. i think that means we need to have a static header for all but cmake, which means we may as well also use that static header for cmake to avoid maintaining two systems, one of which might change under our noses if cmake decides to change their implementation. |
…e#1435)" This reverts commit 7b3ac07. Revert "Fix SOVERSION of shared library" This reverts commit d4bc509. Revert "Also fix the SOVERSION for benchmark_main" This reverts commit d845b7b. Revert "use target_compile_definitions (google#1440)" This reverts commit e27c930. Revert "Remove stray comment and added missing header (google#1444)" This reverts commit 141b554. Revert "remove unnecessary generated include directory (google#1451)" This reverts commit 7d48eff.
…e#1435)" This reverts commit 7b3ac07. Revert "Fix SOVERSION of shared library" This reverts commit d4bc509. Revert "Also fix the SOVERSION for benchmark_main" This reverts commit d845b7b. Revert "Remove stray comment and added missing header (google#1444)" This reverts commit 141b554. Revert "remove unnecessary generated include directory (google#1451)" This reverts commit 7d48eff.
|
I had failing build on a project in Visual Studio 2022 where I used a build of a fork of benchmark (latest version). As soon as I reverted this pull request, rebuild and deployed benchmark off my local benchmark repository, the previously failing build started to succeed. Seems like generating the export.h file is vital for the link process in Visual Studio. |
|
I got my failing build working in a different approach, but it required a change in the steps to build the benchmark library off my local fork. I reverted all changes, and then I build the library using the following steps:
Using the |
This also removes the dual licensing requirement.
As far as i can tell there is no behavioural change here so I'm not sure why it needed to be generated in the first place...