pybind11 icon indicating copy to clipboard operation
pybind11 copied to clipboard

[QUESTION] How to write cmakelist.txt on Clion for macOS ?

Open KunmingS opened this issue 6 years ago • 1 comments

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().

KunmingS avatar Oct 01 '20 20:10 KunmingS

Solved: compile it rather than run it.

Tutorial is great.

KunmingS avatar Oct 02 '20 04:10 KunmingS