CLion not compiling target dyld: mach-o, but built for simulator (not macOS)

I'm getting this strange error when trying to build my project. In the console I see the following. 

"/Users/matthew.wallace/ClionProjects/Fractal Creator/cmake-build-debug/Fractal_Creator"
dyld: mach-o, but built for simulator (not macOS)

Process finished with exit code 6

 

Here is what my cmake file looks like 

cmake_minimum_required(VERSION 3.7)
project(Fractal_Creator)

if(APPLE)
set(CCMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
set(CMAKE_CXX_STANDARD 11)
endif()


set(SOURCE_FILES main.cpp BitmapFileHeader.h BitmapInfoHeader.h)
add_executable(Fractal_Creator ${SOURCE_FILES})

It seems like it's trying to build the project for ios simulator ? not really sure what's going on.
0

Please sign in to leave a comment.