I want to create a CMakeLists that outputs two versions of my executable. One is going to be a release version of my C app. The other is the gtest version of my app.
cmake_minimum_required(VERSION 3.1)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "C:\\Users\\James\\ClionProjects\\DustAgent\\build")
project(DustAgent)
include_directories ( WindowsApi gtest-1.7.0/include )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -pthread")
set(SOURCE_FILES main.c utilities/utilities.c utf8/utf8.c)
set(GTEST_SOURCE_FILES ${SOURCE_FILES} gtest-1.7.0/src/gtest-all.cc)
add_executable(DustAgent ${SOURCE_FILES})
How do I make it so that the first exe doesn't require the google library and how do I give specific gcc options for c++ to the gtest version?