For some reason I cannot configure CLion to only use C++98 for my project
Does anyone know how to enforce this standard in CLion? My guess is to configure the cmake file to C++98. Not sure if I'm doing it right though...
My CMakeLists.txt is shown below
cmake_minimum_required(VERSION 3.10)
project(myProject)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c98")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
set(CMAKE_CXX_STANDARD 98)
add_executable(myProject main.cpp Myclass.cpp Myclass.h)
add_definitions(-std=c++98)
p.s I do not have the option to work in any other version than C++98 and lower due to hardware constraints.
I have had similar problem and setting standard for a target worked, it would be something like
set_property(TARGET myProject PROPERTY CXX_STANDARD 98)
for you