My code runs correctly in the terminal when I compile it like
g++ -g -O2 -std=c++11 -I/usr/local/include -L/usr/local/lib main.cpp -lboost_system -lboost_filesystem -fopenmp -lpthread -o main -lz
But when I run it from CLion it gives a bunch of errors specifically linking
Undefined reference to gzread/gzclose/gzopen
which I believe is due to not specifying the compile options while compiling.
How do I set the compile options in CLion?
EDIT
CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(Partition)
set(CMAKE_CXX_STANDARD 14)
add_executable(Partition main.cpp kseq.h)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -O2 -std=c++11 -I/usr/local/include -L/usr/local/lib -lboost_system -lboost_filesystem -fopenmp -lpthread -lz")