$ cat /etc/issue
Ubuntu 14.10 \n \l
$ cmake --version
cmake version 2.8.12.2
$ cmake -DCELERO_ENABLE_EXPERIMENTS=ON .
-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- SYSTEM: Linux
CMAKE_CXX_COMPILER: /usr/bin/c++
CMake Error at experiments/CMakeLists.txt:6 (ADD_SUBDIRECTORY):
The source directory
/home/gluttton/Projects/Celero/experiments/CMakeFiles
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
See also "/home/gluttton/Projects/Celero/CMakeFiles/CMakeOutput.log".
This occurs because script inside experiments/CMakeLists.txt try to find CMakeLists.txt inside CMake build directory.
To prevent such errors I propose add something like:
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message (FATAL_ERROR "Prevented in-tree build. This is not allowed in experimental mode.")
endif (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
This occurs because script inside
experiments/CMakeLists.txt
try to findCMakeLists.txt
inside CMake build directory.To prevent such errors I propose add something like:
in
experiments/CMakeLists.txt
.