I’ve seen a couple of posts suggesting that it’s possible to use to break long lines in CMakeLists.txt. But in my world it appears not to be true. Here’s my CMakeLists.txt:
cmake_minimum_required(VERSION 3.5)
project(Catchwater)
set(CMAKE_PREFIX_PATH "/opt/homebrew")
find_package(FLTK REQUIRED)
include_directories(${FLTK_INCLUDE_DIRS} . ./FromGLOW ./Pipeworks ./fluidSim ./common /opt/homebrew/include)
link_directories(${FLTK_LIBRARY_DIRS})
add_executable(Catchwater main.cpp Pipeworks/Catchwater.cpp Pipeworks/Flow.cpp
Pipeworks/PipeType.cpp Pipeworks/Tools.cpp Pipeworks/V3.cpp Pipeworks/fltkbasicgl.cpp
Pipeworks/quat.cpp)
add_compile_definitions(GL_SILENCE_DEPRECATION)
add_compile_options(-Wno-deprecated-declarations -Wno-writable-strings -Wno-return-type)
target_compile_features(Catchwater PUBLIC cxx_std_11)
target_link_libraries(Catchwater ${FLTK_LIBRARIES})
and here’s the error:
[cmake] CMake Error at CMakeLists.txt:9:
[cmake] Parse error. Function missing ending ")". Instead found bad character
[cmake] with text "".
Is there some option I can set, to make this work? Or some other syntax for breaking long lists of files so I don’t have to deal with unmanageably long lines?
CMake version 3.29.3
running under VS code 1.89.1
Mac OS 14.2.1