Failure to Build Project
I am having trouble with the automatic build system within CLion. I can build and link by hand (using cmake and make), but the IDE cannot execute a build project or rebuild project.
The error seems to be associated with CLion not paying attention to the Python interpreter choice in the settings. That should be enough for it to find Python.
Needless to say, I am using a virtual env with numpy and python3.
So, it should be able to findpython and numpy. I am providing findpython.cmake and telling cmake where to find it.
project(HU_Galaxy_GalaxyWrapper LANGUAGES CXX)
# Set C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=4")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto=4")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
message(" this is CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH})
# Find Python and related packages (Python 3.5 or later)
#set( Python_EXECUTABLE '/home/mp74207/CLionProjects/HU_GalaxyPackage/venv/bin/python')
set( Python_EXECUTABLE 'venv/bin/python')
message("this is the input Python_EXECUTABLE" ${Python_EXECUTABLE})
find_package(Python REQUIRED COMPONENTS Interpreter Development NumPy)
I tried both providing the Python_EXECUTABLE and not.
As far as I can tell, this is a new bug, or perhaps I drove the configuration to some extreme.
By the way, I removed CLion and reinstalled it, and did the same to Ninja.
Another symptom is not being able to find a cmake profile while there is one.
I also invalidated caches and repaired IDE
It is obscure.
请先登录再写评论。
Hello!
Could you please do `Tools | CMake | Reset Cache and Reload Project` and post here the entire output from the CMake tool window?
The problem went away when I learned to delete .idea folder. That eliminated any cached settings. It is working now. Just doing what you wrote is not enough. I did it many times.