Now Creating the actual library instead...
Navigate to C:\Users\Ed\CLionProjects\benchmark-master
Click OK
The IDE will load the environment and display a few errors as we did not include Google Test
Select Add Configuration… on the CLion toolbar
Click on + and create a configuration based on Application
Be sure to name it benchmark to match the downloaded CMakeLists.txt
Select All targets
Create a release configuration select File / Settings
Select Build, Execution, Deployment / CMake
The Debug configuration will be shown
Click on + and a Release configuration will be created
To disable Google Test as we are not download those libraries ensure the CMake options says
-DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=OFF
Click on the Debug Configuration and similarly update the CMake options says
-DCMAKE_BUILD_TYPE=Debug -DBENCHMARK_ENABLE_GTEST_TESTS=OFF
Click OK
CMake will run and you should see all check pass now
After which the build button (hammer) will be enabled
Select Release as your configuration and build it
The library will be at
C:\Users\Ed\CLionProjects\benchmark-master\cmake-build-release\src
And be named
libbenchmark.a
You can use it in your Windows GCC projects even though it is called .a instead of .lib
Example of CMakeLists.txt for your project using the library (the order matters)
cmake_minimum_required(VERSION 3.12)
project(MyProj)
set(CMAKE_CXX_STANDARD 17)
link_directories(${PROJECT_SOURCE_DIR}/lib/benchmark)
add_executable(MyProj main.cpp)
target_link_libraries(MyProj libbenchmark.a shlwapi.lib)