cmake_example
cmake_example copied to clipboard
python file can't import module after change pybind target name
I move the test_basic.py to project root directory and change the import path.
Then, I change the target name in CMakeLists.txt and module name in test_basic.py.
Then, "mkdir build; cd build; cmake ...; make", and everything goes well.
However, when i run the test_basic.py, I get
"Traceback (most recent call last):
File "test_basic.py", line 2, in
Besides, when I change the target name back to cmake_example, the python file import module normally,
Attached files is the version which target name is changed. CMakeLists.txt