SAnsell / CombLayer

MCNP(X) project builder using C++
GNU General Public License v3.0
13 stars 13 forks source link

Libraries not found as part of CMake setup #43

Closed OwenArnold closed 7 years ago

OwenArnold commented 8 years ago

When performing the meta-build steps via CMake, I get the following:

You have called ADD_LIBRARY for library libCMakeFiles without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library libxsimple without any source files. This typically indicates a problem with your CMakeLists.txt file

Looking at the CMakeList.txt, libCMakeFiles is added here

Not sure how this was originally supposed to work. This is where it's going wrong file(GLOB CMakeFiles "${PROJECT_SOURCE_DIR}/CMakeFiles/*.cxx"), the CMakeFiles directory will only exist in the build area, so maybe this only works with a CMake in-source build?

Changing the aforementioned line to file(GLOB CMakeFiles "${PROJECT_BINARY_DIR}/CMakeFiles/*.cxx") seems to be the correct fix for the first of the warnings.

For the second issue with xsimple. xsimple is not located where the CMakeLists.txt file is pointing to. There's no such directory under ESSBeam

SAnsell commented 8 years ago

Thx -- fixed that issue. xsimple is the directory that a person following the course would have built. So my mistake was to not-include (as it is an excercise) but then leave the building part in the master branch. [those that were on the course have their answers and my answers to the problems]

Stupid and fixed - thanks.

OwenArnold commented 8 years ago

@SAnsell Thanks!