I am trying to set up c++ development environment on Linux (openSuse) with this tutorial https://youtu.be/LKLuvoY6U0I?t=154
When I try to build CMake project I'm getting
add_executable called with incorrect number of arguments
My CMakeLists.txt:
cmake_minimum_required (VERSION 3.5)
project (CppEnvTest)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++17")
set (source_dir "${PROJECT_SOURCE_DIR}/src/")
file (GLOB source_files "${source_dir}/*.cpp")
add_executable (CppEnvTest ${source_files})
My build.sh:
#!/bin/sh
cmake -G "CodeLite - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
My terminal output:
/Dev/CppEnvTest/src> ./build.sh
CMake Error at CMakeLists.txt:10 (add_executable):
add_executable called with incorrect number of arguments
-- Configuring incomplete, errors occurred!