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

[BUG] Failed build on VS #1450

Closed
shrek1402 opened this issue Jul 28, 2022 · 2 comments
Closed

[BUG] Failed build on VS #1450

shrek1402 opened this issue Jul 28, 2022 · 2 comments

Comments

@shrek1402
Copy link

System
Which OS, compiler, and compiler version are you using:

  • OS: Win
  • Compiler and version: MSVC lattest

I use v1.7.0

Cmake:

include(FetchContent)

set(BENCHMARK_ENABLE_TESTING ON)    # to suppress benchmark internal tests

if(MSVC)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /Zc:__cplusplus")
else(MSVC)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Werror -pedantic")
endif(MSVC)

FetchContent_Declare(
  googlebenchmark
  URL https://github.com/google/benchmark/archive/refs/heads/main.zip
)

set(BENCHMARK_DOWNLOAD_DEPENDENCIES ON)
FetchContent_MakeAvailable(googlebenchmark)

add_executable(MI.Bench MI.Bench.Main.cpp)

target_link_libraries(MI.Bench 
	benchmark::benchmark
)

install(
  TARGETS MI.Bench
  RUNTIME DESTINATION bin
)

result:

 ----- MI.Bench -----

Running on Windows
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19044.
-- git version: v0.0.0-dirty normalized to 0.0.0
-- Version: 1.7.0
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile:
-- Performing Test HAVE_POSIX_REGEX -- failed to compile:
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19044.
-- Looking for Google Test sources
-- Looking for Google Test sources in C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/googletest
CMake Warning at CMakeLists.txt:37 (message):
  Did not find Google Test sources! Fetching from web...


-- Configuring done
-- Generating done
-- Build files have been written to: C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/third_party/googletest
Microsoft (R) Build Engine версии 17.2.1+52cd2da31 для .NET Framework
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

  Checking Build System
  Creating directories for 'googletest'
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/third_party/googletest/CMakeLists.txt
  Performing download step (git clone) for 'googletest'
  Cloning into 'src'...
  HEAD is now at e2239ee6 Googletest export
  Performing update step for 'googletest'
  No patch step for 'googletest'
  No configure step for 'googletest'
  No build step for 'googletest'
  No install step for 'googletest'
  No test step for 'googletest'
  Completed 'googletest'
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/third_party/googletest/CMakeLists.txt
-- Found Python: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe (found version "3.9.7") found components: Interpreter
-- Performing Test BENCHMARK_HAS_O3_FLAG
-- Performing Test BENCHMARK_HAS_O3_FLAG - Failed
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.23)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Warning (dev) at CMakeLists.txt:19 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "MI.Bench" links to some libraries for which the linker must
  search:

    shlwapi

  and other libraries with known full path:

    C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/src/Debug/benchmark.lib

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: C:/Work/MI.new/cmake-example-library/MI.Bench/_build
Microsoft (R) Build Engine версии 17.2.1+52cd2da31 для .NET Framework
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

  Checking Build System
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/third_party/googletest/src/googlemock/CMakeLists.txt
  benchmark.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\src\Release\benchmark.lib
  gtest-all.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/CMakeLists.txt
  benchmark_main.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\src\Release\benchmark_main.lib
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  spec_arg_test.cc
  output_test_helper.cc
LINK : warning LNK4217: Символ "?PrintDefaultHelp@benchmark@@YAXXZ (void __cdecl benchmark::PrintDefaultHelp(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?Initialize@benchmark@@YAXPEAHPEAPEADP6AXXZ@Z (void __cdecl benchmark::Initialize(int *,char * *,void (__cdecl*)(void)))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?Shutdown@benchmark@@YAXXZ (void __cdecl benchmark::Shutdown(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?ReportUnrecognizedArguments@benchmark@@YA_NHPEAPEAD@Z (bool __cdecl benchmark::ReportUnrecognizedArguments(int,char * *))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?RunSpecifiedBenchmarks@benchmark@@YA_KXZ (unsigned __int64 __cdecl benchmark::RunSpecifiedBenchmarks(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?UseCharPointer@internal@benchmark@@YAXPEDD@Z (void __cdecl benchmark::internal::UseCharPointer(char const volatile *))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции ""void __cdecl _for_each(class benchmark::State &)" (?_for_each@@YAXAEAVState@benchmark@@@Z)". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?RegisterBenchmarkInternal@internal@benchmark@@YAPEAVBenchmark@12@PEAV312@@Z (class benchmark::internal::Benchmark * __cdecl benchmark::internal::RegisterBenchmarkInternal(class benchmark::internal::Benchmark *))", определенный в "benchmark.lib(benchmark_register.obj)", импортирован "MI.Bench.Main.obj" в функции ""void __cdecl `dynamic initializer for 'benchmark_uniq_2_benchmark_''(void)" (??__Ebenchmark_uniq_2_benchmark_@@YAXXZ)". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?InitializeStreams@internal@benchmark@@YAHXZ (int __cdecl benchmark::internal::InitializeStreams(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции ""void __cdecl benchmark::internal::`dynamic initializer for 'stream_init_anchor''(void)" (??__Estream_init_anchor@internal@benchmark@@YAXXZ)". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?StartKeepRunning@State@benchmark@@AEAAXXZ (private: void __cdecl benchmark::State::StartKeepRunning(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции ""void __cdecl _for_each(class benchmark::State &)" (?_for_each@@YAXAEAVState@benchmark@@@Z)". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
LINK : warning LNK4217: Символ "?FinishKeepRunning@State@benchmark@@AEAAXXZ (private: void __cdecl benchmark::State::FinishKeepRunning(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "MI.Bench.Main.obj" в функции ""void __cdecl _for_each(class benchmark::State &)" (?_for_each@@YAXAEAVState@benchmark@@@Z)". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
MI.Bench.Main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __cdecl benchmark::internal::FunctionBenchmark::FunctionBenchmark(char const *,void (__cdecl*)(class benchmark::State &))" (__imp_??0FunctionBenchmark@internal@benchmark@@QEAA@PEBDP6AXAEAVState@2@@Z@Z) в функции "void __cdecl `dynamic initializer for 'benchmark_uniq_2_benchmark_''(void)" (??__Ebenchmark_uniq_2_benchmark_@@YAXXZ). [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
MI.Bench.Main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: virtual __cdecl benchmark::internal::FunctionBenchmark::~FunctionBenchmark(void)" (__imp_??1FunctionBenchmark@internal@benchmark@@UEAA@XZ) в функции "public: virtual void * __cdecl benchmark::internal::FunctionBenchmark::`scalar deleting destructor'(unsigned int)" (??_GFunctionBenchmark@internal@benchmark@@UEAAPEAXI@Z). [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
C:\Work\MI.new\cmake-example-library\MI.Bench\_build\Release\MI.Bench.exe : fatal error LNK1120: неразрешенных внешних элементов: 2 [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\MI.Bench.vcxproj]
  spec_arg_verbosity_test.cc
  register_benchmark_test.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  filter_test.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  basic_test.cc
  skip_with_error_test.cc
  multiple_ranges_test.cc
  options_test.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  link_main_test.cc
  map_test.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  basic_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\basic_test.exe
  donotoptimize_test.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  args_product_test.cc
  gmock-all.cc
  filter_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\filter_test.exe
  register_benchmark_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\register_benchmark_test.exe
  skip_with_error_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\skip_with_error_test.exe
  spec_arg_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\spec_arg_test.exe
  spec_arg_verbosity_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\spec_arg_verbosity_test.exe
  fixture_test.cc
  map_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\map_test.exe
     Создается библиотека C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/test/Release/link_main_test.lib и объект C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-build/test/Release/link_main_test.exp
LINK : warning LNK4217: Символ "?PrintDefaultHelp@benchmark@@YAXXZ (void __cdecl benchmark::PrintDefaultHelp(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "benchmark_main.lib(benchmark_main.obj)" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\link_main_test.vcxproj]
LINK : warning LNK4217: Символ "?Initialize@benchmark@@YAXPEAHPEAPEADP6AXXZ@Z (void __cdecl benchmark::Initialize(int *,char * *,void (__cdecl*)(void)))", определенный в "benchmark.lib(benchmark.obj)", импортирован "benchmark_main.lib(benchmark_main.obj)" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\link_main_test.vcxproj]
LINK : warning LNK4217: Символ "?Shutdown@benchmark@@YAXXZ (void __cdecl benchmark::Shutdown(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "benchmark_main.lib(benchmark_main.obj)" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\link_main_test.vcxproj]
LINK : warning LNK4217: Символ "?ReportUnrecognizedArguments@benchmark@@YA_NHPEAPEAD@Z (bool __cdecl benchmark::ReportUnrecognizedArguments(int,char * *))", определенный в "benchmark.lib(benchmark.obj)", импортирован "benchmark_main.lib(benchmark_main.obj)" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\link_main_test.vcxproj]
LINK : warning LNK4217: Символ "?RunSpecifiedBenchmarks@benchmark@@YA_KXZ (unsigned __int64 __cdecl benchmark::RunSpecifiedBenchmarks(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "benchmark_main.lib(benchmark_main.obj)" в функции "main". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\link_main_test.vcxproj]
LINK : warning LNK4217: Символ "?InitializeStreams@internal@benchmark@@YAHXZ (int __cdecl benchmark::internal::InitializeStreams(void))", определенный в "benchmark.lib(benchmark.obj)", импортирован "benchmark_main.lib(benchmark_main.obj)" в функции ""void __cdecl benchmark::internal::`dynamic initializer for 'stream_init_anchor''(void)" (??__Estream_init_anchor@internal@benchmark@@YAXXZ)". [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\link_main_test.vcxproj]
  link_main_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\link_main_test.exe
  multiple_ranges_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\multiple_ranges_test.exe
  options_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\options_test.exe
  gmock_main.cc
  args_product_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\args_product_test.exe
  fixture_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\fixture_test.exe
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  donotoptimize_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\donotoptimize_test.exe
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  diagnostics_test.cc
  output_test_helper.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\output_test_helper.lib
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  benchmark_test.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  benchmark_setup_teardown_test.cc
  Создание кода...
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  user_counters_test.cc
  complexity_test.cc
  templated_fixture_test.cc
  repetitions_test.cc
  perf_counters_test.cc
  user_counters_thousands_test.cc
  user_counters_tabular_test.cc
  report_aggregates_only_test.cc
  benchmark_setup_teardown_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\benchmark_setup_teardown_test.exe
  internal_threading_test.cc
  benchmark_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\benchmark_test.exe
  reporter_output_test.cc
  diagnostics_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\diagnostics_test.exe
  complexity_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\complexity_test.exe
  gmock_main.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\lib\Release\gmock_main.lib
  perf_counters_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\perf_counters_test.exe
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  templated_fixture_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\templated_fixture_test.exe
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  repetitions_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\repetitions_test.exe
  report_aggregates_only_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\report_aggregates_only_test.exe
  commandlineflags_gtest.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  benchmark_random_interleaving_gtest.cc
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  statistics_gtest.cc
  time_unit_gtest.cc
  benchmark_gtest.cc
  user_counters_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\user_counters_test.exe
  string_util_gtest.cc
  memory_manager_test.cc
  perf_counters_gtest.cc
  internal_threading_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\internal_threading_test.exe
C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-src\test\string_util_gtest.cc(66,5): warning C4834: отмена возвращаемого значения функции с атрибутом "nodiscard" [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\string_util_gtest.vcxproj]
C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-src\test\string_util_gtest.cc(110,3): warning C4834: отмена возвращаемого значения функции с атрибутом "nodiscard" [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\string_util_gtest.vcxproj]
C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-src\test\string_util_gtest.cc(140,3): warning C4834: отмена возвращаемого значения функции с атрибутом "nodiscard" [C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\string_util_gtest.vcxproj]
  user_counters_tabular_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\user_counters_tabular_test.exe
  user_counters_thousands_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\user_counters_thousands_test.exe
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  reporter_output_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\reporter_output_test.exe
  statistics_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\statistics_gtest.exe
  benchmark_name_gtest.cc
  time_unit_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\time_unit_gtest.exe
  memory_manager_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\memory_manager_test.exe
  benchmark_random_interleaving_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\benchmark_random_interleaving_gtest.exe
  Building Custom Rule C:/Work/MI.new/cmake-example-library/MI.Bench/_build/_deps/googlebenchmark-src/test/CMakeLists.txt
  commandlineflags_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\commandlineflags_gtest.exe
  display_aggregates_only_test.cc
  perf_counters_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\perf_counters_gtest.exe
  string_util_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\string_util_gtest.exe
  benchmark_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\benchmark_gtest.exe
  benchmark_name_gtest.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\benchmark_name_gtest.exe
  display_aggregates_only_test.vcxproj -> C:\Work\MI.new\cmake-example-library\MI.Bench\_build\_deps\googlebenchmark-build\test\Release\display_aggregates_only_test.exe
/c/Work/MI.new/cmake-example-library/MI.Bench/_build/Release/
./build_mi_bench.sh: line 78: /c/Work/MI.new/cmake-example-library/MI.Bench/_build/Release/MI.Bench: No such file or directory

@jcar87
Copy link

jcar87 commented Aug 5, 2022

Hi @shrek1402 - I have stumbled upon the same issue.

Could you try adding:

target_compile_definitions(MI.Bench 
	PRIVATE BENCHMARK_STATIC_DEFINE
)

?

I'll open an issue or a PR to hopefully address this!

laurynas-biveinis added a commit to laurynas-biveinis/unodb that referenced this issue Aug 11, 2022
- Remove -Wmissing-include-dirs from GCC warning flags due to gbenchmark 1.7.0
  using them
- Adjust various casts due to changed data type signs
- Add BENCHMARK_STATIC_DEFINE because of
google/benchmark#1450,
google/benchmark#1457
laurynas-biveinis added a commit to laurynas-biveinis/unodb that referenced this issue Aug 11, 2022
- Remove -Wmissing-include-dirs from GCC warning flags due to gbenchmark 1.7.0
  using them
- Adjust various casts due to changed data type signs
- Add BENCHMARK_STATIC_DEFINE because of
google/benchmark#1450,
google/benchmark#1457
@StephanTLavavej
Copy link

It appears that this was fixed by #1470 two years ago. This issue can probably be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants