pybind11
pybind11 copied to clipboard
[QUESTION] How to write cmakelist.txt on Clion for macOS ?
I check the tutorial, the Cmake code there like this(I only change the cpp file name):
cmake_minimum_required(VERSION 2.8.12)
project(example)
add_subdirectory(pybind11)
pybind11_add_module(example main.cpp)
I clone pybing11 to my project folder. Everything going well here. Clion knows where is header file and function declaration. But when I try to compile the code, Clion can't do it cause I don't have an executable file target.
I searched on history issues but they didn't solve my problem. No one mentioned about add_executable() or add_library().
Solved: compile it rather than run it.
Tutorial is great.