arsenm / sanitizers-cmake

CMake modules to help use sanitizers
Other
377 stars 65 forks source link

Syntax error when running set #22

Closed c0debreaker closed 6 years ago

c0debreaker commented 6 years ago

I'm running the set command as root but I'm getting an error

$ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/sanitizers-cmake/cmake" ${CMAKE_MODULE_PATH})
syntax error near unexpected token `CMAKE_MODULE_PATH'

I also just tried this but the error still happened when I'm building goestools

export CMAKE_MODULE_PATH=/root/repos/goestools/cmake

Then in goestools/build directory, I executed cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local. The error I'm getting is

CMake Warning at CMakeLists.txt:36 (find_package):
  By not providing "FindSanitizers.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Sanitizers", but CMake did not find one.

  Could not find a package configuration file provided by "Sanitizers" with
  any of the following names:

    SanitizersConfig.cmake
    sanitizers-config.cmake

  Add the installation prefix of "Sanitizers" to CMAKE_PREFIX_PATH or set
  "Sanitizers_DIR" to a directory containing one of the above files.  If
  "Sanitizers" provides a separate development package or SDK, be sure it has
  been installed.

CMake Error at CMakeLists.txt:59 (add_subdirectory):
  The source directory

    /root/repos/goestools/vendor/libcorrect

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:60 (add_subdirectory):
  The source directory

    /root/repos/goestools/vendor/libaec

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:68 (add_subdirectory):
  The source directory

    /root/repos/goestools/vendor/nanomsg

  does not contain a CMakeLists.txt file.

CMake Error at src/lrit/CMakeLists.txt:4 (add_sanitizers):
  Unknown CMake command "add_sanitizers".

-- Configuring incomplete, errors occurred!
See also "/root/repos/goestools/build/CMakeFiles/CMakeOutput.log".
See also "/root/repos/goestools/build/CMakeFiles/CMakeError.log".
c0debreaker commented 6 years ago

I fixed it.

Blejzer commented 5 years ago

how did you fixed it? You should provide solution...

c0debreaker commented 5 years ago

I'll look at my unix history. I'll update this ticket.

AngelTheBunny commented 3 years ago

Fixed by redownloading the source with --recursive

git clone https://github.com/pietern/goestools --recursive