_freud.cpp and CMakeLists.txt

Issue #90 resolved
Matthew Spellings created an issue

We should probably explicitly have _freud.cpp be the only thing we tell CMake to build inside freud/CMakeLists.txt instead of globbing. With globbing, it is possible that someone deletes _freud.cpp, successfully builds and installs freud, and gets errors when importing the module.

Comments (5)

  1. Matthew Spellings reporter

    I guess in particular, in cpp/CMakeLists.txt,

    file(GLOB_RECURSE PYX_CPPS ${CMAKE_CURRENT_SOURCE_DIR}/../freud/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../freud/*.c) 
    

    should just set the value to be "${CMAKE_CURRENT_SOURCE_DIR}/../freud/_freud.cpp"

  2. Eric Harper

    That makes sense, and probably explains a weird commit Jens had a few weeks back. I'll implement.

  3. Log in to comment