CMake Compilation error when I use linking with code


#1

Hi guys,

I am trying to build my project by linking with code.

I download the code and put it inside <project_dir>/src/bsf

Then I am using following CMake code:

“”"
cmake_minimum_required(VERSION 3.13.0)

project(ids_visualizer)

set(BSF_DIRECTORY “src/bsf” CACHE STRING “bsf directory”)

include(${BSF_DIRECTORY}/Source/CMake/ProjectDefaults.cmake)

set(CMAKE_CXX_STANDARD 14)

add_compile_options(-fno-rtti)

include_directories(src/tinyxml src/utility)

find_package(Boost COMPONENTS program_options REQUIRED)

add_subdirectory(src)
“”"

Then I got following errors:
“”"
CMake Error at src/bsf/Source/CMake/HelperMethods.cmake:309 (file):
file STRINGS file
“/home/hejia/Projects/interactive-simulation/ids_visualizer/src/bsf/Source/src/bsf/Source/…/Dependencies//.version”
cannot be read.
Call Stack (most recent call first):
src/bsf/Source/CMakeLists.txt:53 (check_and_update_binary_deps)

CMake Error at src/bsf/Source/CMake/HelperMethods.cmake:310 (if):
if given arguments:

"8" "GREATER"

Unknown arguments specified
Call Stack (most recent call first):
src/bsf/Source/CMakeLists.txt:53 (check_and_update_binary_deps)
“”"

if any one can help me!

thank you very much!


#2

This path looks wrong. Try using the absolute path in set(BSF_DIRECTORY “src/bsf” CACHE STRING “bsf directory”) and see if that changes anything.


#3

Thank you, it helps!