JeffersonLab / qphix

QCD for Intel Xeon Phi and Xeon processors
http://jeffersonlab.github.io/qphix/
Other
13 stars 11 forks source link

tests-gtest should not use installed header files #85

Closed kostrzewa closed 6 years ago

kostrzewa commented 7 years ago

CMake is currently set up in such a way that when building things in tests-gtest, the installed header files are used, as far as I can tell. This means that when one updates some header file in the source directory, one first needs to install these before the tests can be rebuilt correctly to use this new header file. The tests should work independently without any installation.

martin-ueding commented 7 years ago

This has also hit me during the current fixup of Chroma. I think it is easily fixed by just moving the following in front of any other include_directories in the main CMakeLists.txt:

include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_BINARY_DIR}/include)
if ( ${testing} ) 
  include_directories(${PROJECT_SOURCE_DIR}/external )
endif()

I will add that to the devel branch later on.

martin-ueding commented 7 years ago

I would think that this issue should now be resolved. Does it fix that for you as well?

kostrzewa commented 7 years ago

Haven't tested, will take a look at some point in the next days.

martin-ueding commented 6 years ago

I have not had any further problems with outdated files on my system, so I think this is resolved. Please feel free to re-open when you find something again.